diff --git a/java/example/pom.xml b/java/example/pom.xml
new file mode 100644
index 0000000..23b6bef
--- /dev/null
+++ b/java/example/pom.xml
@@ -0,0 +1,62 @@
+
+
+
This example builds a feed message containing three entity types: + *
Run with: {@code mvn exec:java} from the {@code example/} directory.
+ */
+public class GtfsRealtimeExample {
+
+ public static void main(String[] args) throws Exception {
+
+ // --- Build a FeedMessage ---
+
+ FeedMessage feed = FeedMessage.newBuilder()
+ .setHeader(FeedHeader.newBuilder()
+ .setGtfsRealtimeVersion("2.0")
+ .setIncrementality(FeedHeader.Incrementality.FULL_DATASET)
+ .setTimestamp(System.currentTimeMillis() / 1000))
+
+ // Entity 1: vehicle position
+ .addEntity(FeedEntity.newBuilder()
+ .setId("vehicle-1")
+ .setVehicle(VehiclePosition.newBuilder()
+ .setTrip(TripDescriptor.newBuilder()
+ .setTripId("trip-42")
+ .setRouteId("route-7"))
+ .setPosition(Position.newBuilder()
+ .setLatitude(45.5017f)
+ .setLongitude(-73.5673f)
+ .setBearing(180.0f)
+ .setSpeed(12.5f))
+ .setVehicle(VehicleDescriptor.newBuilder()
+ .setId("bus-101")
+ .setLabel("101"))
+ .setCurrentStatus(VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO)
+ .setCurrentStopSequence(5)
+ .setOccupancyStatus(VehiclePosition.OccupancyStatus.MANY_SEATS_AVAILABLE)))
+
+ // Entity 2: trip update with a stop time update
+ .addEntity(FeedEntity.newBuilder()
+ .setId("trip-update-1")
+ .setTripUpdate(TripUpdate.newBuilder()
+ .setTrip(TripDescriptor.newBuilder()
+ .setTripId("trip-42")
+ .setRouteId("route-7"))
+ .addStopTimeUpdate(TripUpdate.StopTimeUpdate.newBuilder()
+ .setStopSequence(5)
+ .setStopId("stop-99")
+ .setArrival(TripUpdate.StopTimeEvent.newBuilder()
+ .setDelay(120)) // 2 minutes late
+ .setDeparture(TripUpdate.StopTimeEvent.newBuilder()
+ .setDelay(120)))))
+
+ // Entity 3: service alert
+ .addEntity(FeedEntity.newBuilder()
+ .setId("alert-1")
+ .setAlert(Alert.newBuilder()
+ .addInformedEntity(EntitySelector.newBuilder()
+ .setRouteId("route-7"))
+ .setHeaderText(TranslatedString.newBuilder()
+ .addTranslation(TranslatedString.Translation.newBuilder()
+ .setLanguage("en")
+ .setText("Route 7 delay")))
+ .setDescriptionText(TranslatedString.newBuilder()
+ .addTranslation(TranslatedString.Translation.newBuilder()
+ .setLanguage("en")
+ .setText("Route 7 is experiencing delays due to traffic.")))
+ .setCause(Alert.Cause.TECHNICAL_PROBLEM)
+ .setEffect(Alert.Effect.SIGNIFICANT_DELAYS)))
+
+ .build();
+
+ System.out.println("Built feed with " + feed.getEntityCount() + " entities.");
+
+ // --- Serialize to bytes (as you would when writing to a file or HTTP response) ---
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ feed.writeTo(out);
+ byte[] bytes = out.toByteArray();
+ System.out.println("Serialized feed: " + bytes.length + " bytes.");
+
+ // --- Parse back from bytes (as a consumer would after fetching a GTFS-RT URL) ---
+
+ FeedMessage parsed = FeedMessage.parseFrom(new ByteArrayInputStream(bytes));
+ System.out.println("Parsed feed version : " + parsed.getHeader().getGtfsRealtimeVersion());
+ System.out.println("Parsed entity count : " + parsed.getEntityCount());
+
+ for (FeedEntity entity : parsed.getEntityList()) {
+ if (entity.hasVehicle()) {
+ VehiclePosition vp = entity.getVehicle();
+ System.out.printf(" Vehicle id=%-12s lat=%.4f lon=%.4f speed=%.1f m/s%n",
+ vp.getVehicle().getId(),
+ vp.getPosition().getLatitude(),
+ vp.getPosition().getLongitude(),
+ vp.getPosition().getSpeed());
+ } else if (entity.hasTripUpdate()) {
+ TripUpdate tu = entity.getTripUpdate();
+ System.out.printf(" TripUpd trip=%-10s stops=%d delay=%ds%n",
+ tu.getTrip().getTripId(),
+ tu.getStopTimeUpdateCount(),
+ tu.getStopTimeUpdate(0).getArrival().getDelay());
+ } else if (entity.hasAlert()) {
+ Alert a = entity.getAlert();
+ System.out.printf(" Alert cause=%-20s \"%s\"%n",
+ a.getCause(),
+ a.getHeaderText().getTranslation(0).getText());
+ }
+ }
+ }
+}
diff --git a/java/pom.xml b/java/pom.xml
index 729c8bd..55e1b39 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -19,7 +19,7 @@
+ * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return Whether the feedVersion field is set.
+ */
+ boolean hasFeedVersion();
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The feedVersion.
+ */
+ java.lang.String getFeedVersion();
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The bytes for feedVersion.
+ */
+ com.google.protobuf.ByteString
+ getFeedVersionBytes();
}
/**
* @@ -1346,6 +1383,7 @@ private FeedHeader(com.google.protobuf.GeneratedMessage.ExtendableBuilder+ * + *+ * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *
optional string feed_version = 4;
+ * @return Whether the feedVersion field is set.
+ */
+ @java.lang.Override
+ public boolean hasFeedVersion() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The feedVersion.
+ */
+ @java.lang.Override
+ public java.lang.String getFeedVersion() {
+ java.lang.Object ref = feedVersion_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ feedVersion_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The bytes for feedVersion.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getFeedVersionBytes() {
+ java.lang.Object ref = feedVersion_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ feedVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -1627,6 +1732,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000004) != 0)) {
output.writeUInt64(3, timestamp_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, feedVersion_);
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -1648,6 +1756,9 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, timestamp_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(4, feedVersion_);
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -1678,6 +1789,11 @@ public boolean equals(final java.lang.Object obj) {
if (getTimestamp()
!= other.getTimestamp()) return false;
}
+ if (hasFeedVersion() != other.hasFeedVersion()) return false;
+ if (hasFeedVersion()) {
+ if (!getFeedVersion()
+ .equals(other.getFeedVersion())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -1704,6 +1820,10 @@ public int hashCode() {
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
}
+ if (hasFeedVersion()) {
+ hash = (37 * hash) + FEED_VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getFeedVersion().hashCode();
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -1844,6 +1964,7 @@ public Builder clear() {
gtfsRealtimeVersion_ = "";
incrementality_ = 0;
timestamp_ = 0L;
+ feedVersion_ = "";
return this;
}
@@ -1890,6 +2011,10 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedHeader r
result.timestamp_ = timestamp_;
to_bitField0_ |= 0x00000004;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.feedVersion_ = feedVersion_;
+ to_bitField0_ |= 0x00000008;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -1939,6 +2064,11 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedHeader oth
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
+ if (other.hasFeedVersion()) {
+ feedVersion_ = other.feedVersion_;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -1994,6 +2124,11 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 24
+ case 34: {
+ feedVersion_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -2225,6 +2360,122 @@ public Builder clearTimestamp() {
return this;
}
+ private java.lang.Object feedVersion_ = "";
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return Whether the feedVersion field is set.
+ */
+ public boolean hasFeedVersion() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The feedVersion.
+ */
+ public java.lang.String getFeedVersion() {
+ java.lang.Object ref = feedVersion_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ feedVersion_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return The bytes for feedVersion.
+ */
+ public com.google.protobuf.ByteString
+ getFeedVersionBytes() {
+ java.lang.Object ref = feedVersion_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ feedVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @param value The feedVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFeedVersion(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ feedVersion_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearFeedVersion() {
+ feedVersion_ = getDefaultInstance().getFeedVersion();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * String that matches the feed_info.feed_version from the GTFS feed that the real + * time data is based on. Consumers can use this to identify which GTFS feed is + * currently active or when a new one is available to download. + *+ * + *
optional string feed_version = 4;
+ * @param value The bytes for feedVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFeedVersionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ feedVersion_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedHeader)
}
@@ -2411,6 +2662,63 @@ public interface FeedEntityOrBuilder extends
* optional .transit_realtime.Alert alert = 5;
*/
com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder();
+
+ /**
+ * + * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. + *+ * + *
optional .transit_realtime.Shape shape = 6;
+ * @return Whether the shape field is set.
+ */
+ boolean hasShape();
+ /**
+ * + * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. + *+ * + *
optional .transit_realtime.Shape shape = 6;
+ * @return The shape.
+ */
+ com.google.transit.realtime.GtfsRealtime.Shape getShape();
+ /**
+ * + * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. + *+ * + *
optional .transit_realtime.Shape shape = 6;
+ */
+ com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder();
+
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return Whether the stop field is set.
+ */
+ boolean hasStop();
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return The stop.
+ */
+ com.google.transit.realtime.GtfsRealtime.Stop getStop();
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ com.google.transit.realtime.GtfsRealtime.StopOrBuilder getStopOrBuilder();
+
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return Whether the tripModifications field is set.
+ */
+ boolean hasTripModifications();
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return The tripModifications.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModifications getTripModifications();
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder getTripModificationsOrBuilder();
}
/**
*
@@ -2665,6 +2973,96 @@ public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
+ public static final int SHAPE_FIELD_NUMBER = 6;
+ private com.google.transit.realtime.GtfsRealtime.Shape shape_;
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ * @return Whether the shape field is set.
+ */
+ @java.lang.Override
+ public boolean hasShape() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ * @return The shape.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Shape getShape() {
+ return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder() {
+ return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
+ }
+
+ public static final int STOP_FIELD_NUMBER = 7;
+ private com.google.transit.realtime.GtfsRealtime.Stop stop_;
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return Whether the stop field is set.
+ */
+ @java.lang.Override
+ public boolean hasStop() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return The stop.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop getStop() {
+ return stop_ == null ? com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance() : stop_;
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.StopOrBuilder getStopOrBuilder() {
+ return stop_ == null ? com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance() : stop_;
+ }
+
+ public static final int TRIP_MODIFICATIONS_FIELD_NUMBER = 8;
+ private com.google.transit.realtime.GtfsRealtime.TripModifications tripModifications_;
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return Whether the tripModifications field is set.
+ */
+ @java.lang.Override
+ public boolean hasTripModifications() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return The tripModifications.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripModifications getTripModifications() {
+ return tripModifications_ == null ? com.google.transit.realtime.GtfsRealtime.TripModifications.getDefaultInstance() : tripModifications_;
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder getTripModificationsOrBuilder() {
+ return tripModifications_ == null ? com.google.transit.realtime.GtfsRealtime.TripModifications.getDefaultInstance() : tripModifications_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -2694,6 +3092,24 @@ public final boolean isInitialized() {
return false;
}
}
+ if (hasShape()) {
+ if (!getShape().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasStop()) {
+ if (!getStop().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasTripModifications()) {
+ if (!getTripModifications().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
@@ -2723,6 +3139,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(5, getAlert());
}
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeMessage(6, getShape());
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeMessage(7, getStop());
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ output.writeMessage(8, getTripModifications());
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -2752,6 +3177,18 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getAlert());
}
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, getShape());
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getStop());
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, getTripModifications());
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -2793,6 +3230,21 @@ public boolean equals(final java.lang.Object obj) {
if (!getAlert()
.equals(other.getAlert())) return false;
}
+ if (hasShape() != other.hasShape()) return false;
+ if (hasShape()) {
+ if (!getShape()
+ .equals(other.getShape())) return false;
+ }
+ if (hasStop() != other.hasStop()) return false;
+ if (hasStop()) {
+ if (!getStop()
+ .equals(other.getStop())) return false;
+ }
+ if (hasTripModifications() != other.hasTripModifications()) return false;
+ if (hasTripModifications()) {
+ if (!getTripModifications()
+ .equals(other.getTripModifications())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -2827,6 +3279,18 @@ public int hashCode() {
hash = (37 * hash) + ALERT_FIELD_NUMBER;
hash = (53 * hash) + getAlert().hashCode();
}
+ if (hasShape()) {
+ hash = (37 * hash) + SHAPE_FIELD_NUMBER;
+ hash = (53 * hash) + getShape().hashCode();
+ }
+ if (hasStop()) {
+ hash = (37 * hash) + STOP_FIELD_NUMBER;
+ hash = (53 * hash) + getStop().hashCode();
+ }
+ if (hasTripModifications()) {
+ hash = (37 * hash) + TRIP_MODIFICATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getTripModifications().hashCode();
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -2966,6 +3430,9 @@ private void maybeForceBuilderInitialization() {
internalGetTripUpdateFieldBuilder();
internalGetVehicleFieldBuilder();
internalGetAlertFieldBuilder();
+ internalGetShapeFieldBuilder();
+ internalGetStopFieldBuilder();
+ internalGetTripModificationsFieldBuilder();
}
}
@java.lang.Override
@@ -2989,6 +3456,21 @@ public Builder clear() {
alertBuilder_.dispose();
alertBuilder_ = null;
}
+ shape_ = null;
+ if (shapeBuilder_ != null) {
+ shapeBuilder_.dispose();
+ shapeBuilder_ = null;
+ }
+ stop_ = null;
+ if (stopBuilder_ != null) {
+ stopBuilder_.dispose();
+ stopBuilder_ = null;
+ }
+ tripModifications_ = null;
+ if (tripModificationsBuilder_ != null) {
+ tripModificationsBuilder_.dispose();
+ tripModificationsBuilder_ = null;
+ }
return this;
}
@@ -3049,6 +3531,24 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedEntity r
: alertBuilder_.build();
to_bitField0_ |= 0x00000010;
}
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.shape_ = shapeBuilder_ == null
+ ? shape_
+ : shapeBuilder_.build();
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.stop_ = stopBuilder_ == null
+ ? stop_
+ : stopBuilder_.build();
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.tripModifications_ = tripModificationsBuilder_ == null
+ ? tripModifications_
+ : tripModificationsBuilder_.build();
+ to_bitField0_ |= 0x00000080;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -3104,6 +3604,15 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedEntity oth
if (other.hasAlert()) {
mergeAlert(other.getAlert());
}
+ if (other.hasShape()) {
+ mergeShape(other.getShape());
+ }
+ if (other.hasStop()) {
+ mergeStop(other.getStop());
+ }
+ if (other.hasTripModifications()) {
+ mergeTripModifications(other.getTripModifications());
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -3130,6 +3639,21 @@ public final boolean isInitialized() {
return false;
}
}
+ if (hasShape()) {
+ if (!getShape().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasStop()) {
+ if (!getStop().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasTripModifications()) {
+ if (!getTripModifications().isInitialized()) {
+ return false;
+ }
+ }
if (!extensionsAreInitialized()) {
return false;
}
@@ -3183,6 +3707,27 @@ public Builder mergeFrom(
bitField0_ |= 0x00000010;
break;
} // case 42
+ case 50: {
+ input.readMessage(
+ internalGetShapeFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 50
+ case 58: {
+ input.readMessage(
+ internalGetStopFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 58
+ case 66: {
+ input.readMessage(
+ internalGetTripModificationsFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 66
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -3814,6 +4359,405 @@ public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder
return alertBuilder_;
}
+ private com.google.transit.realtime.GtfsRealtime.Shape shape_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder> shapeBuilder_;
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ * @return Whether the shape field is set.
+ */
+ public boolean hasShape() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ * @return The shape.
+ */
+ public com.google.transit.realtime.GtfsRealtime.Shape getShape() {
+ if (shapeBuilder_ == null) {
+ return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
+ } else {
+ return shapeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public Builder setShape(com.google.transit.realtime.GtfsRealtime.Shape value) {
+ if (shapeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ shape_ = value;
+ } else {
+ shapeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public Builder setShape(
+ com.google.transit.realtime.GtfsRealtime.Shape.Builder builderForValue) {
+ if (shapeBuilder_ == null) {
+ shape_ = builderForValue.build();
+ } else {
+ shapeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public Builder mergeShape(com.google.transit.realtime.GtfsRealtime.Shape value) {
+ if (shapeBuilder_ == null) {
+ if (((bitField0_ & 0x00000020) != 0) &&
+ shape_ != null &&
+ shape_ != com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance()) {
+ getShapeBuilder().mergeFrom(value);
+ } else {
+ shape_ = value;
+ }
+ } else {
+ shapeBuilder_.mergeFrom(value);
+ }
+ if (shape_ != null) {
+ bitField0_ |= 0x00000020;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public Builder clearShape() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ shape_ = null;
+ if (shapeBuilder_ != null) {
+ shapeBuilder_.dispose();
+ shapeBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public com.google.transit.realtime.GtfsRealtime.Shape.Builder getShapeBuilder() {
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return internalGetShapeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ public com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder() {
+ if (shapeBuilder_ != null) {
+ return shapeBuilder_.getMessageOrBuilder();
+ } else {
+ return shape_ == null ?
+ com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
+ }
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.Shape shape = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder>
+ internalGetShapeFieldBuilder() {
+ if (shapeBuilder_ == null) {
+ shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder>(
+ getShape(),
+ getParentForChildren(),
+ isClean());
+ shape_ = null;
+ }
+ return shapeBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.Stop stop_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Stop, com.google.transit.realtime.GtfsRealtime.Stop.Builder, com.google.transit.realtime.GtfsRealtime.StopOrBuilder> stopBuilder_;
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return Whether the stop field is set.
+ */
+ public boolean hasStop() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ * @return The stop.
+ */
+ public com.google.transit.realtime.GtfsRealtime.Stop getStop() {
+ if (stopBuilder_ == null) {
+ return stop_ == null ? com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance() : stop_;
+ } else {
+ return stopBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public Builder setStop(com.google.transit.realtime.GtfsRealtime.Stop value) {
+ if (stopBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stop_ = value;
+ } else {
+ stopBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public Builder setStop(
+ com.google.transit.realtime.GtfsRealtime.Stop.Builder builderForValue) {
+ if (stopBuilder_ == null) {
+ stop_ = builderForValue.build();
+ } else {
+ stopBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public Builder mergeStop(com.google.transit.realtime.GtfsRealtime.Stop value) {
+ if (stopBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0) &&
+ stop_ != null &&
+ stop_ != com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance()) {
+ getStopBuilder().mergeFrom(value);
+ } else {
+ stop_ = value;
+ }
+ } else {
+ stopBuilder_.mergeFrom(value);
+ }
+ if (stop_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public Builder clearStop() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ stop_ = null;
+ if (stopBuilder_ != null) {
+ stopBuilder_.dispose();
+ stopBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public com.google.transit.realtime.GtfsRealtime.Stop.Builder getStopBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return internalGetStopFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopOrBuilder getStopOrBuilder() {
+ if (stopBuilder_ != null) {
+ return stopBuilder_.getMessageOrBuilder();
+ } else {
+ return stop_ == null ?
+ com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance() : stop_;
+ }
+ }
+ /**
+ * optional .transit_realtime.Stop stop = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Stop, com.google.transit.realtime.GtfsRealtime.Stop.Builder, com.google.transit.realtime.GtfsRealtime.StopOrBuilder>
+ internalGetStopFieldBuilder() {
+ if (stopBuilder_ == null) {
+ stopBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.Stop, com.google.transit.realtime.GtfsRealtime.Stop.Builder, com.google.transit.realtime.GtfsRealtime.StopOrBuilder>(
+ getStop(),
+ getParentForChildren(),
+ isClean());
+ stop_ = null;
+ }
+ return stopBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TripModifications tripModifications_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripModifications, com.google.transit.realtime.GtfsRealtime.TripModifications.Builder, com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder> tripModificationsBuilder_;
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return Whether the tripModifications field is set.
+ */
+ public boolean hasTripModifications() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ * @return The tripModifications.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripModifications getTripModifications() {
+ if (tripModificationsBuilder_ == null) {
+ return tripModifications_ == null ? com.google.transit.realtime.GtfsRealtime.TripModifications.getDefaultInstance() : tripModifications_;
+ } else {
+ return tripModificationsBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public Builder setTripModifications(com.google.transit.realtime.GtfsRealtime.TripModifications value) {
+ if (tripModificationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tripModifications_ = value;
+ } else {
+ tripModificationsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public Builder setTripModifications(
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Builder builderForValue) {
+ if (tripModificationsBuilder_ == null) {
+ tripModifications_ = builderForValue.build();
+ } else {
+ tripModificationsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public Builder mergeTripModifications(com.google.transit.realtime.GtfsRealtime.TripModifications value) {
+ if (tripModificationsBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0) &&
+ tripModifications_ != null &&
+ tripModifications_ != com.google.transit.realtime.GtfsRealtime.TripModifications.getDefaultInstance()) {
+ getTripModificationsBuilder().mergeFrom(value);
+ } else {
+ tripModifications_ = value;
+ }
+ } else {
+ tripModificationsBuilder_.mergeFrom(value);
+ }
+ if (tripModifications_ != null) {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public Builder clearTripModifications() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ tripModifications_ = null;
+ if (tripModificationsBuilder_ != null) {
+ tripModificationsBuilder_.dispose();
+ tripModificationsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripModifications.Builder getTripModificationsBuilder() {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return internalGetTripModificationsFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder getTripModificationsOrBuilder() {
+ if (tripModificationsBuilder_ != null) {
+ return tripModificationsBuilder_.getMessageOrBuilder();
+ } else {
+ return tripModifications_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TripModifications.getDefaultInstance() : tripModifications_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TripModifications trip_modifications = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripModifications, com.google.transit.realtime.GtfsRealtime.TripModifications.Builder, com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder>
+ internalGetTripModificationsFieldBuilder() {
+ if (tripModificationsBuilder_ == null) {
+ tripModificationsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripModifications, com.google.transit.realtime.GtfsRealtime.TripModifications.Builder, com.google.transit.realtime.GtfsRealtime.TripModificationsOrBuilder>(
+ getTripModifications(),
+ getParentForChildren(),
+ isClean());
+ tripModifications_ = null;
+ }
+ return tripModificationsBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedEntity)
}
@@ -4069,7 +5013,9 @@ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getS
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -4079,7 +5025,9 @@ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getS
boolean hasTimestamp();
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -4304,6 +5252,33 @@ public interface StopTimeEventOrBuilder extends
* @return The uncertainty.
*/
int getUncertainty();
+
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return Whether the scheduledTime field is set.
+ */
+ boolean hasScheduledTime();
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return The scheduledTime.
+ */
+ long getScheduledTime();
}
/**
*
@@ -4462,6 +5437,41 @@ public int getUncertainty() {
return uncertainty_;
}
+ public static final int SCHEDULED_TIME_FIELD_NUMBER = 4;
+ private long scheduledTime_ = 0L;
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return Whether the scheduledTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasScheduledTime() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return The scheduledTime.
+ */
+ @java.lang.Override
+ public long getScheduledTime() {
+ return scheduledTime_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -4492,6 +5502,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt32(3, uncertainty_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeInt64(4, scheduledTime_);
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -4514,6 +5527,10 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, uncertainty_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(4, scheduledTime_);
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -4545,6 +5562,11 @@ public boolean equals(final java.lang.Object obj) {
if (getUncertainty()
!= other.getUncertainty()) return false;
}
+ if (hasScheduledTime() != other.hasScheduledTime()) return false;
+ if (hasScheduledTime()) {
+ if (getScheduledTime()
+ != other.getScheduledTime()) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -4571,6 +5593,11 @@ public int hashCode() {
hash = (37 * hash) + UNCERTAINTY_FIELD_NUMBER;
hash = (53 * hash) + getUncertainty();
}
+ if (hasScheduledTime()) {
+ hash = (37 * hash) + SCHEDULED_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getScheduledTime());
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -4725,6 +5752,7 @@ public Builder clear() {
delay_ = 0;
time_ = 0L;
uncertainty_ = 0;
+ scheduledTime_ = 0L;
return this;
}
@@ -4771,6 +5799,10 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.S
result.uncertainty_ = uncertainty_;
to_bitField0_ |= 0x00000004;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.scheduledTime_ = scheduledTime_;
+ to_bitField0_ |= 0x00000008;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -4818,6 +5850,9 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.Sto
if (other.hasUncertainty()) {
setUncertainty(other.getUncertainty());
}
+ if (other.hasScheduledTime()) {
+ setScheduledTime(other.getScheduledTime());
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -4863,6 +5898,11 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 24
+ case 32: {
+ scheduledTime_ = input.readInt64();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -5076,6 +6116,78 @@ public Builder clearUncertainty() {
return this;
}
+ private long scheduledTime_ ;
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return Whether the scheduledTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasScheduledTime() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return The scheduledTime.
+ */
+ @java.lang.Override
+ public long getScheduledTime() {
+ return scheduledTime_;
+ }
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @param value The scheduledTime to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScheduledTime(long value) {
+
+ scheduledTime_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ * Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional int64 scheduled_time = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearScheduledTime() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ scheduledTime_ = 0L;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeEvent)
}
@@ -5210,6 +6322,31 @@ public interface StopTimeUpdateOrBuilder extends
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder();
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return Whether the departureOccupancyStatus field is set.
+ */
+ boolean hasDepartureOccupancyStatus();
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return The departureOccupancyStatus.
+ */
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus();
+
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return Whether the scheduleRelationship field is set.
@@ -5281,6 +6418,7 @@ private StopTimeUpdate(com.google.protobuf.GeneratedMessage.ExtendableBuilder
- * The relation between this StopTime and the static schedule.
+ * The relation between the StopTimeEvents and the static schedule.
*
*
* Protobuf enum {@code transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
@@ -5335,10 +6473,11 @@ public enum ScheduleRelationship
SKIPPED(1),
/**
*
- * No data is given for this stop. The main intention for this value is to
- * give the predictions only for part of a trip, i.e., if the last update
- * for a trip has a NO_DATA specifier, then StopTimes for the rest of the
- * stops in the trip are considered to be unspecified as well.
+ * No StopTimeEvents are given for this stop.
+ * The main intention for this value is to give time predictions only for
+ * part of a trip, i.e., if the last update for a trip has a NO_DATA
+ * specifier, then StopTimeEvents for the rest of the stops in the trip
+ * are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
@@ -5393,10 +6532,11 @@ public enum ScheduleRelationship
public static final int SKIPPED_VALUE = 1;
/**
*
- * No data is given for this stop. The main intention for this value is to
- * give the predictions only for part of a trip, i.e., if the last update
- * for a trip has a NO_DATA specifier, then StopTimes for the rest of the
- * stops in the trip are considered to be unspecified as well.
+ * No StopTimeEvents are given for this stop.
+ * The main intention for this value is to give time predictions only for
+ * part of a trip, i.e., if the last update for a trip has a NO_DATA
+ * specifier, then StopTimeEvents for the rest of the stops in the trip
+ * are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
@@ -5560,6 +6700,80 @@ public interface StopTimePropertiesOrBuilder extends
*/
com.google.protobuf.ByteString
getAssignedStopIdBytes();
+
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return Whether the stopHeadsign field is set.
+ */
+ boolean hasStopHeadsign();
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The stopHeadsign.
+ */
+ java.lang.String getStopHeadsign();
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The bytes for stopHeadsign.
+ */
+ com.google.protobuf.ByteString
+ getStopHeadsignBytes();
+
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return Whether the pickupType field is set.
+ */
+ boolean hasPickupType();
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return The pickupType.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getPickupType();
+
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return Whether the dropOffType field is set.
+ */
+ boolean hasDropOffType();
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return The dropOffType.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getDropOffType();
}
/**
*
@@ -5590,6 +6804,9 @@ private StopTimeProperties(com.google.protobuf.GeneratedMessage.ExtendableBuilde
}
private StopTimeProperties() {
assignedStopId_ = "";
+ stopHeadsign_ = "";
+ pickupType_ = 0;
+ dropOffType_ = 0;
}
public static final com.google.protobuf.Descriptors.Descriptor
@@ -5610,6 +6827,161 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder.class);
}
+ /**
+ * Protobuf enum {@code transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType}
+ */
+ public enum DropOffPickupType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * Regularly scheduled pickup/dropoff.
+ *
+ *
+ * REGULAR = 0;
+ */
+ REGULAR(0),
+ /**
+ *
+ * No pickup/dropoff available
+ *
+ *
+ * NONE = 1;
+ */
+ NONE(1),
+ /**
+ *
+ * Must phone agency to arrange pickup/dropoff.
+ *
+ *
+ * PHONE_AGENCY = 2;
+ */
+ PHONE_AGENCY(2),
+ /**
+ *
+ * Must coordinate with driver to arrange pickup/dropoff.
+ *
+ *
+ * COORDINATE_WITH_DRIVER = 3;
+ */
+ COORDINATE_WITH_DRIVER(3),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "DropOffPickupType");
+ }
+ /**
+ *
+ * Regularly scheduled pickup/dropoff.
+ *
+ *
+ * REGULAR = 0;
+ */
+ public static final int REGULAR_VALUE = 0;
+ /**
+ *
+ * No pickup/dropoff available
+ *
+ *
+ * NONE = 1;
+ */
+ public static final int NONE_VALUE = 1;
+ /**
+ *
+ * Must phone agency to arrange pickup/dropoff.
+ *
+ *
+ * PHONE_AGENCY = 2;
+ */
+ public static final int PHONE_AGENCY_VALUE = 2;
+ /**
+ *
+ * Must coordinate with driver to arrange pickup/dropoff.
+ *
+ *
+ * COORDINATE_WITH_DRIVER = 3;
+ */
+ public static final int COORDINATE_WITH_DRIVER_VALUE = 3;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DropOffPickupType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static DropOffPickupType forNumber(int value) {
+ switch (value) {
+ case 0: return REGULAR;
+ case 1: return NONE;
+ case 2: return PHONE_AGENCY;
+ case 3: return COORDINATE_WITH_DRIVER;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ DropOffPickupType> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public DropOffPickupType findValueByNumber(int number) {
+ return DropOffPickupType.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValue(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDescriptor().getEnumType(0);
+ }
+
+ private static final DropOffPickupType[] VALUES = values();
+
+ public static DropOffPickupType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private DropOffPickupType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType)
+ }
+
private int bitField0_;
public static final int ASSIGNED_STOP_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
@@ -5708,6 +7080,126 @@ public java.lang.String getAssignedStopId() {
}
}
+ public static final int STOP_HEADSIGN_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object stopHeadsign_ = "";
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return Whether the stopHeadsign field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopHeadsign() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The stopHeadsign.
+ */
+ @java.lang.Override
+ public java.lang.String getStopHeadsign() {
+ java.lang.Object ref = stopHeadsign_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopHeadsign_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The bytes for stopHeadsign.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStopHeadsignBytes() {
+ java.lang.Object ref = stopHeadsign_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopHeadsign_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PICKUP_TYPE_FIELD_NUMBER = 3;
+ private int pickupType_ = 0;
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return Whether the pickupType field is set.
+ */
+ @java.lang.Override public boolean hasPickupType() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return The pickupType.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getPickupType() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(pickupType_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.REGULAR : result;
+ }
+
+ public static final int DROP_OFF_TYPE_FIELD_NUMBER = 4;
+ private int dropOffType_ = 0;
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return Whether the dropOffType field is set.
+ */
+ @java.lang.Override public boolean hasDropOffType() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return The dropOffType.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getDropOffType() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(dropOffType_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.REGULAR : result;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -5732,6 +7224,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, assignedStopId_);
}
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, stopHeadsign_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeEnum(3, pickupType_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeEnum(4, dropOffType_);
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -5745,6 +7246,17 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, assignedStopId_);
}
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, stopHeadsign_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(3, pickupType_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(4, dropOffType_);
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -5766,6 +7278,19 @@ public boolean equals(final java.lang.Object obj) {
if (!getAssignedStopId()
.equals(other.getAssignedStopId())) return false;
}
+ if (hasStopHeadsign() != other.hasStopHeadsign()) return false;
+ if (hasStopHeadsign()) {
+ if (!getStopHeadsign()
+ .equals(other.getStopHeadsign())) return false;
+ }
+ if (hasPickupType() != other.hasPickupType()) return false;
+ if (hasPickupType()) {
+ if (pickupType_ != other.pickupType_) return false;
+ }
+ if (hasDropOffType() != other.hasDropOffType()) return false;
+ if (hasDropOffType()) {
+ if (dropOffType_ != other.dropOffType_) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -5783,6 +7308,18 @@ public int hashCode() {
hash = (37 * hash) + ASSIGNED_STOP_ID_FIELD_NUMBER;
hash = (53 * hash) + getAssignedStopId().hashCode();
}
+ if (hasStopHeadsign()) {
+ hash = (37 * hash) + STOP_HEADSIGN_FIELD_NUMBER;
+ hash = (53 * hash) + getStopHeadsign().hashCode();
+ }
+ if (hasPickupType()) {
+ hash = (37 * hash) + PICKUP_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + pickupType_;
+ }
+ if (hasDropOffType()) {
+ hash = (37 * hash) + DROP_OFF_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + dropOffType_;
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -5922,6 +7459,9 @@ public Builder clear() {
super.clear();
bitField0_ = 0;
assignedStopId_ = "";
+ stopHeadsign_ = "";
+ pickupType_ = 0;
+ dropOffType_ = 0;
return this;
}
@@ -5960,6 +7500,18 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.S
result.assignedStopId_ = assignedStopId_;
to_bitField0_ |= 0x00000001;
}
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.stopHeadsign_ = stopHeadsign_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.pickupType_ = pickupType_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.dropOffType_ = dropOffType_;
+ to_bitField0_ |= 0x00000008;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -6003,6 +7555,17 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.Sto
bitField0_ |= 0x00000001;
onChanged();
}
+ if (other.hasStopHeadsign()) {
+ stopHeadsign_ = other.stopHeadsign_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasPickupType()) {
+ setPickupType(other.getPickupType());
+ }
+ if (other.hasDropOffType()) {
+ setDropOffType(other.getDropOffType());
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -6038,6 +7601,35 @@ public Builder mergeFrom(
bitField0_ |= 0x00000001;
break;
} // case 10
+ case 18: {
+ stopHeadsign_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType tmpValue =
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(3, tmpRaw);
+ } else {
+ pickupType_ = tmpRaw;
+ bitField0_ |= 0x00000004;
+ }
+ break;
+ } // case 24
+ case 32: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType tmpValue =
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(4, tmpRaw);
+ } else {
+ dropOffType_ = tmpRaw;
+ bitField0_ |= 0x00000008;
+ }
+ break;
+ } // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -6231,6 +7823,236 @@ public Builder setAssignedStopIdBytes(
return this;
}
+ private java.lang.Object stopHeadsign_ = "";
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return Whether the stopHeadsign field is set.
+ */
+ public boolean hasStopHeadsign() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The stopHeadsign.
+ */
+ public java.lang.String getStopHeadsign() {
+ java.lang.Object ref = stopHeadsign_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopHeadsign_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return The bytes for stopHeadsign.
+ */
+ public com.google.protobuf.ByteString
+ getStopHeadsignBytes() {
+ java.lang.Object ref = stopHeadsign_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopHeadsign_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @param value The stopHeadsign to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopHeadsign(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopHeadsign_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopHeadsign() {
+ stopHeadsign_ = getDefaultInstance().getStopHeadsign();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The updated headsign of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string stop_headsign = 2;
+ * @param value The bytes for stopHeadsign to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopHeadsignBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopHeadsign_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private int pickupType_ = 0;
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return Whether the pickupType field is set.
+ */
+ @java.lang.Override public boolean hasPickupType() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return The pickupType.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getPickupType() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(pickupType_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.REGULAR : result;
+ }
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @param value The pickupType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPickupType(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000004;
+ pickupType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The updated pickup of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType pickup_type = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearPickupType() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ pickupType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int dropOffType_ = 0;
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return Whether the dropOffType field is set.
+ */
+ @java.lang.Override public boolean hasDropOffType() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return The dropOffType.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType getDropOffType() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.forNumber(dropOffType_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType.REGULAR : result;
+ }
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @param value The dropOffType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDropOffType(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000008;
+ dropOffType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The updated drop off of the vehicle at the stop.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType drop_off_type = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearDropOffType() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ dropOffType_ = 0;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
}
@@ -6423,6 +8245,38 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilde
return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
}
+ public static final int DEPARTURE_OCCUPANCY_STATUS_FIELD_NUMBER = 7;
+ private int departureOccupancyStatus_ = 0;
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return Whether the departureOccupancyStatus field is set.
+ */
+ @java.lang.Override public boolean hasDepartureOccupancyStatus() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return The departureOccupancyStatus.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus() {
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(departureOccupancyStatus_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
+ }
+
public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 5;
private int scheduleRelationship_ = 0;
/**
@@ -6430,7 +8284,7 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilde
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
- return ((bitField0_ & 0x00000010) != 0);
+ return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
@@ -6454,7 +8308,7 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilde
*/
@java.lang.Override
public boolean hasStopTimeProperties() {
- return ((bitField0_ & 0x00000020) != 0);
+ return ((bitField0_ & 0x00000040) != 0);
}
/**
*
@@ -6533,12 +8387,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessage.writeString(output, 4, stopId_);
}
- if (((bitField0_ & 0x00000010) != 0)) {
+ if (((bitField0_ & 0x00000020) != 0)) {
output.writeEnum(5, scheduleRelationship_);
}
- if (((bitField0_ & 0x00000020) != 0)) {
+ if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(6, getStopTimeProperties());
}
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeEnum(7, departureOccupancyStatus_);
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -6564,14 +8421,18 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(4, stopId_);
}
- if (((bitField0_ & 0x00000010) != 0)) {
+ if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, scheduleRelationship_);
}
- if (((bitField0_ & 0x00000020) != 0)) {
+ if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getStopTimeProperties());
}
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(7, departureOccupancyStatus_);
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -6608,6 +8469,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getDeparture()
.equals(other.getDeparture())) return false;
}
+ if (hasDepartureOccupancyStatus() != other.hasDepartureOccupancyStatus()) return false;
+ if (hasDepartureOccupancyStatus()) {
+ if (departureOccupancyStatus_ != other.departureOccupancyStatus_) return false;
+ }
if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
if (hasScheduleRelationship()) {
if (scheduleRelationship_ != other.scheduleRelationship_) return false;
@@ -6646,6 +8511,10 @@ public int hashCode() {
hash = (37 * hash) + DEPARTURE_FIELD_NUMBER;
hash = (53 * hash) + getDeparture().hashCode();
}
+ if (hasDepartureOccupancyStatus()) {
+ hash = (37 * hash) + DEPARTURE_OCCUPANCY_STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + departureOccupancyStatus_;
+ }
if (hasScheduleRelationship()) {
hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
hash = (53 * hash) + scheduleRelationship_;
@@ -6813,6 +8682,7 @@ public Builder clear() {
departureBuilder_.dispose();
departureBuilder_ = null;
}
+ departureOccupancyStatus_ = 0;
scheduleRelationship_ = 0;
stopTimeProperties_ = null;
if (stopTimePropertiesBuilder_ != null) {
@@ -6874,14 +8744,18 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.S
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
- result.scheduleRelationship_ = scheduleRelationship_;
+ result.departureOccupancyStatus_ = departureOccupancyStatus_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.scheduleRelationship_ = scheduleRelationship_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
result.stopTimeProperties_ = stopTimePropertiesBuilder_ == null
? stopTimeProperties_
: stopTimePropertiesBuilder_.build();
- to_bitField0_ |= 0x00000020;
+ to_bitField0_ |= 0x00000040;
}
result.bitField0_ |= to_bitField0_;
}
@@ -6935,6 +8809,9 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.Sto
if (other.hasDeparture()) {
mergeDeparture(other.getDeparture());
}
+ if (other.hasDepartureOccupancyStatus()) {
+ setDepartureOccupancyStatus(other.getDepartureOccupancyStatus());
+ }
if (other.hasScheduleRelationship()) {
setScheduleRelationship(other.getScheduleRelationship());
}
@@ -7018,7 +8895,7 @@ public Builder mergeFrom(
mergeUnknownVarintField(5, tmpRaw);
} else {
scheduleRelationship_ = tmpRaw;
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000020;
}
break;
} // case 40
@@ -7026,9 +8903,21 @@ public Builder mergeFrom(
input.readMessage(
internalGetStopTimePropertiesFieldBuilder().getBuilder(),
extensionRegistry);
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
break;
} // case 50
+ case 56: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus tmpValue =
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(7, tmpRaw);
+ } else {
+ departureOccupancyStatus_ = tmpRaw;
+ bitField0_ |= 0x00000010;
+ }
+ break;
+ } // case 56
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -7448,13 +9337,81 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilde
return departureBuilder_;
}
+ private int departureOccupancyStatus_ = 0;
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return Whether the departureOccupancyStatus field is set.
+ */
+ @java.lang.Override public boolean hasDepartureOccupancyStatus() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return The departureOccupancyStatus.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus() {
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(departureOccupancyStatus_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
+ }
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @param value The departureOccupancyStatus to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDepartureOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000010;
+ departureOccupancyStatus_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Expected occupancy after departure from the given stop.
+ * Should be provided only for future stops.
+ * In order to provide departure_occupancy_status without either arrival or
+ * departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
+ *
+ *
+ * optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearDepartureOccupancyStatus() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ departureOccupancyStatus_ = 0;
+ onChanged();
+ return this;
+ }
+
private int scheduleRelationship_ = 0;
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
- return ((bitField0_ & 0x00000010) != 0);
+ return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
@@ -7472,7 +9429,7 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Schedu
*/
public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship value) {
if (value == null) { throw new NullPointerException(); }
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000020;
scheduleRelationship_ = value.getNumber();
onChanged();
return this;
@@ -7482,7 +9439,7 @@ public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.
* @return This builder for chaining.
*/
public Builder clearScheduleRelationship() {
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000020);
scheduleRelationship_ = 0;
onChanged();
return this;
@@ -7501,7 +9458,7 @@ public Builder clearScheduleRelationship() {
* @return Whether the stopTimeProperties field is set.
*/
public boolean hasStopTimeProperties() {
- return ((bitField0_ & 0x00000020) != 0);
+ return ((bitField0_ & 0x00000040) != 0);
}
/**
*
@@ -7536,7 +9493,7 @@ public Builder setStopTimeProperties(com.google.transit.realtime.GtfsRealtime.Tr
} else {
stopTimePropertiesBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -7555,7 +9512,7 @@ public Builder setStopTimeProperties(
} else {
stopTimePropertiesBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -7569,7 +9526,7 @@ public Builder setStopTimeProperties(
*/
public Builder mergeStopTimeProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties value) {
if (stopTimePropertiesBuilder_ == null) {
- if (((bitField0_ & 0x00000020) != 0) &&
+ if (((bitField0_ & 0x00000040) != 0) &&
stopTimeProperties_ != null &&
stopTimeProperties_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance()) {
getStopTimePropertiesBuilder().mergeFrom(value);
@@ -7580,7 +9537,7 @@ public Builder mergeStopTimeProperties(com.google.transit.realtime.GtfsRealtime.
stopTimePropertiesBuilder_.mergeFrom(value);
}
if (stopTimeProperties_ != null) {
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
onChanged();
}
return this;
@@ -7594,7 +9551,7 @@ public Builder mergeStopTimeProperties(com.google.transit.realtime.GtfsRealtime.
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public Builder clearStopTimeProperties() {
- bitField0_ = (bitField0_ & ~0x00000020);
+ bitField0_ = (bitField0_ & ~0x00000040);
stopTimeProperties_ = null;
if (stopTimePropertiesBuilder_ != null) {
stopTimePropertiesBuilder_.dispose();
@@ -7612,7 +9569,7 @@ public Builder clearStopTimeProperties() {
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder getStopTimePropertiesBuilder() {
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
onChanged();
return internalGetStopTimePropertiesFieldBuilder().getBuilder();
}
@@ -7850,10 +9807,122 @@ public interface TripPropertiesOrBuilder extends
*/
com.google.protobuf.ByteString
getStartTimeBytes();
+
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return Whether the shapeId field is set.
+ */
+ boolean hasShapeId();
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The shapeId.
+ */
+ java.lang.String getShapeId();
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The bytes for shapeId.
+ */
+ com.google.protobuf.ByteString
+ getShapeIdBytes();
+
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return Whether the tripHeadsign field is set.
+ */
+ boolean hasTripHeadsign();
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The tripHeadsign.
+ */
+ java.lang.String getTripHeadsign();
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The bytes for tripHeadsign.
+ */
+ com.google.protobuf.ByteString
+ getTripHeadsignBytes();
+
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return Whether the tripShortName field is set.
+ */
+ boolean hasTripShortName();
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The tripShortName.
+ */
+ java.lang.String getTripShortName();
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The bytes for tripShortName.
+ */
+ com.google.protobuf.ByteString
+ getTripShortNameBytes();
}
/**
*
- * Defines updated properties of the trip
+ * Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
+ * trip_id, start_date, and start_time of a DUPLICATED trip.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
@@ -7882,6 +9951,9 @@ private TripProperties() {
tripId_ = "";
startDate_ = "";
startTime_ = "";
+ shapeId_ = "";
+ tripHeadsign_ = "";
+ tripShortName_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
@@ -8140,6 +10212,213 @@ public java.lang.String getStartTime() {
}
}
+ public static final int SHAPE_ID_FIELD_NUMBER = 4;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object shapeId_ = "";
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return Whether the shapeId field is set.
+ */
+ @java.lang.Override
+ public boolean hasShapeId() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The shapeId.
+ */
+ @java.lang.Override
+ public java.lang.String getShapeId() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ shapeId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The bytes for shapeId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getShapeIdBytes() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ shapeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TRIP_HEADSIGN_FIELD_NUMBER = 5;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object tripHeadsign_ = "";
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return Whether the tripHeadsign field is set.
+ */
+ @java.lang.Override
+ public boolean hasTripHeadsign() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The tripHeadsign.
+ */
+ @java.lang.Override
+ public java.lang.String getTripHeadsign() {
+ java.lang.Object ref = tripHeadsign_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripHeadsign_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The bytes for tripHeadsign.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getTripHeadsignBytes() {
+ java.lang.Object ref = tripHeadsign_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripHeadsign_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TRIP_SHORT_NAME_FIELD_NUMBER = 6;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object tripShortName_ = "";
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return Whether the tripShortName field is set.
+ */
+ @java.lang.Override
+ public boolean hasTripShortName() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The tripShortName.
+ */
+ @java.lang.Override
+ public java.lang.String getTripShortName() {
+ java.lang.Object ref = tripShortName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripShortName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The bytes for tripShortName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getTripShortNameBytes() {
+ java.lang.Object ref = tripShortName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripShortName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -8170,6 +10449,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessage.writeString(output, 3, startTime_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, shapeId_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, tripHeadsign_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 6, tripShortName_);
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -8189,6 +10477,15 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, startTime_);
}
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(4, shapeId_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, tripHeadsign_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(6, tripShortName_);
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -8220,6 +10517,21 @@ public boolean equals(final java.lang.Object obj) {
if (!getStartTime()
.equals(other.getStartTime())) return false;
}
+ if (hasShapeId() != other.hasShapeId()) return false;
+ if (hasShapeId()) {
+ if (!getShapeId()
+ .equals(other.getShapeId())) return false;
+ }
+ if (hasTripHeadsign() != other.hasTripHeadsign()) return false;
+ if (hasTripHeadsign()) {
+ if (!getTripHeadsign()
+ .equals(other.getTripHeadsign())) return false;
+ }
+ if (hasTripShortName() != other.hasTripShortName()) return false;
+ if (hasTripShortName()) {
+ if (!getTripShortName()
+ .equals(other.getTripShortName())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -8245,6 +10557,18 @@ public int hashCode() {
hash = (37 * hash) + START_TIME_FIELD_NUMBER;
hash = (53 * hash) + getStartTime().hashCode();
}
+ if (hasShapeId()) {
+ hash = (37 * hash) + SHAPE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getShapeId().hashCode();
+ }
+ if (hasTripHeadsign()) {
+ hash = (37 * hash) + TRIP_HEADSIGN_FIELD_NUMBER;
+ hash = (53 * hash) + getTripHeadsign().hashCode();
+ }
+ if (hasTripShortName()) {
+ hash = (37 * hash) + TRIP_SHORT_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getTripShortName().hashCode();
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -8345,7 +10669,8 @@ protected Builder newBuilderForType(
}
/**
*
- * Defines updated properties of the trip
+ * Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
+ * trip_id, start_date, and start_time of a DUPLICATED trip.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
@@ -8386,6 +10711,9 @@ public Builder clear() {
tripId_ = "";
startDate_ = "";
startTime_ = "";
+ shapeId_ = "";
+ tripHeadsign_ = "";
+ tripShortName_ = "";
return this;
}
@@ -8432,6 +10760,18 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.T
result.startTime_ = startTime_;
to_bitField0_ |= 0x00000004;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.shapeId_ = shapeId_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.tripHeadsign_ = tripHeadsign_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.tripShortName_ = tripShortName_;
+ to_bitField0_ |= 0x00000020;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -8485,6 +10825,21 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.Tri
bitField0_ |= 0x00000004;
onChanged();
}
+ if (other.hasShapeId()) {
+ shapeId_ = other.shapeId_;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ if (other.hasTripHeadsign()) {
+ tripHeadsign_ = other.tripHeadsign_;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ if (other.hasTripShortName()) {
+ tripShortName_ = other.tripShortName_;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -8530,6 +10885,21 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 26
+ case 34: {
+ shapeId_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42: {
+ tripHeadsign_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ case 50: {
+ tripShortName_ = input.readBytes();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -8967,6 +11337,366 @@ public Builder setStartTimeBytes(
return this;
}
+ private java.lang.Object shapeId_ = "";
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return Whether the shapeId field is set.
+ */
+ public boolean hasShapeId() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The shapeId.
+ */
+ public java.lang.String getShapeId() {
+ java.lang.Object ref = shapeId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ shapeId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return The bytes for shapeId.
+ */
+ public com.google.protobuf.ByteString
+ getShapeIdBytes() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ shapeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @param value The shapeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShapeId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ shapeId_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearShapeId() {
+ shapeId_ = getDefaultInstance().getShapeId();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
+ * or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
+ * If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
+ * The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
+ * If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
+ * Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 4;
+ * @param value The bytes for shapeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShapeIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ shapeId_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object tripHeadsign_ = "";
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return Whether the tripHeadsign field is set.
+ */
+ public boolean hasTripHeadsign() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The tripHeadsign.
+ */
+ public java.lang.String getTripHeadsign() {
+ java.lang.Object ref = tripHeadsign_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripHeadsign_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return The bytes for tripHeadsign.
+ */
+ public com.google.protobuf.ByteString
+ getTripHeadsignBytes() {
+ java.lang.Object ref = tripHeadsign_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripHeadsign_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @param value The tripHeadsign to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripHeadsign(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripHeadsign_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearTripHeadsign() {
+ tripHeadsign_ = getDefaultInstance().getTripHeadsign();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the headsign for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_headsign = 5;
+ * @param value The bytes for tripHeadsign to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripHeadsignBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripHeadsign_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object tripShortName_ = "";
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return Whether the tripShortName field is set.
+ */
+ public boolean hasTripShortName() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The tripShortName.
+ */
+ public java.lang.String getTripShortName() {
+ java.lang.Object ref = tripShortName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripShortName_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return The bytes for tripShortName.
+ */
+ public com.google.protobuf.ByteString
+ getTripShortNameBytes() {
+ java.lang.Object ref = tripShortName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripShortName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @param value The tripShortName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripShortName(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripShortName_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearTripShortName() {
+ tripShortName_ = getDefaultInstance().getTripShortName();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the name for this trip when it differs from the original.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string trip_short_name = 6;
+ * @param value The bytes for tripShortName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripShortNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripShortName_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.TripProperties)
}
@@ -9259,7 +11989,9 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuild
private long timestamp_ = 0L;
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -9272,7 +12004,9 @@ public boolean hasTimestamp() {
}
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -10995,7 +13729,9 @@ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builde
private long timestamp_ ;
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -11008,7 +13744,9 @@ public boolean hasTimestamp() {
}
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -11021,7 +13759,9 @@ public long getTimestamp() {
}
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -11038,7 +13778,9 @@ public Builder setTimestamp(long value) {
}
/**
*
- * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * The most recent moment at which the vehicle's real-time progress was measured
+ * to estimate StopTimes in the future. When StopTimes in the past are provided,
+ * arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
@@ -11573,12 +14315,12 @@ public interface VehiclePositionOrBuilder extends
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -11590,12 +14332,12 @@ public interface VehiclePositionOrBuilder extends
boolean hasOccupancyPercentage();
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -12028,8 +14770,14 @@ private CongestionLevel(int value) {
/**
*
- * The degree of passenger occupancy of the vehicle or carriage. This field is still
- * experimental, and subject to change. It may be formally adopted in the future.
+ * The state of passenger occupancy for the vehicle or carriage.
+ * Individual producers may not publish all OccupancyStatus values. Therefore, consumers
+ * must not assume that the OccupancyStatus values follow a linear scale.
+ * Consumers should represent OccupancyStatus values as the state indicated
+ * and intended by the producer. Likewise, producers must use OccupancyStatus values that
+ * correspond to actual vehicle occupancy states.
+ * For describing passenger occupancy levels on a linear scale, see `occupancy_percentage`.
+ * This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf enum {@code transit_realtime.VehiclePosition.OccupancyStatus}
@@ -12047,8 +14795,8 @@ public enum OccupancyStatus
EMPTY(0),
/**
*
- * The vehicle or carriage has a relatively large percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
+ * The vehicle or carriage has a large number of seats available.
+ * The amount of free seats out of the total seats available to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
@@ -12058,8 +14806,8 @@ public enum OccupancyStatus
MANY_SEATS_AVAILABLE(1),
/**
*
- * The vehicle or carriage has a relatively small percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
+ * The vehicle or carriage has a relatively small number of seats available.
+ * The amount of free seats out of the total seats available to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
@@ -12140,8 +14888,8 @@ public enum OccupancyStatus
public static final int EMPTY_VALUE = 0;
/**
*
- * The vehicle or carriage has a relatively large percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
+ * The vehicle or carriage has a large number of seats available.
+ * The amount of free seats out of the total seats available to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
@@ -12151,8 +14899,8 @@ public enum OccupancyStatus
public static final int MANY_SEATS_AVAILABLE_VALUE = 1;
/**
*
- * The vehicle or carriage has a relatively small percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
+ * The vehicle or carriage has a relatively small number of seats available.
+ * The amount of free seats out of the total seats available to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
@@ -14024,12 +16772,12 @@ public long getTimestamp() {
private int occupancyPercentage_ = 0;
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -14044,12 +16792,12 @@ public boolean hasOccupancyPercentage() {
}
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -15834,12 +18582,12 @@ public Builder clearOccupancyStatus() {
private int occupancyPercentage_ ;
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -15854,12 +18602,12 @@ public boolean hasOccupancyPercentage() {
}
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -15874,12 +18622,12 @@ public int getOccupancyPercentage() {
}
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -15898,12 +18646,12 @@ public Builder setOccupancyPercentage(int value) {
}
/**
*
- * A percentage value representing the degree of passenger occupancy of the vehicle.
+ * A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
- * It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
- * The precision of occupancy_percentage should be low enough that you can't track a single person boarding and alighting for privacy reasons.
+ * The value may exceed 100 if there are more passengers than the maximum designed capacity.
+ * The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
@@ -16699,6 +19447,132 @@ com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEnti
* @return The severityLevel.
*/
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel();
+
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return Whether the image field is set.
+ */
+ boolean hasImage();
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return The image.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage();
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder();
+
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return Whether the imageAlternativeText field is set.
+ */
+ boolean hasImageAlternativeText();
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return The imageAlternativeText.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText();
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder();
+
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return Whether the causeDetail field is set.
+ */
+ boolean hasCauseDetail();
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return The causeDetail.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail();
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder();
+
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return Whether the effectDetail field is set.
+ */
+ boolean hasEffectDetail();
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return The effectDetail.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail();
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder();
}
/**
*
@@ -16754,7 +19628,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
/**
*
- * Cause of this alert.
+ * Cause of this alert. If cause_detail is included, then Cause must also be included.
*
*
* Protobuf enum {@code transit_realtime.Alert.Cause}
@@ -16977,7 +19851,7 @@ private Cause(int value) {
/**
*
- * What is the effect of this problem on the affected entity.
+ * What is the effect of this problem on the affected entity. If effect_detail is included, then Effect must also be included.
*
*
* Protobuf enum {@code transit_realtime.Alert.Effect}
@@ -17684,6 +20558,176 @@ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTts
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.UNKNOWN_SEVERITY : result;
}
+ public static final int IMAGE_FIELD_NUMBER = 15;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedImage image_;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return Whether the image field is set.
+ */
+ @java.lang.Override
+ public boolean hasImage() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return The image.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage() {
+ return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
+ }
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder() {
+ return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
+ }
+
+ public static final int IMAGE_ALTERNATIVE_TEXT_FIELD_NUMBER = 16;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString imageAlternativeText_;
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return Whether the imageAlternativeText field is set.
+ */
+ @java.lang.Override
+ public boolean hasImageAlternativeText() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return The imageAlternativeText.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText() {
+ return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
+ }
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder() {
+ return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
+ }
+
+ public static final int CAUSE_DETAIL_FIELD_NUMBER = 17;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString causeDetail_;
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return Whether the causeDetail field is set.
+ */
+ @java.lang.Override
+ public boolean hasCauseDetail() {
+ return ((bitField0_ & 0x00000400) != 0);
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return The causeDetail.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail() {
+ return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder() {
+ return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
+ }
+
+ public static final int EFFECT_DETAIL_FIELD_NUMBER = 18;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString effectDetail_;
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return Whether the effectDetail field is set.
+ */
+ @java.lang.Override
+ public boolean hasEffectDetail() {
+ return ((bitField0_ & 0x00000800) != 0);
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return The effectDetail.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail() {
+ return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder() {
+ return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -17733,6 +20777,30 @@ public final boolean isInitialized() {
return false;
}
}
+ if (hasImage()) {
+ if (!getImage().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasImageAlternativeText()) {
+ if (!getImageAlternativeText().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasCauseDetail()) {
+ if (!getCauseDetail().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasEffectDetail()) {
+ if (!getEffectDetail().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
@@ -17777,6 +20845,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000080) != 0)) {
output.writeEnum(14, severityLevel_);
}
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeMessage(15, getImage());
+ }
+ if (((bitField0_ & 0x00000200) != 0)) {
+ output.writeMessage(16, getImageAlternativeText());
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ output.writeMessage(17, getCauseDetail());
+ }
+ if (((bitField0_ & 0x00000800) != 0)) {
+ output.writeMessage(18, getEffectDetail());
+ }
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@@ -17837,6 +20917,22 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(14, severityLevel_);
}
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(15, getImage());
+ }
+ if (((bitField0_ & 0x00000200) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(16, getImageAlternativeText());
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(17, getCauseDetail());
+ }
+ if (((bitField0_ & 0x00000800) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(18, getEffectDetail());
+ }
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -17894,6 +20990,26 @@ public boolean equals(final java.lang.Object obj) {
if (hasSeverityLevel()) {
if (severityLevel_ != other.severityLevel_) return false;
}
+ if (hasImage() != other.hasImage()) return false;
+ if (hasImage()) {
+ if (!getImage()
+ .equals(other.getImage())) return false;
+ }
+ if (hasImageAlternativeText() != other.hasImageAlternativeText()) return false;
+ if (hasImageAlternativeText()) {
+ if (!getImageAlternativeText()
+ .equals(other.getImageAlternativeText())) return false;
+ }
+ if (hasCauseDetail() != other.hasCauseDetail()) return false;
+ if (hasCauseDetail()) {
+ if (!getCauseDetail()
+ .equals(other.getCauseDetail())) return false;
+ }
+ if (hasEffectDetail() != other.hasEffectDetail()) return false;
+ if (hasEffectDetail()) {
+ if (!getEffectDetail()
+ .equals(other.getEffectDetail())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
@@ -17947,6 +21063,22 @@ public int hashCode() {
hash = (37 * hash) + SEVERITY_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + severityLevel_;
}
+ if (hasImage()) {
+ hash = (37 * hash) + IMAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getImage().hashCode();
+ }
+ if (hasImageAlternativeText()) {
+ hash = (37 * hash) + IMAGE_ALTERNATIVE_TEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getImageAlternativeText().hashCode();
+ }
+ if (hasCauseDetail()) {
+ hash = (37 * hash) + CAUSE_DETAIL_FIELD_NUMBER;
+ hash = (53 * hash) + getCauseDetail().hashCode();
+ }
+ if (hasEffectDetail()) {
+ hash = (37 * hash) + EFFECT_DETAIL_FIELD_NUMBER;
+ hash = (53 * hash) + getEffectDetail().hashCode();
+ }
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
@@ -18090,6 +21222,10 @@ private void maybeForceBuilderInitialization() {
internalGetDescriptionTextFieldBuilder();
internalGetTtsHeaderTextFieldBuilder();
internalGetTtsDescriptionTextFieldBuilder();
+ internalGetImageFieldBuilder();
+ internalGetImageAlternativeTextFieldBuilder();
+ internalGetCauseDetailFieldBuilder();
+ internalGetEffectDetailFieldBuilder();
}
}
@java.lang.Override
@@ -18138,6 +21274,26 @@ public Builder clear() {
ttsDescriptionTextBuilder_ = null;
}
severityLevel_ = 1;
+ image_ = null;
+ if (imageBuilder_ != null) {
+ imageBuilder_.dispose();
+ imageBuilder_ = null;
+ }
+ imageAlternativeText_ = null;
+ if (imageAlternativeTextBuilder_ != null) {
+ imageAlternativeTextBuilder_.dispose();
+ imageAlternativeTextBuilder_ = null;
+ }
+ causeDetail_ = null;
+ if (causeDetailBuilder_ != null) {
+ causeDetailBuilder_.dispose();
+ causeDetailBuilder_ = null;
+ }
+ effectDetail_ = null;
+ if (effectDetailBuilder_ != null) {
+ effectDetailBuilder_.dispose();
+ effectDetailBuilder_ = null;
+ }
return this;
}
@@ -18236,6 +21392,30 @@ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Alert result
result.severityLevel_ = severityLevel_;
to_bitField0_ |= 0x00000080;
}
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.image_ = imageBuilder_ == null
+ ? image_
+ : imageBuilder_.build();
+ to_bitField0_ |= 0x00000100;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.imageAlternativeText_ = imageAlternativeTextBuilder_ == null
+ ? imageAlternativeText_
+ : imageAlternativeTextBuilder_.build();
+ to_bitField0_ |= 0x00000200;
+ }
+ if (((from_bitField0_ & 0x00001000) != 0)) {
+ result.causeDetail_ = causeDetailBuilder_ == null
+ ? causeDetail_
+ : causeDetailBuilder_.build();
+ to_bitField0_ |= 0x00000400;
+ }
+ if (((from_bitField0_ & 0x00002000) != 0)) {
+ result.effectDetail_ = effectDetailBuilder_ == null
+ ? effectDetail_
+ : effectDetailBuilder_.build();
+ to_bitField0_ |= 0x00000800;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -18350,6 +21530,18 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Alert other) {
if (other.hasSeverityLevel()) {
setSeverityLevel(other.getSeverityLevel());
}
+ if (other.hasImage()) {
+ mergeImage(other.getImage());
+ }
+ if (other.hasImageAlternativeText()) {
+ mergeImageAlternativeText(other.getImageAlternativeText());
+ }
+ if (other.hasCauseDetail()) {
+ mergeCauseDetail(other.getCauseDetail());
+ }
+ if (other.hasEffectDetail()) {
+ mergeEffectDetail(other.getEffectDetail());
+ }
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
@@ -18393,6 +21585,26 @@ public final boolean isInitialized() {
return false;
}
}
+ if (hasImage()) {
+ if (!getImage().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasImageAlternativeText()) {
+ if (!getImageAlternativeText().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasCauseDetail()) {
+ if (!getCauseDetail().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasEffectDetail()) {
+ if (!getEffectDetail().isInitialized()) {
+ return false;
+ }
+ }
if (!extensionsAreInitialized()) {
return false;
}
@@ -18512,6 +21724,34 @@ public Builder mergeFrom(
}
break;
} // case 112
+ case 122: {
+ input.readMessage(
+ internalGetImageFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 122
+ case 130: {
+ input.readMessage(
+ internalGetImageAlternativeTextFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 130
+ case 138: {
+ input.readMessage(
+ internalGetCauseDetailFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00001000;
+ break;
+ } // case 138
+ case 146: {
+ input.readMessage(
+ internalGetEffectDetailFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00002000;
+ break;
+ } // case 146
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -20103,741 +23343,705 @@ public Builder clearSeverityLevel() {
return this;
}
- // @@protoc_insertion_point(builder_scope:transit_realtime.Alert)
- }
-
- // @@protoc_insertion_point(class_scope:transit_realtime.Alert)
- private static final com.google.transit.realtime.GtfsRealtime.Alert DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Alert();
- }
-
- public static com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Alert parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
- }
- return builder.buildPartial();
+ private com.google.transit.realtime.GtfsRealtime.TranslatedImage image_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder> imageBuilder_;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return Whether the image field is set.
+ */
+ public boolean hasImage() {
+ return ((bitField0_ & 0x00000400) != 0);
}
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface TimeRangeOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TimeRange)
- com.google.protobuf.GeneratedMessage.
- ExtendableMessageOrBuilder {
-
- /**
- *
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
- *
- *
- * optional uint64 start = 1;
- * @return Whether the start field is set.
- */
- boolean hasStart();
- /**
- *
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
- *
- *
- * optional uint64 start = 1;
- * @return The start.
- */
- long getStart();
-
- /**
- *
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
- *
- *
- * optional uint64 end = 2;
- * @return Whether the end field is set.
- */
- boolean hasEnd();
- /**
- *
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
- *
- *
- * optional uint64 end = 2;
- * @return The end.
- */
- long getEnd();
- }
- /**
- *
- * A time interval. The interval is considered active at time 't' if 't' is
- * greater than or equal to the start time and less than the end time.
- *
- *
- * Protobuf type {@code transit_realtime.TimeRange}
- */
- public static final class TimeRange extends
- com.google.protobuf.GeneratedMessage.ExtendableMessage<
- TimeRange> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TimeRange)
- TimeRangeOrBuilder {
- private static final long serialVersionUID = 0L;
- static {
- com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
- com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
- /* major= */ 4,
- /* minor= */ 34,
- /* patch= */ 0,
- /* suffix= */ "",
- "TimeRange");
- }
- // Use TimeRange.newBuilder() to construct.
- private TimeRange(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
- super(builder);
- }
- private TimeRange() {
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
- }
-
- private int bitField0_;
- public static final int START_FIELD_NUMBER = 1;
- private long start_ = 0L;
- /**
- *
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
- *
- *
- * optional uint64 start = 1;
- * @return Whether the start field is set.
- */
- @java.lang.Override
- public boolean hasStart() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
- *
- *
- * optional uint64 start = 1;
- * @return The start.
- */
- @java.lang.Override
- public long getStart() {
- return start_;
- }
-
- public static final int END_FIELD_NUMBER = 2;
- private long end_ = 0L;
- /**
- *
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
- *
- *
- * optional uint64 end = 2;
- * @return Whether the end field is set.
- */
- @java.lang.Override
- public boolean hasEnd() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
- *
- *
- * optional uint64 end = 2;
- * @return The end.
- */
- @java.lang.Override
- public long getEnd() {
- return end_;
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ * @return The image.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage() {
+ if (imageBuilder_ == null) {
+ return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
+ } else {
+ return imageBuilder_.getMessage();
+ }
}
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessage
- .ExtendableMessage.ExtensionSerializer
- extensionWriter = newExtensionSerializer();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeUInt64(1, start_);
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public Builder setImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage value) {
+ if (imageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ image_ = value;
+ } else {
+ imageBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
}
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeUInt64(2, end_);
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public Builder setImage(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder builderForValue) {
+ if (imageBuilder_ == null) {
+ image_ = builderForValue.build();
+ } else {
+ imageBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
}
- extensionWriter.writeUntil(10000, output);
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(1, start_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(2, end_);
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TimeRange)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.TimeRange other = (com.google.transit.realtime.GtfsRealtime.TimeRange) obj;
-
- if (hasStart() != other.hasStart()) return false;
- if (hasStart()) {
- if (getStart()
- != other.getStart()) return false;
- }
- if (hasEnd() != other.hasEnd()) return false;
- if (hasEnd()) {
- if (getEnd()
- != other.getEnd()) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasStart()) {
- hash = (37 * hash) + START_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getStart());
- }
- if (hasEnd()) {
- hash = (37 * hash) + END_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getEnd());
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TimeRange prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * A time interval. The interval is considered active at time 't' if 't' is
- * greater than or equal to the start time and less than the end time.
- *
- *
- * Protobuf type {@code transit_realtime.TimeRange}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.TimeRange, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TimeRange)
- com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.TimeRange.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- start_ = 0L;
- end_ = 0L;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public Builder mergeImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage value) {
+ if (imageBuilder_ == null) {
+ if (((bitField0_ & 0x00000400) != 0) &&
+ image_ != null &&
+ image_ != com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance()) {
+ getImageBuilder().mergeFrom(value);
+ } else {
+ image_ = value;
+ }
+ } else {
+ imageBuilder_.mergeFrom(value);
+ }
+ if (image_ != null) {
+ bitField0_ |= 0x00000400;
+ onChanged();
+ }
return this;
}
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRange build() {
- com.google.transit.realtime.GtfsRealtime.TimeRange result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public Builder clearImage() {
+ bitField0_ = (bitField0_ & ~0x00000400);
+ image_ = null;
+ if (imageBuilder_ != null) {
+ imageBuilder_.dispose();
+ imageBuilder_ = null;
}
- return result;
+ onChanged();
+ return this;
}
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRange buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TimeRange result = new com.google.transit.realtime.GtfsRealtime.TimeRange(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder getImageBuilder() {
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return internalGetImageFieldBuilder().getBuilder();
}
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TimeRange result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.start_ = start_;
- to_bitField0_ |= 0x00000001;
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder() {
+ if (imageBuilder_ != null) {
+ return imageBuilder_.getMessageOrBuilder();
+ } else {
+ return image_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
}
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.end_ = end_;
- to_bitField0_ |= 0x00000002;
+ }
+ /**
+ *
+ * TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
+ * The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedImage image = 15;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder>
+ internalGetImageFieldBuilder() {
+ if (imageBuilder_ == null) {
+ imageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder>(
+ getImage(),
+ getParentForChildren(),
+ isClean());
+ image_ = null;
}
- result.bitField0_ |= to_bitField0_;
+ return imageBuilder_;
}
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TimeRange, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TimeRange, Type> extension) {
- return super.clearExtension(extension);
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString imageAlternativeText_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> imageAlternativeTextBuilder_;
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return Whether the imageAlternativeText field is set.
+ */
+ public boolean hasImageAlternativeText() {
+ return ((bitField0_ & 0x00000800) != 0);
}
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TimeRange) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TimeRange)other);
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ * @return The imageAlternativeText.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText() {
+ if (imageAlternativeTextBuilder_ == null) {
+ return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
} else {
- super.mergeFrom(other);
- return this;
+ return imageAlternativeTextBuilder_.getMessage();
}
}
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TimeRange other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance()) return this;
- if (other.hasStart()) {
- setStart(other.getStart());
- }
- if (other.hasEnd()) {
- setEnd(other.getEnd());
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ */
+ public Builder setImageAlternativeText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (imageAlternativeTextBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ imageAlternativeText_ = value;
+ } else {
+ imageAlternativeTextBuilder_.setMessage(value);
}
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
+ bitField0_ |= 0x00000800;
onChanged();
return this;
}
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!extensionsAreInitialized()) {
- return false;
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ */
+ public Builder setImageAlternativeText(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (imageAlternativeTextBuilder_ == null) {
+ imageAlternativeText_ = builderForValue.build();
+ } else {
+ imageAlternativeTextBuilder_.setMessage(builderForValue.build());
}
- return true;
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
}
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
+ /**
+ *
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
+ */
+ public Builder mergeImageAlternativeText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (imageAlternativeTextBuilder_ == null) {
+ if (((bitField0_ & 0x00000800) != 0) &&
+ imageAlternativeText_ != null &&
+ imageAlternativeText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getImageAlternativeTextBuilder().mergeFrom(value);
+ } else {
+ imageAlternativeText_ = value;
+ }
+ } else {
+ imageAlternativeTextBuilder_.mergeFrom(value);
}
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- start_ = input.readUInt64();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 16: {
- end_ = input.readUInt64();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
+ if (imageAlternativeText_ != null) {
+ bitField0_ |= 0x00000800;
onChanged();
- } // finally
+ }
return this;
}
- private int bitField0_;
-
- private long start_ ;
/**
*
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 start = 1;
- * @return Whether the start field is set.
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
- @java.lang.Override
- public boolean hasStart() {
- return ((bitField0_ & 0x00000001) != 0);
+ public Builder clearImageAlternativeText() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ imageAlternativeText_ = null;
+ if (imageAlternativeTextBuilder_ != null) {
+ imageAlternativeTextBuilder_.dispose();
+ imageAlternativeTextBuilder_ = null;
+ }
+ onChanged();
+ return this;
}
/**
*
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 start = 1;
- * @return The start.
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
- @java.lang.Override
- public long getStart() {
- return start_;
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getImageAlternativeTextBuilder() {
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return internalGetImageAlternativeTextFieldBuilder().getBuilder();
}
/**
*
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 start = 1;
- * @param value The start to set.
- * @return This builder for chaining.
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
- public Builder setStart(long value) {
-
- start_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder() {
+ if (imageAlternativeTextBuilder_ != null) {
+ return imageAlternativeTextBuilder_.getMessageOrBuilder();
+ } else {
+ return imageAlternativeText_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
+ }
}
/**
*
- * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval starts at minus infinity.
+ * Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
+ * or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 start = 1;
- * @return This builder for chaining.
+ * optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
- public Builder clearStart() {
- bitField0_ = (bitField0_ & ~0x00000001);
- start_ = 0L;
- onChanged();
- return this;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetImageAlternativeTextFieldBuilder() {
+ if (imageAlternativeTextBuilder_ == null) {
+ imageAlternativeTextBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getImageAlternativeText(),
+ getParentForChildren(),
+ isClean());
+ imageAlternativeText_ = null;
+ }
+ return imageAlternativeTextBuilder_;
}
- private long end_ ;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString causeDetail_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> causeDetailBuilder_;
/**
*
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 end = 2;
- * @return Whether the end field is set.
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return Whether the causeDetail field is set.
*/
- @java.lang.Override
- public boolean hasEnd() {
- return ((bitField0_ & 0x00000002) != 0);
+ public boolean hasCauseDetail() {
+ return ((bitField0_ & 0x00001000) != 0);
}
/**
*
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 end = 2;
- * @return The end.
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ * @return The causeDetail.
*/
- @java.lang.Override
- public long getEnd() {
- return end_;
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail() {
+ if (causeDetailBuilder_ == null) {
+ return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
+ } else {
+ return causeDetailBuilder_.getMessage();
+ }
}
/**
*
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 end = 2;
- * @param value The end to set.
- * @return This builder for chaining.
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
*/
- public Builder setEnd(long value) {
-
- end_ = value;
- bitField0_ |= 0x00000002;
+ public Builder setCauseDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (causeDetailBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ causeDetail_ = value;
+ } else {
+ causeDetailBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
- * End time, in POSIX time (i.e., number of seconds since January 1st 1970
- * 00:00:00 UTC).
- * If missing, the interval ends at plus infinity.
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional uint64 end = 2;
- * @return This builder for chaining.
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
*/
- public Builder clearEnd() {
- bitField0_ = (bitField0_ & ~0x00000002);
- end_ = 0L;
- onChanged();
- return this;
+ public Builder setCauseDetail(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (causeDetailBuilder_ == null) {
+ causeDetail_ = builderForValue.build();
+ } else {
+ causeDetailBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ public Builder mergeCauseDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (causeDetailBuilder_ == null) {
+ if (((bitField0_ & 0x00001000) != 0) &&
+ causeDetail_ != null &&
+ causeDetail_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getCauseDetailBuilder().mergeFrom(value);
+ } else {
+ causeDetail_ = value;
+ }
+ } else {
+ causeDetailBuilder_.mergeFrom(value);
+ }
+ if (causeDetail_ != null) {
+ bitField0_ |= 0x00001000;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ public Builder clearCauseDetail() {
+ bitField0_ = (bitField0_ & ~0x00001000);
+ causeDetail_ = null;
+ if (causeDetailBuilder_ != null) {
+ causeDetailBuilder_.dispose();
+ causeDetailBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getCauseDetailBuilder() {
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return internalGetCauseDetailFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder() {
+ if (causeDetailBuilder_ != null) {
+ return causeDetailBuilder_.getMessageOrBuilder();
+ } else {
+ return causeDetail_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
+ }
+ }
+ /**
+ *
+ * Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString cause_detail = 17;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetCauseDetailFieldBuilder() {
+ if (causeDetailBuilder_ == null) {
+ causeDetailBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getCauseDetail(),
+ getParentForChildren(),
+ isClean());
+ causeDetail_ = null;
+ }
+ return causeDetailBuilder_;
}
- // @@protoc_insertion_point(builder_scope:transit_realtime.TimeRange)
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString effectDetail_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> effectDetailBuilder_;
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return Whether the effectDetail field is set.
+ */
+ public boolean hasEffectDetail() {
+ return ((bitField0_ & 0x00002000) != 0);
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ * @return The effectDetail.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail() {
+ if (effectDetailBuilder_ == null) {
+ return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
+ } else {
+ return effectDetailBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public Builder setEffectDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (effectDetailBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ effectDetail_ = value;
+ } else {
+ effectDetailBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public Builder setEffectDetail(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (effectDetailBuilder_ == null) {
+ effectDetail_ = builderForValue.build();
+ } else {
+ effectDetailBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public Builder mergeEffectDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (effectDetailBuilder_ == null) {
+ if (((bitField0_ & 0x00002000) != 0) &&
+ effectDetail_ != null &&
+ effectDetail_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getEffectDetailBuilder().mergeFrom(value);
+ } else {
+ effectDetail_ = value;
+ }
+ } else {
+ effectDetailBuilder_.mergeFrom(value);
+ }
+ if (effectDetail_ != null) {
+ bitField0_ |= 0x00002000;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public Builder clearEffectDetail() {
+ bitField0_ = (bitField0_ & ~0x00002000);
+ effectDetail_ = null;
+ if (effectDetailBuilder_ != null) {
+ effectDetailBuilder_.dispose();
+ effectDetailBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getEffectDetailBuilder() {
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return internalGetEffectDetailFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder() {
+ if (effectDetailBuilder_ != null) {
+ return effectDetailBuilder_.getMessageOrBuilder();
+ } else {
+ return effectDetail_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
+ }
+ }
+ /**
+ *
+ * Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional .transit_realtime.TranslatedString effect_detail = 18;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetEffectDetailFieldBuilder() {
+ if (effectDetailBuilder_ == null) {
+ effectDetailBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getEffectDetail(),
+ getParentForChildren(),
+ isClean());
+ effectDetail_ = null;
+ }
+ return effectDetailBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.Alert)
}
- // @@protoc_insertion_point(class_scope:transit_realtime.TimeRange)
- private static final com.google.transit.realtime.GtfsRealtime.TimeRange DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:transit_realtime.Alert)
+ private static final com.google.transit.realtime.GtfsRealtime.Alert DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TimeRange();
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Alert();
}
- public static com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstance() {
+ public static com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
- public TimeRange parsePartialFrom(
+ public Alert parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -20856,142 +24060,86 @@ public TimeRange parsePartialFrom(
}
};
- public static com.google.protobuf.Parser parser() {
+ public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
+ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
+ public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
- public interface PositionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.Position)
+ public interface TimeRangeOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TimeRange)
com.google.protobuf.GeneratedMessage.
- ExtendableMessageOrBuilder {
-
- /**
- *
- * Degrees North, in the WGS-84 coordinate system.
- *
- *
- * required float latitude = 1;
- * @return Whether the latitude field is set.
- */
- boolean hasLatitude();
- /**
- *
- * Degrees North, in the WGS-84 coordinate system.
- *
- *
- * required float latitude = 1;
- * @return The latitude.
- */
- float getLatitude();
-
- /**
- *
- * Degrees East, in the WGS-84 coordinate system.
- *
- *
- * required float longitude = 2;
- * @return Whether the longitude field is set.
- */
- boolean hasLongitude();
- /**
- *
- * Degrees East, in the WGS-84 coordinate system.
- *
- *
- * required float longitude = 2;
- * @return The longitude.
- */
- float getLongitude();
-
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return Whether the bearing field is set.
- */
- boolean hasBearing();
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return The bearing.
- */
- float getBearing();
+ ExtendableMessageOrBuilder {
/**
*
- * Odometer value, in meters.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * optional double odometer = 4;
- * @return Whether the odometer field is set.
+ * optional uint64 start = 1;
+ * @return Whether the start field is set.
*/
- boolean hasOdometer();
+ boolean hasStart();
/**
*
- * Odometer value, in meters.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * optional double odometer = 4;
- * @return The odometer.
+ * optional uint64 start = 1;
+ * @return The start.
*/
- double getOdometer();
+ long getStart();
/**
*
- * Momentary speed measured by the vehicle, in meters per second.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * optional float speed = 5;
- * @return Whether the speed field is set.
+ * optional uint64 end = 2;
+ * @return Whether the end field is set.
*/
- boolean hasSpeed();
+ boolean hasEnd();
/**
*
- * Momentary speed measured by the vehicle, in meters per second.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * optional float speed = 5;
- * @return The speed.
+ * optional uint64 end = 2;
+ * @return The end.
*/
- float getSpeed();
+ long getEnd();
}
/**
*
- * A position.
+ * A time interval. The interval is considered active at time 't' if 't' is
+ * greater than or equal to the start time and less than the end time.
*
*
- * Protobuf type {@code transit_realtime.Position}
+ * Protobuf type {@code transit_realtime.TimeRange}
*/
- public static final class Position extends
+ public static final class TimeRange extends
com.google.protobuf.GeneratedMessage.ExtendableMessage<
- Position> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.Position)
- PositionOrBuilder {
+ TimeRange> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TimeRange)
+ TimeRangeOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
@@ -21000,175 +24148,94 @@ public static final class Position extends
/* minor= */ 34,
/* patch= */ 0,
/* suffix= */ "",
- "Position");
+ "TimeRange");
}
- // Use Position.newBuilder() to construct.
- private Position(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ // Use TimeRange.newBuilder() to construct.
+ private TimeRange(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
super(builder);
}
- private Position() {
+ private TimeRange() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
+ com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
}
private int bitField0_;
- public static final int LATITUDE_FIELD_NUMBER = 1;
- private float latitude_ = 0F;
+ public static final int START_FIELD_NUMBER = 1;
+ private long start_ = 0L;
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
- * @return Whether the latitude field is set.
+ * optional uint64 start = 1;
+ * @return Whether the start field is set.
*/
@java.lang.Override
- public boolean hasLatitude() {
+ public boolean hasStart() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
- * @return The latitude.
+ * optional uint64 start = 1;
+ * @return The start.
*/
@java.lang.Override
- public float getLatitude() {
- return latitude_;
+ public long getStart() {
+ return start_;
}
- public static final int LONGITUDE_FIELD_NUMBER = 2;
- private float longitude_ = 0F;
+ public static final int END_FIELD_NUMBER = 2;
+ private long end_ = 0L;
/**
*
- * Degrees East, in the WGS-84 coordinate system.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * required float longitude = 2;
- * @return Whether the longitude field is set.
+ * optional uint64 end = 2;
+ * @return Whether the end field is set.
*/
@java.lang.Override
- public boolean hasLongitude() {
+ public boolean hasEnd() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
- * Degrees East, in the WGS-84 coordinate system.
- *
- *
- * required float longitude = 2;
- * @return The longitude.
- */
- @java.lang.Override
- public float getLongitude() {
- return longitude_;
- }
-
- public static final int BEARING_FIELD_NUMBER = 3;
- private float bearing_ = 0F;
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return Whether the bearing field is set.
- */
- @java.lang.Override
- public boolean hasBearing() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return The bearing.
- */
- @java.lang.Override
- public float getBearing() {
- return bearing_;
- }
-
- public static final int ODOMETER_FIELD_NUMBER = 4;
- private double odometer_ = 0D;
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @return Whether the odometer field is set.
- */
- @java.lang.Override
- public boolean hasOdometer() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @return The odometer.
- */
- @java.lang.Override
- public double getOdometer() {
- return odometer_;
- }
-
- public static final int SPEED_FIELD_NUMBER = 5;
- private float speed_ = 0F;
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
- *
- *
- * optional float speed = 5;
- * @return Whether the speed field is set.
- */
- @java.lang.Override
- public boolean hasSpeed() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * optional float speed = 5;
- * @return The speed.
+ * optional uint64 end = 2;
+ * @return The end.
*/
@java.lang.Override
- public float getSpeed() {
- return speed_;
+ public long getEnd() {
+ return end_;
}
private byte memoizedIsInitialized = -1;
@@ -21178,14 +24245,6 @@ public final boolean isInitialized() {
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
- if (!hasLatitude()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasLongitude()) {
- memoizedIsInitialized = 0;
- return false;
- }
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
@@ -21201,19 +24260,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
.ExtendableMessage.ExtensionSerializer
extensionWriter = newExtensionSerializer();
if (((bitField0_ & 0x00000001) != 0)) {
- output.writeFloat(1, latitude_);
+ output.writeUInt64(1, start_);
}
if (((bitField0_ & 0x00000002) != 0)) {
- output.writeFloat(2, longitude_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeFloat(3, bearing_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeDouble(4, odometer_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeFloat(5, speed_);
+ output.writeUInt64(2, end_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
@@ -21227,23 +24277,11 @@ public int getSerializedSize() {
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(1, latitude_);
+ .computeUInt64Size(1, start_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, longitude_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, bearing_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(4, odometer_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(5, speed_);
+ .computeUInt64Size(2, end_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
@@ -21256,40 +24294,20 @@ public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Position)) {
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TimeRange)) {
return super.equals(obj);
}
- com.google.transit.realtime.GtfsRealtime.Position other = (com.google.transit.realtime.GtfsRealtime.Position) obj;
+ com.google.transit.realtime.GtfsRealtime.TimeRange other = (com.google.transit.realtime.GtfsRealtime.TimeRange) obj;
- if (hasLatitude() != other.hasLatitude()) return false;
- if (hasLatitude()) {
- if (java.lang.Float.floatToIntBits(getLatitude())
- != java.lang.Float.floatToIntBits(
- other.getLatitude())) return false;
+ if (hasStart() != other.hasStart()) return false;
+ if (hasStart()) {
+ if (getStart()
+ != other.getStart()) return false;
}
- if (hasLongitude() != other.hasLongitude()) return false;
- if (hasLongitude()) {
- if (java.lang.Float.floatToIntBits(getLongitude())
- != java.lang.Float.floatToIntBits(
- other.getLongitude())) return false;
- }
- if (hasBearing() != other.hasBearing()) return false;
- if (hasBearing()) {
- if (java.lang.Float.floatToIntBits(getBearing())
- != java.lang.Float.floatToIntBits(
- other.getBearing())) return false;
- }
- if (hasOdometer() != other.hasOdometer()) return false;
- if (hasOdometer()) {
- if (java.lang.Double.doubleToLongBits(getOdometer())
- != java.lang.Double.doubleToLongBits(
- other.getOdometer())) return false;
- }
- if (hasSpeed() != other.hasSpeed()) return false;
- if (hasSpeed()) {
- if (java.lang.Float.floatToIntBits(getSpeed())
- != java.lang.Float.floatToIntBits(
- other.getSpeed())) return false;
+ if (hasEnd() != other.hasEnd()) return false;
+ if (hasEnd()) {
+ if (getEnd()
+ != other.getEnd()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
@@ -21304,30 +24322,15 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- if (hasLatitude()) {
- hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
- hash = (53 * hash) + java.lang.Float.floatToIntBits(
- getLatitude());
- }
- if (hasLongitude()) {
- hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
- hash = (53 * hash) + java.lang.Float.floatToIntBits(
- getLongitude());
- }
- if (hasBearing()) {
- hash = (37 * hash) + BEARING_FIELD_NUMBER;
- hash = (53 * hash) + java.lang.Float.floatToIntBits(
- getBearing());
- }
- if (hasOdometer()) {
- hash = (37 * hash) + ODOMETER_FIELD_NUMBER;
+ if (hasStart()) {
+ hash = (37 * hash) + START_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- java.lang.Double.doubleToLongBits(getOdometer()));
+ getStart());
}
- if (hasSpeed()) {
- hash = (37 * hash) + SPEED_FIELD_NUMBER;
- hash = (53 * hash) + java.lang.Float.floatToIntBits(
- getSpeed());
+ if (hasEnd()) {
+ hash = (37 * hash) + END_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getEnd());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
@@ -21335,44 +24338,44 @@ public int hashCode() {
return hash;
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(byte[] data)
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(java.io.InputStream input)
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -21380,26 +24383,26 @@ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseDelimitedFrom(java.io.InputStream input)
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseDelimitedFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -21412,7 +24415,7 @@ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Position prototype) {
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TimeRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -21429,30 +24432,31 @@ protected Builder newBuilderForType(
}
/**
*
- * A position.
+ * A time interval. The interval is considered active at time 't' if 't' is
+ * greater than or equal to the start time and less than the end time.
*
*
- * Protobuf type {@code transit_realtime.Position}
+ * Protobuf type {@code transit_realtime.TimeRange}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.Position, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.Position)
- com.google.transit.realtime.GtfsRealtime.PositionOrBuilder {
+ com.google.transit.realtime.GtfsRealtime.TimeRange, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TimeRange)
+ com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
+ com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
}
- // Construct using com.google.transit.realtime.GtfsRealtime.Position.newBuilder()
+ // Construct using com.google.transit.realtime.GtfsRealtime.TimeRange.newBuilder()
private Builder() {
}
@@ -21466,28 +24470,25 @@ private Builder(
public Builder clear() {
super.clear();
bitField0_ = 0;
- latitude_ = 0F;
- longitude_ = 0F;
- bearing_ = 0F;
- odometer_ = 0D;
- speed_ = 0F;
+ start_ = 0L;
+ end_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance();
+ public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance();
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Position build() {
- com.google.transit.realtime.GtfsRealtime.Position result = buildPartial();
+ public com.google.transit.realtime.GtfsRealtime.TimeRange build() {
+ com.google.transit.realtime.GtfsRealtime.TimeRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -21495,88 +24496,67 @@ public com.google.transit.realtime.GtfsRealtime.Position build() {
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Position buildPartial() {
- com.google.transit.realtime.GtfsRealtime.Position result = new com.google.transit.realtime.GtfsRealtime.Position(this);
+ public com.google.transit.realtime.GtfsRealtime.TimeRange buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TimeRange result = new com.google.transit.realtime.GtfsRealtime.TimeRange(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Position result) {
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TimeRange result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
- result.latitude_ = latitude_;
+ result.start_ = start_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
- result.longitude_ = longitude_;
+ result.end_ = end_;
to_bitField0_ |= 0x00000002;
}
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.bearing_ = bearing_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.odometer_ = odometer_;
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.speed_ = speed_;
- to_bitField0_ |= 0x00000010;
- }
result.bitField0_ |= to_bitField0_;
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Position, Type> extension,
+ com.google.transit.realtime.GtfsRealtime.TimeRange, Type> extension,
Type value) {
return super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
+ com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
int index, Type value) {
return super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
+ com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
Type value) {
return super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Position, Type> extension) {
+ com.google.transit.realtime.GtfsRealtime.TimeRange, Type> extension) {
return super.clearExtension(extension);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.Position) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.Position)other);
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TimeRange) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TimeRange)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) {
- if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this;
- if (other.hasLatitude()) {
- setLatitude(other.getLatitude());
- }
- if (other.hasLongitude()) {
- setLongitude(other.getLongitude());
- }
- if (other.hasBearing()) {
- setBearing(other.getBearing());
- }
- if (other.hasOdometer()) {
- setOdometer(other.getOdometer());
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TimeRange other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance()) return this;
+ if (other.hasStart()) {
+ setStart(other.getStart());
}
- if (other.hasSpeed()) {
- setSpeed(other.getSpeed());
+ if (other.hasEnd()) {
+ setEnd(other.getEnd());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
@@ -21586,12 +24566,6 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other
@java.lang.Override
public final boolean isInitialized() {
- if (!hasLatitude()) {
- return false;
- }
- if (!hasLongitude()) {
- return false;
- }
if (!extensionsAreInitialized()) {
return false;
}
@@ -21614,31 +24588,16 @@ public Builder mergeFrom(
case 0:
done = true;
break;
- case 13: {
- latitude_ = input.readFloat();
+ case 8: {
+ start_ = input.readUInt64();
bitField0_ |= 0x00000001;
break;
- } // case 13
- case 21: {
- longitude_ = input.readFloat();
+ } // case 8
+ case 16: {
+ end_ = input.readUInt64();
bitField0_ |= 0x00000002;
break;
- } // case 21
- case 29: {
- bearing_ = input.readFloat();
- bitField0_ |= 0x00000004;
- break;
- } // case 29
- case 33: {
- odometer_ = input.readDouble();
- bitField0_ |= 0x00000008;
- break;
- } // case 33
- case 45: {
- speed_ = input.readFloat();
- bitField0_ |= 0x00000010;
- break;
- } // case 45
+ } // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -21656,319 +24615,151 @@ public Builder mergeFrom(
}
private int bitField0_;
- private float latitude_ ;
+ private long start_ ;
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
- * @return Whether the latitude field is set.
+ * optional uint64 start = 1;
+ * @return Whether the start field is set.
*/
@java.lang.Override
- public boolean hasLatitude() {
+ public boolean hasStart() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
- * @return The latitude.
+ * optional uint64 start = 1;
+ * @return The start.
*/
@java.lang.Override
- public float getLatitude() {
- return latitude_;
+ public long getStart() {
+ return start_;
}
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
- * @param value The latitude to set.
+ * optional uint64 start = 1;
+ * @param value The start to set.
* @return This builder for chaining.
*/
- public Builder setLatitude(float value) {
+ public Builder setStart(long value) {
- latitude_ = value;
+ start_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
- * Degrees North, in the WGS-84 coordinate system.
+ * Start time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval starts at minus infinity.
*
*
- * required float latitude = 1;
+ * optional uint64 start = 1;
* @return This builder for chaining.
*/
- public Builder clearLatitude() {
+ public Builder clearStart() {
bitField0_ = (bitField0_ & ~0x00000001);
- latitude_ = 0F;
+ start_ = 0L;
onChanged();
return this;
}
- private float longitude_ ;
+ private long end_ ;
/**
*
- * Degrees East, in the WGS-84 coordinate system.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * required float longitude = 2;
- * @return Whether the longitude field is set.
+ * optional uint64 end = 2;
+ * @return Whether the end field is set.
*/
@java.lang.Override
- public boolean hasLongitude() {
+ public boolean hasEnd() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
- * Degrees East, in the WGS-84 coordinate system.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * required float longitude = 2;
- * @return The longitude.
+ * optional uint64 end = 2;
+ * @return The end.
*/
@java.lang.Override
- public float getLongitude() {
- return longitude_;
+ public long getEnd() {
+ return end_;
}
/**
*
- * Degrees East, in the WGS-84 coordinate system.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * required float longitude = 2;
- * @param value The longitude to set.
+ * optional uint64 end = 2;
+ * @param value The end to set.
* @return This builder for chaining.
*/
- public Builder setLongitude(float value) {
+ public Builder setEnd(long value) {
- longitude_ = value;
+ end_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
- * Degrees East, in the WGS-84 coordinate system.
+ * End time, in POSIX time (i.e., number of seconds since January 1st 1970
+ * 00:00:00 UTC).
+ * If missing, the interval ends at plus infinity.
*
*
- * required float longitude = 2;
+ * optional uint64 end = 2;
* @return This builder for chaining.
*/
- public Builder clearLongitude() {
+ public Builder clearEnd() {
bitField0_ = (bitField0_ & ~0x00000002);
- longitude_ = 0F;
- onChanged();
- return this;
- }
-
- private float bearing_ ;
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return Whether the bearing field is set.
- */
- @java.lang.Override
- public boolean hasBearing() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return The bearing.
- */
- @java.lang.Override
- public float getBearing() {
- return bearing_;
- }
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @param value The bearing to set.
- * @return This builder for chaining.
- */
- public Builder setBearing(float value) {
-
- bearing_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- * This can be the compass bearing, or the direction towards the next stop
- * or intermediate location.
- * This should not be direction deduced from the sequence of previous
- * positions, which can be computed from previous data.
- *
- *
- * optional float bearing = 3;
- * @return This builder for chaining.
- */
- public Builder clearBearing() {
- bitField0_ = (bitField0_ & ~0x00000004);
- bearing_ = 0F;
- onChanged();
- return this;
- }
-
- private double odometer_ ;
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @return Whether the odometer field is set.
- */
- @java.lang.Override
- public boolean hasOdometer() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @return The odometer.
- */
- @java.lang.Override
- public double getOdometer() {
- return odometer_;
- }
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @param value The odometer to set.
- * @return This builder for chaining.
- */
- public Builder setOdometer(double value) {
-
- odometer_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * Odometer value, in meters.
- *
- *
- * optional double odometer = 4;
- * @return This builder for chaining.
- */
- public Builder clearOdometer() {
- bitField0_ = (bitField0_ & ~0x00000008);
- odometer_ = 0D;
- onChanged();
- return this;
- }
-
- private float speed_ ;
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
- *
- *
- * optional float speed = 5;
- * @return Whether the speed field is set.
- */
- @java.lang.Override
- public boolean hasSpeed() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
- *
- *
- * optional float speed = 5;
- * @return The speed.
- */
- @java.lang.Override
- public float getSpeed() {
- return speed_;
- }
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
- *
- *
- * optional float speed = 5;
- * @param value The speed to set.
- * @return This builder for chaining.
- */
- public Builder setSpeed(float value) {
-
- speed_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * Momentary speed measured by the vehicle, in meters per second.
- *
- *
- * optional float speed = 5;
- * @return This builder for chaining.
- */
- public Builder clearSpeed() {
- bitField0_ = (bitField0_ & ~0x00000010);
- speed_ = 0F;
+ end_ = 0L;
onChanged();
return this;
}
- // @@protoc_insertion_point(builder_scope:transit_realtime.Position)
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TimeRange)
}
- // @@protoc_insertion_point(class_scope:transit_realtime.Position)
- private static final com.google.transit.realtime.GtfsRealtime.Position DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:transit_realtime.TimeRange)
+ private static final com.google.transit.realtime.GtfsRealtime.TimeRange DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Position();
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TimeRange();
}
- public static com.google.transit.realtime.GtfsRealtime.Position getDefaultInstance() {
+ public static com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
- public Position parsePartialFrom(
+ public TimeRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -21987,279 +24778,142 @@ public Position parsePartialFrom(
}
};
- public static com.google.protobuf.Parser parser() {
+ public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
+ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
+ public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
- public interface TripDescriptorOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TripDescriptor)
+ public interface PositionOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.Position)
com.google.protobuf.GeneratedMessage.
- ExtendableMessageOrBuilder {
+ ExtendableMessageOrBuilder {
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
- *
- *
- * optional string trip_id = 1;
- * @return Whether the tripId field is set.
- */
- boolean hasTripId();
- /**
- *
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return The tripId.
+ * required float latitude = 1;
+ * @return Whether the latitude field is set.
*/
- java.lang.String getTripId();
+ boolean hasLatitude();
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return The bytes for tripId.
+ * required float latitude = 1;
+ * @return The latitude.
*/
- com.google.protobuf.ByteString
- getTripIdBytes();
+ float getLatitude();
/**
*
- * The route_id from the GTFS that this selector refers to.
- *
- *
- * optional string route_id = 5;
- * @return Whether the routeId field is set.
- */
- boolean hasRouteId();
- /**
- *
- * The route_id from the GTFS that this selector refers to.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string route_id = 5;
- * @return The routeId.
+ * required float longitude = 2;
+ * @return Whether the longitude field is set.
*/
- java.lang.String getRouteId();
+ boolean hasLongitude();
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string route_id = 5;
- * @return The bytes for routeId.
+ * required float longitude = 2;
+ * @return The longitude.
*/
- com.google.protobuf.ByteString
- getRouteIdBytes();
+ float getLongitude();
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional uint32 direction_id = 6;
- * @return Whether the directionId field is set.
+ * optional float bearing = 3;
+ * @return Whether the bearing field is set.
*/
- boolean hasDirectionId();
+ boolean hasBearing();
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional uint32 direction_id = 6;
- * @return The directionId.
+ * optional float bearing = 3;
+ * @return The bearing.
*/
- int getDirectionId();
+ float getBearing();
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- *
- *
- * optional string start_time = 2;
- * @return Whether the startTime field is set.
- */
- boolean hasStartTime();
- /**
- *
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Odometer value, in meters.
*
*
- * optional string start_time = 2;
- * @return The startTime.
+ * optional double odometer = 4;
+ * @return Whether the odometer field is set.
*/
- java.lang.String getStartTime();
+ boolean hasOdometer();
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Odometer value, in meters.
*
*
- * optional string start_time = 2;
- * @return The bytes for startTime.
+ * optional double odometer = 4;
+ * @return The odometer.
*/
- com.google.protobuf.ByteString
- getStartTimeBytes();
+ double getOdometer();
/**
*
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @return Whether the startDate field is set.
- */
- boolean hasStartDate();
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_date = 3;
- * @return The startDate.
+ * optional float speed = 5;
+ * @return Whether the speed field is set.
*/
- java.lang.String getStartDate();
+ boolean hasSpeed();
/**
*
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_date = 3;
- * @return The bytes for startDate.
- */
- com.google.protobuf.ByteString
- getStartDateBytes();
-
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return Whether the scheduleRelationship field is set.
- */
- boolean hasScheduleRelationship();
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return The scheduleRelationship.
+ * optional float speed = 5;
+ * @return The speed.
*/
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship();
+ float getSpeed();
}
/**
*
- * A descriptor that identifies an instance of a GTFS trip, or all instances of
- * a trip along a route.
- * - To specify a single trip instance, the trip_id (and if necessary,
- * start_time) is set. If route_id is also set, then it should be same as one
- * that the given trip corresponds to.
- * - To specify all the trips along a given route, only the route_id should be
- * set. Note that if the trip_id is not known, then stop sequence ids in
- * TripUpdate are not sufficient, and stop_ids must be provided as well. In
- * addition, absolute arrival/departure times must be provided.
+ * A position.
*
*
- * Protobuf type {@code transit_realtime.TripDescriptor}
+ * Protobuf type {@code transit_realtime.Position}
*/
- public static final class TripDescriptor extends
+ public static final class Position extends
com.google.protobuf.GeneratedMessage.ExtendableMessage<
- TripDescriptor> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TripDescriptor)
- TripDescriptorOrBuilder {
+ Position> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.Position)
+ PositionOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
@@ -22268,652 +24922,175 @@ public static final class TripDescriptor extends
/* minor= */ 34,
/* patch= */ 0,
/* suffix= */ "",
- "TripDescriptor");
+ "Position");
}
- // Use TripDescriptor.newBuilder() to construct.
- private TripDescriptor(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ // Use Position.newBuilder() to construct.
+ private Position(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
super(builder);
}
- private TripDescriptor() {
- tripId_ = "";
- routeId_ = "";
- startTime_ = "";
- startDate_ = "";
- scheduleRelationship_ = 0;
+ private Position() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_fieldAccessorTable
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder.class);
+ com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
}
+ private int bitField0_;
+ public static final int LATITUDE_FIELD_NUMBER = 1;
+ private float latitude_ = 0F;
/**
*
- * The relation between this trip and the static schedule. If a trip is done
- * in accordance with temporary schedule, not reflected in GTFS, then it
- * shouldn't be marked as SCHEDULED, but likely as ADDED.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * Protobuf enum {@code transit_realtime.TripDescriptor.ScheduleRelationship}
+ * required float latitude = 1;
+ * @return Whether the latitude field is set.
*/
- public enum ScheduleRelationship
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- * Trip that is running in accordance with its GTFS schedule, or is close
- * enough to the scheduled trip to be associated with it.
- *
- *
- * SCHEDULED = 0;
- */
- SCHEDULED(0),
- /**
- *
- * An extra trip that was added in addition to a running schedule, for
- * example, to replace a broken vehicle or to respond to sudden passenger
- * load.
- * NOTE: Currently, behavior is unspecified for feeds that use this mode. There are discussions on the GTFS GitHub
- * [(1)](https://github.com/google/transit/issues/106) [(2)](https://github.com/google/transit/pull/221)
- * [(3)](https://github.com/google/transit/pull/219) around fully specifying or deprecating ADDED trips and the
- * documentation will be updated when those discussions are finalized.
- *
- *
- * ADDED = 1;
- */
- ADDED(1),
- /**
- *
- * A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
- * Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
- *
- *
- * UNSCHEDULED = 2;
- */
- UNSCHEDULED(2),
- /**
- *
- * A trip that existed in the schedule but was removed.
- *
- *
- * CANCELED = 3;
- */
- CANCELED(3),
- /**
- *
- * Should not be used - for backwards-compatibility only.
- *
- *
- * REPLACEMENT = 5 [deprecated = true];
- */
- @java.lang.Deprecated
- REPLACEMENT(5),
- /**
- *
- * An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
- * respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
- * and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
- * date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
- * (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
- * identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
- * TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
- * TripUpdate with the value of CANCELED. Trips defined in GTFS frequencies.txt with exact_times that is empty or
- * equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
- * the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
- * must also be set to DUPLICATED.
- * Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
- * the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
- * to transition to the DUPLICATED enumeration.
- * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * DUPLICATED = 6;
- */
- DUPLICATED(6),
- ;
-
- static {
- com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
- com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
- /* major= */ 4,
- /* minor= */ 34,
- /* patch= */ 0,
- /* suffix= */ "",
- "ScheduleRelationship");
- }
- /**
- *
- * Trip that is running in accordance with its GTFS schedule, or is close
- * enough to the scheduled trip to be associated with it.
- *
- *
- * SCHEDULED = 0;
- */
- public static final int SCHEDULED_VALUE = 0;
- /**
- *
- * An extra trip that was added in addition to a running schedule, for
- * example, to replace a broken vehicle or to respond to sudden passenger
- * load.
- * NOTE: Currently, behavior is unspecified for feeds that use this mode. There are discussions on the GTFS GitHub
- * [(1)](https://github.com/google/transit/issues/106) [(2)](https://github.com/google/transit/pull/221)
- * [(3)](https://github.com/google/transit/pull/219) around fully specifying or deprecating ADDED trips and the
- * documentation will be updated when those discussions are finalized.
- *
- *
- * ADDED = 1;
- */
- public static final int ADDED_VALUE = 1;
- /**
- *
- * A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
- * Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
- *
- *
- * UNSCHEDULED = 2;
- */
- public static final int UNSCHEDULED_VALUE = 2;
- /**
- *
- * A trip that existed in the schedule but was removed.
- *
- *
- * CANCELED = 3;
- */
- public static final int CANCELED_VALUE = 3;
- /**
- *
- * Should not be used - for backwards-compatibility only.
- *
- *
- * REPLACEMENT = 5 [deprecated = true];
- */
- @java.lang.Deprecated public static final int REPLACEMENT_VALUE = 5;
- /**
- *
- * An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
- * respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
- * and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
- * date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
- * (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
- * identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
- * TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
- * TripUpdate with the value of CANCELED. Trips defined in GTFS frequencies.txt with exact_times that is empty or
- * equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
- * the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
- * must also be set to DUPLICATED.
- * Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
- * the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
- * to transition to the DUPLICATED enumeration.
- * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * DUPLICATED = 6;
- */
- public static final int DUPLICATED_VALUE = 6;
-
-
- public final int getNumber() {
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static ScheduleRelationship valueOf(int value) {
- return forNumber(value);
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- */
- public static ScheduleRelationship forNumber(int value) {
- switch (value) {
- case 0: return SCHEDULED;
- case 1: return ADDED;
- case 2: return UNSCHEDULED;
- case 3: return CANCELED;
- case 5: return REPLACEMENT;
- case 6: return DUPLICATED;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- ScheduleRelationship> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public ScheduleRelationship findValueByNumber(int number) {
- return ScheduleRelationship.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValue(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDescriptor().getEnumType(0);
- }
-
- private static final ScheduleRelationship[] VALUES = values();
-
- public static ScheduleRelationship valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private ScheduleRelationship(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.TripDescriptor.ScheduleRelationship)
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
}
-
- private int bitField0_;
- public static final int TRIP_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object tripId_ = "";
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return Whether the tripId field is set.
+ * required float latitude = 1;
+ * @return The latitude.
*/
@java.lang.Override
- public boolean hasTripId() {
- return ((bitField0_ & 0x00000001) != 0);
+ public float getLatitude() {
+ return latitude_;
}
+
+ public static final int LONGITUDE_FIELD_NUMBER = 2;
+ private float longitude_ = 0F;
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return The tripId.
+ * required float longitude = 2;
+ * @return Whether the longitude field is set.
*/
@java.lang.Override
- public java.lang.String getTripId() {
- java.lang.Object ref = tripId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tripId_ = s;
- }
- return s;
- }
- }
- /**
- *
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
- *
- *
- * optional string trip_id = 1;
- * @return The bytes for tripId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getTripIdBytes() {
- java.lang.Object ref = tripId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- tripId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ROUTE_ID_FIELD_NUMBER = 5;
- @SuppressWarnings("serial")
- private volatile java.lang.Object routeId_ = "";
- /**
- *
- * The route_id from the GTFS that this selector refers to.
- *
- *
- * optional string route_id = 5;
- * @return Whether the routeId field is set.
- */
- @java.lang.Override
- public boolean hasRouteId() {
+ public boolean hasLongitude() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
- * The route_id from the GTFS that this selector refers to.
- *
- *
- * optional string route_id = 5;
- * @return The routeId.
- */
- @java.lang.Override
- public java.lang.String getRouteId() {
- java.lang.Object ref = routeId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- routeId_ = s;
- }
- return s;
- }
- }
- /**
- *
- * The route_id from the GTFS that this selector refers to.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string route_id = 5;
- * @return The bytes for routeId.
+ * required float longitude = 2;
+ * @return The longitude.
*/
@java.lang.Override
- public com.google.protobuf.ByteString
- getRouteIdBytes() {
- java.lang.Object ref = routeId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- routeId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
+ public float getLongitude() {
+ return longitude_;
}
- public static final int DIRECTION_ID_FIELD_NUMBER = 6;
- private int directionId_ = 0;
+ public static final int BEARING_FIELD_NUMBER = 3;
+ private float bearing_ = 0F;
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional uint32 direction_id = 6;
- * @return Whether the directionId field is set.
+ * optional float bearing = 3;
+ * @return Whether the bearing field is set.
*/
@java.lang.Override
- public boolean hasDirectionId() {
+ public boolean hasBearing() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional uint32 direction_id = 6;
- * @return The directionId.
+ * optional float bearing = 3;
+ * @return The bearing.
*/
@java.lang.Override
- public int getDirectionId() {
- return directionId_;
+ public float getBearing() {
+ return bearing_;
}
- public static final int START_TIME_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object startTime_ = "";
+ public static final int ODOMETER_FIELD_NUMBER = 4;
+ private double odometer_ = 0D;
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Odometer value, in meters.
*
*
- * optional string start_time = 2;
- * @return Whether the startTime field is set.
+ * optional double odometer = 4;
+ * @return Whether the odometer field is set.
*/
@java.lang.Override
- public boolean hasStartTime() {
+ public boolean hasOdometer() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- *
- *
- * optional string start_time = 2;
- * @return The startTime.
- */
- @java.lang.Override
- public java.lang.String getStartTime() {
- java.lang.Object ref = startTime_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- startTime_ = s;
- }
- return s;
- }
- }
- /**
- *
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Odometer value, in meters.
*
*
- * optional string start_time = 2;
- * @return The bytes for startTime.
+ * optional double odometer = 4;
+ * @return The odometer.
*/
@java.lang.Override
- public com.google.protobuf.ByteString
- getStartTimeBytes() {
- java.lang.Object ref = startTime_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- startTime_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
+ public double getOdometer() {
+ return odometer_;
}
- public static final int START_DATE_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private volatile java.lang.Object startDate_ = "";
+ public static final int SPEED_FIELD_NUMBER = 5;
+ private float speed_ = 0F;
/**
*
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_date = 3;
- * @return Whether the startDate field is set.
+ * optional float speed = 5;
+ * @return Whether the speed field is set.
*/
@java.lang.Override
- public boolean hasStartDate() {
+ public boolean hasSpeed() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @return The startDate.
- */
- @java.lang.Override
- public java.lang.String getStartDate() {
- java.lang.Object ref = startDate_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- startDate_ = s;
- }
- return s;
- }
- }
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_date = 3;
- * @return The bytes for startDate.
+ * optional float speed = 5;
+ * @return The speed.
*/
@java.lang.Override
- public com.google.protobuf.ByteString
- getStartDateBytes() {
- java.lang.Object ref = startDate_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- startDate_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 4;
- private int scheduleRelationship_ = 0;
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return Whether the scheduleRelationship field is set.
- */
- @java.lang.Override public boolean hasScheduleRelationship() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return The scheduleRelationship.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
+ public float getSpeed() {
+ return speed_;
}
private byte memoizedIsInitialized = -1;
@@ -22923,6 +25100,14 @@ public final boolean isInitialized() {
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
+ if (!hasLatitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasLongitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
@@ -22938,22 +25123,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
.ExtendableMessage.ExtensionSerializer
extensionWriter = newExtensionSerializer();
if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, tripId_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 2, startTime_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 3, startDate_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeEnum(4, scheduleRelationship_);
+ output.writeFloat(1, latitude_);
}
if (((bitField0_ & 0x00000002) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 5, routeId_);
+ output.writeFloat(2, longitude_);
}
if (((bitField0_ & 0x00000004) != 0)) {
- output.writeUInt32(6, directionId_);
+ output.writeFloat(3, bearing_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeDouble(4, odometer_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeFloat(5, speed_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
@@ -22966,24 +25148,24 @@ public int getSerializedSize() {
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tripId_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(2, startTime_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(3, startDate_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(4, scheduleRelationship_);
+ .computeFloatSize(1, latitude_);
}
if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(5, routeId_);
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(2, longitude_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(6, directionId_);
+ .computeFloatSize(3, bearing_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, odometer_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(5, speed_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
@@ -22996,39 +25178,40 @@ public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor)) {
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Position)) {
return super.equals(obj);
}
- com.google.transit.realtime.GtfsRealtime.TripDescriptor other = (com.google.transit.realtime.GtfsRealtime.TripDescriptor) obj;
+ com.google.transit.realtime.GtfsRealtime.Position other = (com.google.transit.realtime.GtfsRealtime.Position) obj;
- if (hasTripId() != other.hasTripId()) return false;
- if (hasTripId()) {
- if (!getTripId()
- .equals(other.getTripId())) return false;
- }
- if (hasRouteId() != other.hasRouteId()) return false;
- if (hasRouteId()) {
- if (!getRouteId()
- .equals(other.getRouteId())) return false;
+ if (hasLatitude() != other.hasLatitude()) return false;
+ if (hasLatitude()) {
+ if (java.lang.Float.floatToIntBits(getLatitude())
+ != java.lang.Float.floatToIntBits(
+ other.getLatitude())) return false;
}
- if (hasDirectionId() != other.hasDirectionId()) return false;
- if (hasDirectionId()) {
- if (getDirectionId()
- != other.getDirectionId()) return false;
+ if (hasLongitude() != other.hasLongitude()) return false;
+ if (hasLongitude()) {
+ if (java.lang.Float.floatToIntBits(getLongitude())
+ != java.lang.Float.floatToIntBits(
+ other.getLongitude())) return false;
}
- if (hasStartTime() != other.hasStartTime()) return false;
- if (hasStartTime()) {
- if (!getStartTime()
- .equals(other.getStartTime())) return false;
+ if (hasBearing() != other.hasBearing()) return false;
+ if (hasBearing()) {
+ if (java.lang.Float.floatToIntBits(getBearing())
+ != java.lang.Float.floatToIntBits(
+ other.getBearing())) return false;
}
- if (hasStartDate() != other.hasStartDate()) return false;
- if (hasStartDate()) {
- if (!getStartDate()
- .equals(other.getStartDate())) return false;
+ if (hasOdometer() != other.hasOdometer()) return false;
+ if (hasOdometer()) {
+ if (java.lang.Double.doubleToLongBits(getOdometer())
+ != java.lang.Double.doubleToLongBits(
+ other.getOdometer())) return false;
}
- if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
- if (hasScheduleRelationship()) {
- if (scheduleRelationship_ != other.scheduleRelationship_) return false;
+ if (hasSpeed() != other.hasSpeed()) return false;
+ if (hasSpeed()) {
+ if (java.lang.Float.floatToIntBits(getSpeed())
+ != java.lang.Float.floatToIntBits(
+ other.getSpeed())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
@@ -23043,29 +25226,30 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- if (hasTripId()) {
- hash = (37 * hash) + TRIP_ID_FIELD_NUMBER;
- hash = (53 * hash) + getTripId().hashCode();
- }
- if (hasRouteId()) {
- hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
- hash = (53 * hash) + getRouteId().hashCode();
+ if (hasLatitude()) {
+ hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getLatitude());
}
- if (hasDirectionId()) {
- hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getDirectionId();
+ if (hasLongitude()) {
+ hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getLongitude());
}
- if (hasStartTime()) {
- hash = (37 * hash) + START_TIME_FIELD_NUMBER;
- hash = (53 * hash) + getStartTime().hashCode();
+ if (hasBearing()) {
+ hash = (37 * hash) + BEARING_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getBearing());
}
- if (hasStartDate()) {
- hash = (37 * hash) + START_DATE_FIELD_NUMBER;
- hash = (53 * hash) + getStartDate().hashCode();
+ if (hasOdometer()) {
+ hash = (37 * hash) + ODOMETER_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getOdometer()));
}
- if (hasScheduleRelationship()) {
- hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
- hash = (53 * hash) + scheduleRelationship_;
+ if (hasSpeed()) {
+ hash = (37 * hash) + SPEED_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getSpeed());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
@@ -23073,44 +25257,44 @@ public int hashCode() {
return hash;
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(byte[] data)
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(java.io.InputStream input)
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -23118,26 +25302,26 @@ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(java.io.InputStream input)
+ public static com.google.transit.realtime.GtfsRealtime.Position parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -23150,7 +25334,7 @@ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripDescriptor prototype) {
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Position prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -23167,38 +25351,30 @@ protected Builder newBuilderForType(
}
/**
*
- * A descriptor that identifies an instance of a GTFS trip, or all instances of
- * a trip along a route.
- * - To specify a single trip instance, the trip_id (and if necessary,
- * start_time) is set. If route_id is also set, then it should be same as one
- * that the given trip corresponds to.
- * - To specify all the trips along a given route, only the route_id should be
- * set. Note that if the trip_id is not known, then stop sequence ids in
- * TripUpdate are not sufficient, and stop_ids must be provided as well. In
- * addition, absolute arrival/departure times must be provided.
+ * A position.
*
*
- * Protobuf type {@code transit_realtime.TripDescriptor}
+ * Protobuf type {@code transit_realtime.Position}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TripDescriptor)
- com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ com.google.transit.realtime.GtfsRealtime.Position, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.Position)
+ com.google.transit.realtime.GtfsRealtime.PositionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_fieldAccessorTable
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder.class);
+ com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
}
- // Construct using com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder()
+ // Construct using com.google.transit.realtime.GtfsRealtime.Position.newBuilder()
private Builder() {
}
@@ -23212,29 +25388,28 @@ private Builder(
public Builder clear() {
super.clear();
bitField0_ = 0;
- tripId_ = "";
- routeId_ = "";
- directionId_ = 0;
- startTime_ = "";
- startDate_ = "";
- scheduleRelationship_ = 0;
+ latitude_ = 0F;
+ longitude_ = 0F;
+ bearing_ = 0F;
+ odometer_ = 0D;
+ speed_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance();
+ public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance();
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor build() {
- com.google.transit.realtime.GtfsRealtime.TripDescriptor result = buildPartial();
+ public com.google.transit.realtime.GtfsRealtime.Position build() {
+ com.google.transit.realtime.GtfsRealtime.Position result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -23242,103 +25417,88 @@ public com.google.transit.realtime.GtfsRealtime.TripDescriptor build() {
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TripDescriptor result = new com.google.transit.realtime.GtfsRealtime.TripDescriptor(this);
+ public com.google.transit.realtime.GtfsRealtime.Position buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.Position result = new com.google.transit.realtime.GtfsRealtime.Position(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripDescriptor result) {
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Position result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
- result.tripId_ = tripId_;
+ result.latitude_ = latitude_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
- result.routeId_ = routeId_;
+ result.longitude_ = longitude_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
- result.directionId_ = directionId_;
+ result.bearing_ = bearing_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
- result.startTime_ = startTime_;
+ result.odometer_ = odometer_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
- result.startDate_ = startDate_;
+ result.speed_ = speed_;
to_bitField0_ |= 0x00000010;
}
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.scheduleRelationship_ = scheduleRelationship_;
- to_bitField0_ |= 0x00000020;
- }
result.bitField0_ |= to_bitField0_;
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, Type> extension,
+ com.google.transit.realtime.GtfsRealtime.Position, Type> extension,
Type value) {
return super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, java.util.List> extension,
+ com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
int index, Type value) {
return super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, java.util.List> extension,
+ com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
Type value) {
return super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, Type> extension) {
+ com.google.transit.realtime.GtfsRealtime.Position, Type> extension) {
return super.clearExtension(extension);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripDescriptor)other);
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.Position) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.Position)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripDescriptor other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) return this;
- if (other.hasTripId()) {
- tripId_ = other.tripId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasRouteId()) {
- routeId_ = other.routeId_;
- bitField0_ |= 0x00000002;
- onChanged();
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this;
+ if (other.hasLatitude()) {
+ setLatitude(other.getLatitude());
}
- if (other.hasDirectionId()) {
- setDirectionId(other.getDirectionId());
+ if (other.hasLongitude()) {
+ setLongitude(other.getLongitude());
}
- if (other.hasStartTime()) {
- startTime_ = other.startTime_;
- bitField0_ |= 0x00000008;
- onChanged();
+ if (other.hasBearing()) {
+ setBearing(other.getBearing());
}
- if (other.hasStartDate()) {
- startDate_ = other.startDate_;
- bitField0_ |= 0x00000010;
- onChanged();
+ if (other.hasOdometer()) {
+ setOdometer(other.getOdometer());
}
- if (other.hasScheduleRelationship()) {
- setScheduleRelationship(other.getScheduleRelationship());
+ if (other.hasSpeed()) {
+ setSpeed(other.getSpeed());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
@@ -23348,6 +25508,12 @@ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripDescriptor
@java.lang.Override
public final boolean isInitialized() {
+ if (!hasLatitude()) {
+ return false;
+ }
+ if (!hasLongitude()) {
+ return false;
+ }
if (!extensionsAreInitialized()) {
return false;
}
@@ -23370,43 +25536,31 @@ public Builder mergeFrom(
case 0:
done = true;
break;
- case 10: {
- tripId_ = input.readBytes();
+ case 13: {
+ latitude_ = input.readFloat();
bitField0_ |= 0x00000001;
break;
- } // case 10
- case 18: {
- startTime_ = input.readBytes();
- bitField0_ |= 0x00000008;
- break;
- } // case 18
- case 26: {
- startDate_ = input.readBytes();
- bitField0_ |= 0x00000010;
- break;
- } // case 26
- case 32: {
- int tmpRaw = input.readEnum();
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship tmpValue =
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(tmpRaw);
- if (tmpValue == null) {
- mergeUnknownVarintField(4, tmpRaw);
- } else {
- scheduleRelationship_ = tmpRaw;
- bitField0_ |= 0x00000020;
- }
- break;
- } // case 32
- case 42: {
- routeId_ = input.readBytes();
+ } // case 13
+ case 21: {
+ longitude_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
- } // case 42
- case 48: {
- directionId_ = input.readUInt32();
+ } // case 21
+ case 29: {
+ bearing_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
- } // case 48
+ } // case 29
+ case 33: {
+ odometer_ = input.readDouble();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 33
+ case 45: {
+ speed_ = input.readFloat();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 45
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -23424,707 +25578,319 @@ public Builder mergeFrom(
}
private int bitField0_;
- private java.lang.Object tripId_ = "";
+ private float latitude_ ;
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return Whether the tripId field is set.
+ * required float latitude = 1;
+ * @return Whether the latitude field is set.
*/
- public boolean hasTripId() {
+ @java.lang.Override
+ public boolean hasLatitude() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return The tripId.
+ * required float latitude = 1;
+ * @return The latitude.
*/
- public java.lang.String getTripId() {
- java.lang.Object ref = tripId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tripId_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
+ @java.lang.Override
+ public float getLatitude() {
+ return latitude_;
}
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return The bytes for tripId.
+ * required float latitude = 1;
+ * @param value The latitude to set.
+ * @return This builder for chaining.
*/
- public com.google.protobuf.ByteString
- getTripIdBytes() {
- java.lang.Object ref = tripId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- tripId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
+ public Builder setLatitude(float value) {
+
+ latitude_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
}
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees North, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @param value The tripId to set.
+ * required float latitude = 1;
* @return This builder for chaining.
*/
- public Builder setTripId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- tripId_ = value;
- bitField0_ |= 0x00000001;
+ public Builder clearLatitude() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ latitude_ = 0F;
onChanged();
return this;
}
+
+ private float longitude_ ;
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @return This builder for chaining.
+ * required float longitude = 2;
+ * @return Whether the longitude field is set.
*/
- public Builder clearTripId() {
- tripId_ = getDefaultInstance().getTripId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
*
- * The trip_id from the GTFS feed that this selector refers to.
- * For non frequency-based trips, this field is enough to uniquely identify
- * the trip. For frequency-based trip, start_time and start_date might also be
- * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string trip_id = 1;
- * @param value The bytes for tripId to set.
- * @return This builder for chaining.
+ * required float longitude = 2;
+ * @return The longitude.
*/
- public Builder setTripIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- tripId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
+ @java.lang.Override
+ public float getLongitude() {
+ return longitude_;
}
-
- private java.lang.Object routeId_ = "";
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string route_id = 5;
- * @return Whether the routeId field is set.
+ * required float longitude = 2;
+ * @param value The longitude to set.
+ * @return This builder for chaining.
*/
- public boolean hasRouteId() {
- return ((bitField0_ & 0x00000002) != 0);
+ public Builder setLongitude(float value) {
+
+ longitude_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
}
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Degrees East, in the WGS-84 coordinate system.
*
*
- * optional string route_id = 5;
- * @return The routeId.
+ * required float longitude = 2;
+ * @return This builder for chaining.
*/
- public java.lang.String getRouteId() {
- java.lang.Object ref = routeId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- routeId_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
+ public Builder clearLongitude() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ longitude_ = 0F;
+ onChanged();
+ return this;
}
+
+ private float bearing_ ;
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional string route_id = 5;
- * @return The bytes for routeId.
+ * optional float bearing = 3;
+ * @return Whether the bearing field is set.
*/
- public com.google.protobuf.ByteString
- getRouteIdBytes() {
- java.lang.Object ref = routeId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- routeId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
+ @java.lang.Override
+ public boolean hasBearing() {
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional string route_id = 5;
- * @param value The routeId to set.
- * @return This builder for chaining.
+ * optional float bearing = 3;
+ * @return The bearing.
*/
- public Builder setRouteId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- routeId_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
+ @java.lang.Override
+ public float getBearing() {
+ return bearing_;
}
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional string route_id = 5;
+ * optional float bearing = 3;
+ * @param value The bearing to set.
* @return This builder for chaining.
*/
- public Builder clearRouteId() {
- routeId_ = getDefaultInstance().getRouteId();
- bitField0_ = (bitField0_ & ~0x00000002);
+ public Builder setBearing(float value) {
+
+ bearing_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
- * The route_id from the GTFS that this selector refers to.
+ * Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
+ * This can be the compass bearing, or the direction towards the next stop
+ * or intermediate location.
+ * This should not be direction deduced from the sequence of previous
+ * positions, which can be computed from previous data.
*
*
- * optional string route_id = 5;
- * @param value The bytes for routeId to set.
+ * optional float bearing = 3;
* @return This builder for chaining.
*/
- public Builder setRouteIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- routeId_ = value;
- bitField0_ |= 0x00000002;
+ public Builder clearBearing() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ bearing_ = 0F;
onChanged();
return this;
}
- private int directionId_ ;
+ private double odometer_ ;
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Odometer value, in meters.
*
*
- * optional uint32 direction_id = 6;
- * @return Whether the directionId field is set.
+ * optional double odometer = 4;
+ * @return Whether the odometer field is set.
*/
@java.lang.Override
- public boolean hasDirectionId() {
- return ((bitField0_ & 0x00000004) != 0);
+ public boolean hasOdometer() {
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Odometer value, in meters.
*
*
- * optional uint32 direction_id = 6;
- * @return The directionId.
+ * optional double odometer = 4;
+ * @return The odometer.
*/
@java.lang.Override
- public int getDirectionId() {
- return directionId_;
+ public double getOdometer() {
+ return odometer_;
}
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Odometer value, in meters.
*
*
- * optional uint32 direction_id = 6;
- * @param value The directionId to set.
+ * optional double odometer = 4;
+ * @param value The odometer to set.
* @return This builder for chaining.
*/
- public Builder setDirectionId(int value) {
+ public Builder setOdometer(double value) {
- directionId_ = value;
- bitField0_ |= 0x00000004;
+ odometer_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
- * The direction_id from the GTFS feed trips.txt file, indicating the
- * direction of travel for trips this selector refers to.
+ * Odometer value, in meters.
*
*
- * optional uint32 direction_id = 6;
+ * optional double odometer = 4;
* @return This builder for chaining.
*/
- public Builder clearDirectionId() {
- bitField0_ = (bitField0_ & ~0x00000004);
- directionId_ = 0;
+ public Builder clearOdometer() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ odometer_ = 0D;
onChanged();
return this;
}
- private java.lang.Object startTime_ = "";
+ private float speed_ ;
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_time = 2;
- * @return Whether the startTime field is set.
+ * optional float speed = 5;
+ * @return Whether the speed field is set.
*/
- public boolean hasStartTime() {
- return ((bitField0_ & 0x00000008) != 0);
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000010) != 0);
}
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_time = 2;
- * @return The startTime.
+ * optional float speed = 5;
+ * @return The speed.
*/
- public java.lang.String getStartTime() {
- java.lang.Object ref = startTime_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- startTime_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- *
- *
- * optional string start_time = 2;
- * @return The bytes for startTime.
- */
- public com.google.protobuf.ByteString
- getStartTimeBytes() {
- java.lang.Object ref = startTime_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- startTime_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- *
- *
- * optional string start_time = 2;
- * @param value The startTime to set.
- * @return This builder for chaining.
- */
- public Builder setStartTime(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- startTime_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- *
- *
- * optional string start_time = 2;
- * @return This builder for chaining.
- */
- public Builder clearStartTime() {
- startTime_ = getDefaultInstance().getStartTime();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
+ @java.lang.Override
+ public float getSpeed() {
+ return speed_;
}
/**
*
- * The initially scheduled start time of this trip instance.
- * When the trip_id corresponds to a non-frequency-based trip, this field
- * should either be omitted or be equal to the value in the GTFS feed. When
- * the trip_id correponds to a frequency-based trip, the start_time must be
- * specified for trip updates and vehicle positions. If the trip corresponds
- * to exact_times=1 GTFS record, then start_time must be some multiple
- * (including zero) of headway_secs later than frequencies.txt start_time for
- * the corresponding time period. If the trip corresponds to exact_times=0,
- * then its start_time may be arbitrary, and is initially expected to be the
- * first departure of the trip. Once established, the start_time of this
- * frequency-based trip should be considered immutable, even if the first
- * departure time changes -- that time change may instead be reflected in a
- * StopTimeUpdate.
- * Format and semantics of the field is same as that of
- * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_time = 2;
- * @param value The bytes for startTime to set.
+ * optional float speed = 5;
+ * @param value The speed to set.
* @return This builder for chaining.
*/
- public Builder setStartTimeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- startTime_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
+ public Builder setSpeed(float value) {
- private java.lang.Object startDate_ = "";
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @return Whether the startDate field is set.
- */
- public boolean hasStartDate() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @return The startDate.
- */
- public java.lang.String getStartDate() {
- java.lang.Object ref = startDate_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- startDate_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @return The bytes for startDate.
- */
- public com.google.protobuf.ByteString
- getStartDateBytes() {
- java.lang.Object ref = startDate_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- startDate_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @param value The startDate to set.
- * @return This builder for chaining.
- */
- public Builder setStartDate(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- startDate_ = value;
+ speed_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
+ * Momentary speed measured by the vehicle, in meters per second.
*
*
- * optional string start_date = 3;
+ * optional float speed = 5;
* @return This builder for chaining.
*/
- public Builder clearStartDate() {
- startDate_ = getDefaultInstance().getStartDate();
+ public Builder clearSpeed() {
bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- /**
- *
- * The scheduled start date of this trip instance.
- * Must be provided to disambiguate trips that are so late as to collide with
- * a scheduled trip on a next day. For example, for a train that departs 8:00
- * and 20:00 every day, and is 12 hours late, there would be two distinct
- * trips on the same time.
- * This field can be provided but is not mandatory for schedules in which such
- * collisions are impossible - for example, a service running on hourly
- * schedule where a vehicle that is one hour late is not considered to be
- * related to schedule anymore.
- * In YYYYMMDD format.
- *
- *
- * optional string start_date = 3;
- * @param value The bytes for startDate to set.
- * @return This builder for chaining.
- */
- public Builder setStartDateBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- startDate_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
-
- private int scheduleRelationship_ = 0;
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return Whether the scheduleRelationship field is set.
- */
- @java.lang.Override public boolean hasScheduleRelationship() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return The scheduleRelationship.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
- }
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @param value The scheduleRelationship to set.
- * @return This builder for chaining.
- */
- public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value) {
- if (value == null) { throw new NullPointerException(); }
- bitField0_ |= 0x00000020;
- scheduleRelationship_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
- * @return This builder for chaining.
- */
- public Builder clearScheduleRelationship() {
- bitField0_ = (bitField0_ & ~0x00000020);
- scheduleRelationship_ = 0;
+ speed_ = 0F;
onChanged();
return this;
}
- // @@protoc_insertion_point(builder_scope:transit_realtime.TripDescriptor)
+ // @@protoc_insertion_point(builder_scope:transit_realtime.Position)
}
- // @@protoc_insertion_point(class_scope:transit_realtime.TripDescriptor)
- private static final com.google.transit.realtime.GtfsRealtime.TripDescriptor DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:transit_realtime.Position)
+ private static final com.google.transit.realtime.GtfsRealtime.Position DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripDescriptor();
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Position();
}
- public static com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstance() {
+ public static com.google.transit.realtime.GtfsRealtime.Position getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
- public TripDescriptor parsePartialFrom(
+ public Position parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -24143,2040 +25909,18640 @@ public TripDescriptor parsePartialFrom(
}
};
- public static com.google.protobuf.Parser parser() {
+ public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
+ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
+ public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
- public interface VehicleDescriptorOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.VehicleDescriptor)
+ public interface TripDescriptorOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripDescriptor)
com.google.protobuf.GeneratedMessage.
- ExtendableMessageOrBuilder {
+ ExtendableMessageOrBuilder {
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
- * optional string id = 1;
- * @return Whether the id field is set.
+ * optional string trip_id = 1;
+ * @return Whether the tripId field is set.
*/
- boolean hasId();
+ boolean hasTripId();
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
- * optional string id = 1;
- * @return The id.
+ * optional string trip_id = 1;
+ * @return The tripId.
*/
- java.lang.String getId();
+ java.lang.String getTripId();
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
- * optional string id = 1;
- * @return The bytes for id.
+ * optional string trip_id = 1;
+ * @return The bytes for tripId.
*/
com.google.protobuf.ByteString
- getIdBytes();
+ getTripIdBytes();
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * The route_id from the GTFS that this selector refers to.
*
*
- * optional string label = 2;
- * @return Whether the label field is set.
+ * optional string route_id = 5;
+ * @return Whether the routeId field is set.
*/
- boolean hasLabel();
+ boolean hasRouteId();
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * The route_id from the GTFS that this selector refers to.
*
*
- * optional string label = 2;
- * @return The label.
+ * optional string route_id = 5;
+ * @return The routeId.
*/
- java.lang.String getLabel();
+ java.lang.String getRouteId();
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * The route_id from the GTFS that this selector refers to.
*
*
- * optional string label = 2;
- * @return The bytes for label.
+ * optional string route_id = 5;
+ * @return The bytes for routeId.
*/
com.google.protobuf.ByteString
- getLabelBytes();
+ getRouteIdBytes();
/**
*
- * The license plate of the vehicle.
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
*
*
- * optional string license_plate = 3;
- * @return Whether the licensePlate field is set.
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
*/
- boolean hasLicensePlate();
+ boolean hasDirectionId();
/**
*
- * The license plate of the vehicle.
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
*
*
- * optional string license_plate = 3;
- * @return The licensePlate.
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
*/
- java.lang.String getLicensePlate();
+ int getDirectionId();
+
/**
*
- * The license plate of the vehicle.
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
- * optional string license_plate = 3;
- * @return The bytes for licensePlate.
+ * optional string start_time = 2;
+ * @return Whether the startTime field is set.
+ */
+ boolean hasStartTime();
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The startTime.
+ */
+ java.lang.String getStartTime();
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The bytes for startTime.
*/
com.google.protobuf.ByteString
- getLicensePlateBytes();
- }
- /**
- *
- * Identification information for the vehicle performing the trip.
- *
- *
- * Protobuf type {@code transit_realtime.VehicleDescriptor}
- */
- public static final class VehicleDescriptor extends
- com.google.protobuf.GeneratedMessage.ExtendableMessage<
- VehicleDescriptor> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.VehicleDescriptor)
- VehicleDescriptorOrBuilder {
- private static final long serialVersionUID = 0L;
- static {
- com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
- com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
- /* major= */ 4,
- /* minor= */ 34,
- /* patch= */ 0,
- /* suffix= */ "",
- "VehicleDescriptor");
- }
- // Use VehicleDescriptor.newBuilder() to construct.
- private VehicleDescriptor(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
- super(builder);
- }
- private VehicleDescriptor() {
- id_ = "";
- label_ = "";
- licensePlate_ = "";
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
- }
+ getStartTimeBytes();
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object id_ = "";
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
*
*
- * optional string id = 1;
- * @return Whether the id field is set.
+ * optional string start_date = 3;
+ * @return Whether the startDate field is set.
*/
- @java.lang.Override
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
+ boolean hasStartDate();
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
*
*
- * optional string id = 1;
- * @return The id.
+ * optional string start_date = 3;
+ * @return The startDate.
*/
- @java.lang.Override
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- id_ = s;
- }
- return s;
- }
- }
+ java.lang.String getStartDate();
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
*
*
- * optional string id = 1;
- * @return The bytes for id.
+ * optional string start_date = 3;
+ * @return The bytes for startDate.
*/
- @java.lang.Override
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ com.google.protobuf.ByteString
+ getStartDateBytes();
- public static final int LABEL_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object label_ = "";
- /**
- *
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
- *
- *
- * optional string label = 2;
- * @return Whether the label field is set.
- */
- @java.lang.Override
- public boolean hasLabel() {
- return ((bitField0_ & 0x00000002) != 0);
- }
/**
- *
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
- *
- *
- * optional string label = 2;
- * @return The label.
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return Whether the scheduleRelationship field is set.
*/
- @java.lang.Override
- public java.lang.String getLabel() {
- java.lang.Object ref = label_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- label_ = s;
- }
- return s;
- }
- }
+ boolean hasScheduleRelationship();
/**
- *
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
- *
- *
- * optional string label = 2;
- * @return The bytes for label.
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return The scheduleRelationship.
*/
- @java.lang.Override
- public com.google.protobuf.ByteString
- getLabelBytes() {
- java.lang.Object ref = label_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- label_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship();
- public static final int LICENSE_PLATE_FIELD_NUMBER = 3;
- @SuppressWarnings("serial")
- private volatile java.lang.Object licensePlate_ = "";
/**
*
- * The license plate of the vehicle.
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
*
*
- * optional string license_plate = 3;
- * @return Whether the licensePlate field is set.
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return Whether the modifiedTrip field is set.
*/
- @java.lang.Override
- public boolean hasLicensePlate() {
- return ((bitField0_ & 0x00000004) != 0);
- }
+ boolean hasModifiedTrip();
/**
*
- * The license plate of the vehicle.
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
*
*
- * optional string license_plate = 3;
- * @return The licensePlate.
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return The modifiedTrip.
*/
- @java.lang.Override
- public java.lang.String getLicensePlate() {
- java.lang.Object ref = licensePlate_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- licensePlate_ = s;
- }
- return s;
- }
- }
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getModifiedTrip();
/**
*
- * The license plate of the vehicle.
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
*
*
- * optional string license_plate = 3;
- * @return The bytes for licensePlate.
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
*/
- @java.lang.Override
- public com.google.protobuf.ByteString
- getLicensePlateBytes() {
- java.lang.Object ref = licensePlate_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- licensePlate_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder getModifiedTripOrBuilder();
+ }
+ /**
+ *
+ * A descriptor that identifies an instance of a GTFS trip, or all instances of
+ * a trip along a route.
+ * - To specify a single trip instance, the trip_id (and if necessary,
+ * start_time) is set. If route_id is also set, then it should be same as one
+ * that the given trip corresponds to.
+ * - To specify all the trips along a given route, only the route_id should be
+ * set. Note that if the trip_id is not known, then stop sequence ids in
+ * TripUpdate are not sufficient, and stop_ids must be provided as well. In
+ * addition, absolute arrival/departure times must be provided.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripDescriptor}
+ */
+ public static final class TripDescriptor extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ TripDescriptor> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripDescriptor)
+ TripDescriptorOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "TripDescriptor");
}
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessage
- .ExtendableMessage.ExtensionSerializer
- extensionWriter = newExtensionSerializer();
- if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 2, label_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 3, licensePlate_);
- }
- extensionWriter.writeUntil(10000, output);
- getUnknownFields().writeTo(output);
+ // Use TripDescriptor.newBuilder() to construct.
+ private TripDescriptor(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
}
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(2, label_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(3, licensePlate_);
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
+ private TripDescriptor() {
+ tripId_ = "";
+ routeId_ = "";
+ startTime_ = "";
+ startDate_ = "";
+ scheduleRelationship_ = 0;
}
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other = (com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (!getId()
- .equals(other.getId())) return false;
- }
- if (hasLabel() != other.hasLabel()) return false;
- if (hasLabel()) {
- if (!getLabel()
- .equals(other.getLabel())) return false;
- }
- if (hasLicensePlate() != other.hasLicensePlate()) return false;
- if (hasLicensePlate()) {
- if (!getLicensePlate()
- .equals(other.getLicensePlate())) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
}
@java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasId()) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getId().hashCode();
- }
- if (hasLabel()) {
- hash = (37 * hash) + LABEL_FIELD_NUMBER;
- hash = (53 * hash) + getLabel().hashCode();
- }
- if (hasLicensePlate()) {
- hash = (37 * hash) + LICENSE_PLATE_FIELD_NUMBER;
- hash = (53 * hash) + getLicensePlate().hashCode();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
}
@java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder.class);
}
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
/**
*
- * Identification information for the vehicle performing the trip.
+ * The relation between this trip and the static schedule. If a trip is done
+ * in accordance with temporary schedule, not reflected in GTFS, then it
+ * shouldn't be marked as SCHEDULED, but likely as ADDED.
*
*
- * Protobuf type {@code transit_realtime.VehicleDescriptor}
+ * Protobuf enum {@code transit_realtime.TripDescriptor.ScheduleRelationship}
*/
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.VehicleDescriptor)
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- id_ = "";
- label_ = "";
- licensePlate_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor build() {
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor buildPartial() {
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.label_ = label_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.licensePlate_ = licensePlate_;
- to_bitField0_ |= 0x00000004;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Type> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other) {
- if (other == com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) return this;
- if (other.hasId()) {
- id_ = other.id_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasLabel()) {
- label_ = other.label_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.hasLicensePlate()) {
- licensePlate_ = other.licensePlate_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!extensionsAreInitialized()) {
- return false;
- }
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- id_ = input.readBytes();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- label_ = input.readBytes();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26: {
- licensePlate_ = input.readBytes();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- default: {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
- private int bitField0_;
-
- private java.lang.Object id_ = "";
+ public enum ScheduleRelationship
+ implements com.google.protobuf.ProtocolMessageEnum {
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * Trip that is running in accordance with its GTFS schedule, or is close
+ * enough to the scheduled trip to be associated with it.
*
*
- * optional string id = 1;
- * @return Whether the id field is set.
+ * SCHEDULED = 0;
*/
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
+ SCHEDULED(0),
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * This value has been deprecated as the behavior was unspecified.
+ * Use DUPLICATED for an extra trip that is the same as a scheduled trip except the start date or time,
+ * or NEW for an extra trip that is unrelated to an existing trip.
*
*
- * optional string id = 1;
- * @return The id.
+ * ADDED = 1 [deprecated = true];
*/
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- id_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
+ @java.lang.Deprecated
+ ADDED(1),
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
+ * Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
*
*
- * optional string id = 1;
- * @return The bytes for id.
+ * UNSCHEDULED = 2;
*/
- public com.google.protobuf.ByteString
- getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ UNSCHEDULED(2),
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * A trip that existed in the schedule but was removed.
*
*
- * optional string id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
+ * CANCELED = 3;
*/
- public Builder setId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- id_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
+ CANCELED(3),
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * A trip that replaces an existing trip in the schedule.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string id = 1;
- * @return This builder for chaining.
+ * REPLACEMENT = 5;
*/
- public Builder clearId() {
- id_ = getDefaultInstance().getId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
+ REPLACEMENT(5),
/**
*
- * Internal system identification of the vehicle. Should be unique per
- * vehicle, and can be used for tracking the vehicle as it proceeds through
- * the system.
+ * An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
+ * respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
+ * and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
+ * date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
+ * (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
+ * identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
+ * TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
+ * TripUpdate with the value of CANCELED or DELETED. If a producer wants to replace the original trip, a value of
+ * `REPLACEMENT` should be used instead.
+ *
+ * Trips defined in GTFS frequencies.txt with exact_times that is
+ * empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
+ * the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
+ * must also be set to DUPLICATED.
+ * Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
+ * the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
+ * to transition to the DUPLICATED enumeration.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string id = 1;
- * @param value The bytes for id to set.
- * @return This builder for chaining.
+ * DUPLICATED = 6;
*/
- public Builder setIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- id_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object label_ = "";
+ DUPLICATED(6),
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * A trip that existed in the schedule but was removed and must not be shown to users.
+ * DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove
+ * information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to
+ * riders, e.g. a trip that is entirely being replaced by another trip.
+ * This designation becomes particularly important if several trips are cancelled and replaced with substitute service.
+ * If consumers were to show explicit information about the cancellations it would distract from the more important
+ * real-time predictions.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string label = 2;
- * @return Whether the label field is set.
+ * DELETED = 7;
*/
- public boolean hasLabel() {
- return ((bitField0_ & 0x00000002) != 0);
- }
+ DELETED(7),
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * An extra trip unrelated to any existing trips, for example, to respond to sudden passenger load.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string label = 2;
- * @return The label.
+ * NEW = 8;
*/
- public java.lang.String getLabel() {
- java.lang.Object ref = label_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- label_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
+ NEW(8),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "ScheduleRelationship");
}
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * Trip that is running in accordance with its GTFS schedule, or is close
+ * enough to the scheduled trip to be associated with it.
*
*
- * optional string label = 2;
- * @return The bytes for label.
+ * SCHEDULED = 0;
*/
- public com.google.protobuf.ByteString
- getLabelBytes() {
- java.lang.Object ref = label_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- label_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ public static final int SCHEDULED_VALUE = 0;
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * This value has been deprecated as the behavior was unspecified.
+ * Use DUPLICATED for an extra trip that is the same as a scheduled trip except the start date or time,
+ * or NEW for an extra trip that is unrelated to an existing trip.
*
*
- * optional string label = 2;
- * @param value The label to set.
- * @return This builder for chaining.
+ * ADDED = 1 [deprecated = true];
*/
- public Builder setLabel(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- label_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
+ @java.lang.Deprecated public static final int ADDED_VALUE = 1;
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
+ * Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
*
*
- * optional string label = 2;
- * @return This builder for chaining.
+ * UNSCHEDULED = 2;
*/
- public Builder clearLabel() {
- label_ = getDefaultInstance().getLabel();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
+ public static final int UNSCHEDULED_VALUE = 2;
/**
*
- * User visible label, i.e., something that must be shown to the passenger to
- * help identify the correct vehicle.
+ * A trip that existed in the schedule but was removed.
*
*
- * optional string label = 2;
- * @param value The bytes for label to set.
- * @return This builder for chaining.
+ * CANCELED = 3;
*/
- public Builder setLabelBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- label_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private java.lang.Object licensePlate_ = "";
+ public static final int CANCELED_VALUE = 3;
/**
*
- * The license plate of the vehicle.
+ * A trip that replaces an existing trip in the schedule.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string license_plate = 3;
- * @return Whether the licensePlate field is set.
+ * REPLACEMENT = 5;
*/
- public boolean hasLicensePlate() {
- return ((bitField0_ & 0x00000004) != 0);
- }
+ public static final int REPLACEMENT_VALUE = 5;
/**
*
- * The license plate of the vehicle.
+ * An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
+ * respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
+ * and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
+ * date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
+ * (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
+ * identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
+ * TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
+ * TripUpdate with the value of CANCELED or DELETED. If a producer wants to replace the original trip, a value of
+ * `REPLACEMENT` should be used instead.
+ *
+ * Trips defined in GTFS frequencies.txt with exact_times that is
+ * empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
+ * the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
+ * must also be set to DUPLICATED.
+ * Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
+ * the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
+ * to transition to the DUPLICATED enumeration.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string license_plate = 3;
- * @return The licensePlate.
+ * DUPLICATED = 6;
*/
- public java.lang.String getLicensePlate() {
- java.lang.Object ref = licensePlate_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- licensePlate_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
+ public static final int DUPLICATED_VALUE = 6;
/**
*
- * The license plate of the vehicle.
+ * A trip that existed in the schedule but was removed and must not be shown to users.
+ * DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove
+ * information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to
+ * riders, e.g. a trip that is entirely being replaced by another trip.
+ * This designation becomes particularly important if several trips are cancelled and replaced with substitute service.
+ * If consumers were to show explicit information about the cancellations it would distract from the more important
+ * real-time predictions.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string license_plate = 3;
- * @return The bytes for licensePlate.
+ * DELETED = 7;
*/
- public com.google.protobuf.ByteString
- getLicensePlateBytes() {
- java.lang.Object ref = licensePlate_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- licensePlate_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ public static final int DELETED_VALUE = 7;
/**
*
- * The license plate of the vehicle.
+ * An extra trip unrelated to any existing trips, for example, to respond to sudden passenger load.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
- * optional string license_plate = 3;
- * @param value The licensePlate to set.
- * @return This builder for chaining.
+ * NEW = 8;
*/
- public Builder setLicensePlate(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- licensePlate_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
+ public static final int NEW_VALUE = 8;
+
+
+ public final int getNumber() {
+ return value;
}
+
/**
- *
- * The license plate of the vehicle.
- *
- *
- * optional string license_plate = 3;
- * @return This builder for chaining.
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
*/
- public Builder clearLicensePlate() {
- licensePlate_ = getDefaultInstance().getLicensePlate();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
+ @java.lang.Deprecated
+ public static ScheduleRelationship valueOf(int value) {
+ return forNumber(value);
}
+
/**
- *
- * The license plate of the vehicle.
- *
- *
- * optional string license_plate = 3;
- * @param value The bytes for licensePlate to set.
- * @return This builder for chaining.
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
*/
- public Builder setLicensePlateBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- licensePlate_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
+ public static ScheduleRelationship forNumber(int value) {
+ switch (value) {
+ case 0: return SCHEDULED;
+ case 1: return ADDED;
+ case 2: return UNSCHEDULED;
+ case 3: return CANCELED;
+ case 5: return REPLACEMENT;
+ case 6: return DUPLICATED;
+ case 7: return DELETED;
+ case 8: return NEW;
+ default: return null;
+ }
}
- // @@protoc_insertion_point(builder_scope:transit_realtime.VehicleDescriptor)
- }
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ ScheduleRelationship> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public ScheduleRelationship findValueByNumber(int number) {
+ return ScheduleRelationship.forNumber(number);
+ }
+ };
- // @@protoc_insertion_point(class_scope:transit_realtime.VehicleDescriptor)
- private static final com.google.transit.realtime.GtfsRealtime.VehicleDescriptor DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor();
- }
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValue(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDescriptor().getEnumType(0);
+ }
- public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ private static final ScheduleRelationship[] VALUES = values();
- private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public VehicleDescriptor parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- Builder builder = newBuilder();
- try {
- builder.mergeFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(builder.buildPartial());
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e)
- .setUnfinishedMessage(builder.buildPartial());
+ public static ScheduleRelationship valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
}
- return builder.buildPartial();
+ return VALUES[desc.getIndex()];
}
- };
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
+ private final int value;
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ private ScheduleRelationship(int value) {
+ this.value = value;
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(enum_scope:transit_realtime.TripDescriptor.ScheduleRelationship)
}
- }
-
- public interface EntitySelectorOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.EntitySelector)
- com.google.protobuf.GeneratedMessage.
- ExtendableMessageOrBuilder {
-
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return Whether the agencyId field is set.
- */
- boolean hasAgencyId();
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return The agencyId.
- */
- java.lang.String getAgencyId();
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return The bytes for agencyId.
- */
- com.google.protobuf.ByteString
- getAgencyIdBytes();
-
- /**
- * optional string route_id = 2;
- * @return Whether the routeId field is set.
- */
- boolean hasRouteId();
- /**
- * optional string route_id = 2;
- * @return The routeId.
- */
- java.lang.String getRouteId();
- /**
- * optional string route_id = 2;
- * @return The bytes for routeId.
- */
- com.google.protobuf.ByteString
- getRouteIdBytes();
+ public interface ModifiedTripSelectorOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripDescriptor.ModifiedTripSelector)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
- /**
- *
- * corresponds to route_type in GTFS.
- *
- *
- * optional int32 route_type = 3;
- * @return Whether the routeType field is set.
- */
- boolean hasRouteType();
- /**
- *
- * corresponds to route_type in GTFS.
- *
- *
- * optional int32 route_type = 3;
- * @return The routeType.
- */
- int getRouteType();
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return Whether the modificationsId field is set.
+ */
+ boolean hasModificationsId();
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The modificationsId.
+ */
+ java.lang.String getModificationsId();
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The bytes for modificationsId.
+ */
+ com.google.protobuf.ByteString
+ getModificationsIdBytes();
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- * @return Whether the trip field is set.
- */
- boolean hasTrip();
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- * @return The trip.
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return Whether the affectedTripId field is set.
+ */
+ boolean hasAffectedTripId();
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The affectedTripId.
+ */
+ java.lang.String getAffectedTripId();
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The bytes for affectedTripId.
+ */
+ com.google.protobuf.ByteString
+ getAffectedTripIdBytes();
- /**
- * optional string stop_id = 5;
- * @return Whether the stopId field is set.
- */
- boolean hasStopId();
- /**
- * optional string stop_id = 5;
- * @return The stopId.
- */
- java.lang.String getStopId();
- /**
- * optional string stop_id = 5;
- * @return The bytes for stopId.
- */
- com.google.protobuf.ByteString
- getStopIdBytes();
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return Whether the startTime field is set.
+ */
+ boolean hasStartTime();
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The startTime.
+ */
+ java.lang.String getStartTime();
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The bytes for startTime.
+ */
+ com.google.protobuf.ByteString
+ getStartTimeBytes();
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return Whether the startDate field is set.
+ */
+ boolean hasStartDate();
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The startDate.
+ */
+ java.lang.String getStartDate();
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The bytes for startDate.
+ */
+ com.google.protobuf.ByteString
+ getStartDateBytes();
+ }
/**
- *
- * Corresponds to trip direction_id in GTFS trips.txt. If provided the
- * route_id must also be provided.
- *
- *
- * optional uint32 direction_id = 6;
- * @return Whether the directionId field is set.
- */
- boolean hasDirectionId();
- /**
- *
- * Corresponds to trip direction_id in GTFS trips.txt. If provided the
- * route_id must also be provided.
- *
- *
- * optional uint32 direction_id = 6;
- * @return The directionId.
+ * Protobuf type {@code transit_realtime.TripDescriptor.ModifiedTripSelector}
*/
- int getDirectionId();
- }
- /**
- *
- * A selector for an entity in a GTFS feed.
- *
- *
- * Protobuf type {@code transit_realtime.EntitySelector}
- */
- public static final class EntitySelector extends
- com.google.protobuf.GeneratedMessage.ExtendableMessage<
- EntitySelector> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.EntitySelector)
- EntitySelectorOrBuilder {
- private static final long serialVersionUID = 0L;
- static {
- com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
- com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
- /* major= */ 4,
- /* minor= */ 34,
- /* patch= */ 0,
- /* suffix= */ "",
- "EntitySelector");
- }
- // Use EntitySelector.newBuilder() to construct.
- private EntitySelector(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
- super(builder);
- }
- private EntitySelector() {
- agencyId_ = "";
- routeId_ = "";
- stopId_ = "";
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
- }
+ public static final class ModifiedTripSelector extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ ModifiedTripSelector> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripDescriptor.ModifiedTripSelector)
+ ModifiedTripSelectorOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "ModifiedTripSelector");
+ }
+ // Use ModifiedTripSelector.newBuilder() to construct.
+ private ModifiedTripSelector(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private ModifiedTripSelector() {
+ modificationsId_ = "";
+ affectedTripId_ = "";
+ startTime_ = "";
+ startDate_ = "";
+ }
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
- }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_descriptor;
+ }
- private int bitField0_;
- public static final int AGENCY_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object agencyId_ = "";
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return Whether the agencyId field is set.
- */
- @java.lang.Override
- public boolean hasAgencyId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return The agencyId.
- */
- @java.lang.Override
- public java.lang.String getAgencyId() {
- java.lang.Object ref = agencyId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- agencyId_ = s;
- }
- return s;
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_descriptor;
}
- }
- /**
- *
- * The values of the fields should correspond to the appropriate fields in the
- * GTFS feed.
- * At least one specifier must be given. If several are given, then the
- * matching has to apply to all the given specifiers.
- *
- *
- * optional string agency_id = 1;
- * @return The bytes for agencyId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getAgencyIdBytes() {
- java.lang.Object ref = agencyId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- agencyId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder.class);
}
- }
- public static final int ROUTE_ID_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private volatile java.lang.Object routeId_ = "";
- /**
- * optional string route_id = 2;
- * @return Whether the routeId field is set.
- */
- @java.lang.Override
- public boolean hasRouteId() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional string route_id = 2;
- * @return The routeId.
- */
- @java.lang.Override
- public java.lang.String getRouteId() {
- java.lang.Object ref = routeId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- routeId_ = s;
+ private int bitField0_;
+ public static final int MODIFICATIONS_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object modificationsId_ = "";
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return Whether the modificationsId field is set.
+ */
+ @java.lang.Override
+ public boolean hasModificationsId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The modificationsId.
+ */
+ @java.lang.Override
+ public java.lang.String getModificationsId() {
+ java.lang.Object ref = modificationsId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ modificationsId_ = s;
+ }
+ return s;
}
- return s;
}
- }
- /**
- * optional string route_id = 2;
- * @return The bytes for routeId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getRouteIdBytes() {
- java.lang.Object ref = routeId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- routeId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The bytes for modificationsId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getModificationsIdBytes() {
+ java.lang.Object ref = modificationsId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ modificationsId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
}
- }
- public static final int ROUTE_TYPE_FIELD_NUMBER = 3;
- private int routeType_ = 0;
- /**
- *
- * corresponds to route_type in GTFS.
- *
- *
- * optional int32 route_type = 3;
- * @return Whether the routeType field is set.
- */
- @java.lang.Override
- public boolean hasRouteType() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * corresponds to route_type in GTFS.
- *
- *
- * optional int32 route_type = 3;
- * @return The routeType.
- */
- @java.lang.Override
- public int getRouteType() {
- return routeType_;
- }
-
- public static final int TRIP_FIELD_NUMBER = 4;
- private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- * @return Whether the trip field is set.
- */
- @java.lang.Override
- public boolean hasTrip() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- * @return The trip.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
- return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
- }
- /**
- * optional .transit_realtime.TripDescriptor trip = 4;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
- return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
- }
+ public static final int AFFECTED_TRIP_ID_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object affectedTripId_ = "";
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return Whether the affectedTripId field is set.
+ */
+ @java.lang.Override
+ public boolean hasAffectedTripId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The affectedTripId.
+ */
+ @java.lang.Override
+ public java.lang.String getAffectedTripId() {
+ java.lang.Object ref = affectedTripId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ affectedTripId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The bytes for affectedTripId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getAffectedTripIdBytes() {
+ java.lang.Object ref = affectedTripId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ affectedTripId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
- public static final int STOP_ID_FIELD_NUMBER = 5;
- @SuppressWarnings("serial")
- private volatile java.lang.Object stopId_ = "";
- /**
- * optional string stop_id = 5;
- * @return Whether the stopId field is set.
- */
- @java.lang.Override
- public boolean hasStopId() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- * optional string stop_id = 5;
- * @return The stopId.
- */
- @java.lang.Override
- public java.lang.String getStopId() {
- java.lang.Object ref = stopId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- stopId_ = s;
+ public static final int START_TIME_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object startTime_ = "";
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return Whether the startTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartTime() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The startTime.
+ */
+ @java.lang.Override
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startTime_ = s;
+ }
+ return s;
}
- return s;
}
- }
- /**
- * optional string stop_id = 5;
- * @return The bytes for stopId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getStopIdBytes() {
- java.lang.Object ref = stopId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- stopId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The bytes for startTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
}
- }
- public static final int DIRECTION_ID_FIELD_NUMBER = 6;
- private int directionId_ = 0;
- /**
- *
- * Corresponds to trip direction_id in GTFS trips.txt. If provided the
- * route_id must also be provided.
- *
- *
- * optional uint32 direction_id = 6;
- * @return Whether the directionId field is set.
- */
- @java.lang.Override
- public boolean hasDirectionId() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * Corresponds to trip direction_id in GTFS trips.txt. If provided the
- * route_id must also be provided.
- *
- *
- * optional uint32 direction_id = 6;
- * @return The directionId.
- */
- @java.lang.Override
- public int getDirectionId() {
- return directionId_;
- }
+ public static final int START_DATE_FIELD_NUMBER = 4;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object startDate_ = "";
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return Whether the startDate field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartDate() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The startDate.
+ */
+ @java.lang.Override
+ public java.lang.String getStartDate() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startDate_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The bytes for startDate.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStartDateBytes() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startDate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
- private byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
- if (hasTrip()) {
- if (!getTrip().isInitialized()) {
+ if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
+ memoizedIsInitialized = 1;
+ return true;
}
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, modificationsId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, affectedTripId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, startTime_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, startDate_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
}
- memoizedIsInitialized = 1;
- return true;
- }
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessage
- .ExtendableMessage.ExtensionSerializer
- extensionWriter = newExtensionSerializer();
- if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, agencyId_);
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modificationsId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, affectedTripId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, startTime_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(4, startDate_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
}
- if (((bitField0_ & 0x00000002) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 2, routeId_);
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector other = (com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector) obj;
+
+ if (hasModificationsId() != other.hasModificationsId()) return false;
+ if (hasModificationsId()) {
+ if (!getModificationsId()
+ .equals(other.getModificationsId())) return false;
+ }
+ if (hasAffectedTripId() != other.hasAffectedTripId()) return false;
+ if (hasAffectedTripId()) {
+ if (!getAffectedTripId()
+ .equals(other.getAffectedTripId())) return false;
+ }
+ if (hasStartTime() != other.hasStartTime()) return false;
+ if (hasStartTime()) {
+ if (!getStartTime()
+ .equals(other.getStartTime())) return false;
+ }
+ if (hasStartDate() != other.hasStartDate()) return false;
+ if (hasStartDate()) {
+ if (!getStartDate()
+ .equals(other.getStartDate())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
}
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeInt32(3, routeType_);
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasModificationsId()) {
+ hash = (37 * hash) + MODIFICATIONS_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getModificationsId().hashCode();
+ }
+ if (hasAffectedTripId()) {
+ hash = (37 * hash) + AFFECTED_TRIP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getAffectedTripId().hashCode();
+ }
+ if (hasStartTime()) {
+ hash = (37 * hash) + START_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getStartTime().hashCode();
+ }
+ if (hasStartDate()) {
+ hash = (37 * hash) + START_DATE_FIELD_NUMBER;
+ hash = (53 * hash) + getStartDate().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
}
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeMessage(4, getTrip());
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
}
- if (((bitField0_ & 0x00000010) != 0)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 5, stopId_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
}
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeUInt32(6, directionId_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
}
- extensionWriter.writeUntil(10000, output);
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, agencyId_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
}
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(2, routeId_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
}
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, routeType_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
}
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, getTrip());
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
}
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(5, stopId_);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
}
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(6, directionId_);
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
}
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector)) {
- return super.equals(obj);
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
}
- com.google.transit.realtime.GtfsRealtime.EntitySelector other = (com.google.transit.realtime.GtfsRealtime.EntitySelector) obj;
- if (hasAgencyId() != other.hasAgencyId()) return false;
- if (hasAgencyId()) {
- if (!getAgencyId()
- .equals(other.getAgencyId())) return false;
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- if (hasRouteId() != other.hasRouteId()) return false;
- if (hasRouteId()) {
- if (!getRouteId()
- .equals(other.getRouteId())) return false;
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
- if (hasRouteType() != other.hasRouteType()) return false;
- if (hasRouteType()) {
- if (getRouteType()
- != other.getRouteType()) return false;
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- if (hasTrip() != other.hasTrip()) return false;
- if (hasTrip()) {
- if (!getTrip()
- .equals(other.getTrip())) return false;
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
}
- if (hasStopId() != other.hasStopId()) return false;
- if (hasStopId()) {
- if (!getStopId()
- .equals(other.getStopId())) return false;
- }
- if (hasDirectionId() != other.hasDirectionId()) return false;
- if (hasDirectionId()) {
- if (getDirectionId()
- != other.getDirectionId()) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasAgencyId()) {
- hash = (37 * hash) + AGENCY_ID_FIELD_NUMBER;
- hash = (53 * hash) + getAgencyId().hashCode();
- }
- if (hasRouteId()) {
- hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
- hash = (53 * hash) + getRouteId().hashCode();
- }
- if (hasRouteType()) {
- hash = (37 * hash) + ROUTE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getRouteType();
- }
- if (hasTrip()) {
- hash = (37 * hash) + TRIP_FIELD_NUMBER;
- hash = (53 * hash) + getTrip().hashCode();
- }
- if (hasStopId()) {
- hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
- hash = (53 * hash) + getStopId().hashCode();
- }
- if (hasDirectionId()) {
- hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getDirectionId();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessage
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
+ /**
+ * Protobuf type {@code transit_realtime.TripDescriptor.ModifiedTripSelector}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TripDescriptor.ModifiedTripSelector)
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_descriptor;
+ }
- @java.lang.Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.EntitySelector prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder.class);
+ }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * A selector for an entity in a GTFS feed.
- *
- *
- * Protobuf type {@code transit_realtime.EntitySelector}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.EntitySelector, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.EntitySelector)
- com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
- }
+ // Construct using com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.newBuilder()
+ private Builder() {
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
- }
+ }
- // Construct using com.google.transit.realtime.GtfsRealtime.EntitySelector.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage
- .alwaysUseFieldBuilders) {
- internalGetTripFieldBuilder();
}
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- agencyId_ = "";
- routeId_ = "";
- routeType_ = 0;
- trip_ = null;
- if (tripBuilder_ != null) {
- tripBuilder_.dispose();
- tripBuilder_ = null;
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ modificationsId_ = "";
+ affectedTripId_ = "";
+ startTime_ = "";
+ startDate_ = "";
+ return this;
}
- stopId_ = "";
- directionId_ = 0;
- return this;
- }
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
- }
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_ModifiedTripSelector_descriptor;
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance();
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance();
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.EntitySelector build() {
- com.google.transit.realtime.GtfsRealtime.EntitySelector result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector build() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
}
- return result;
- }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.EntitySelector buildPartial() {
- com.google.transit.realtime.GtfsRealtime.EntitySelector result = new com.google.transit.realtime.GtfsRealtime.EntitySelector(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector result = new com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.EntitySelector result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.agencyId_ = agencyId_;
- to_bitField0_ |= 0x00000001;
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.modificationsId_ = modificationsId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.affectedTripId_ = affectedTripId_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.startTime_ = startTime_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.startDate_ = startDate_;
+ to_bitField0_ |= 0x00000008;
+ }
+ result.bitField0_ |= to_bitField0_;
}
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.routeId_ = routeId_;
- to_bitField0_ |= 0x00000002;
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
}
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.routeType_ = routeType_;
- to_bitField0_ |= 0x00000004;
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
}
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.trip_ = tripBuilder_ == null
- ? trip_
- : tripBuilder_.build();
- to_bitField0_ |= 0x00000008;
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
}
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.stopId_ = stopId_;
- to_bitField0_ |= 0x00000010;
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, Type> extension) {
+ return super.clearExtension(extension);
}
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.directionId_ = directionId_;
- to_bitField0_ |= 0x00000020;
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
}
- result.bitField0_ |= to_bitField0_;
- }
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.EntitySelector, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.EntitySelector, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.EntitySelector, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.EntitySelector, Type> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.EntitySelector)other);
- } else {
- super.mergeFrom(other);
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance()) return this;
+ if (other.hasModificationsId()) {
+ modificationsId_ = other.modificationsId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasAffectedTripId()) {
+ affectedTripId_ = other.affectedTripId_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasStartTime()) {
+ startTime_ = other.startTime_;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ if (other.hasStartDate()) {
+ startDate_ = other.startDate_;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
return this;
}
- }
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.EntitySelector other) {
- if (other == com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance()) return this;
- if (other.hasAgencyId()) {
- agencyId_ = other.agencyId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasRouteId()) {
- routeId_ = other.routeId_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.hasRouteType()) {
- setRouteType(other.getRouteType());
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
}
- if (other.hasTrip()) {
- mergeTrip(other.getTrip());
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ modificationsId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ affectedTripId_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ startTime_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34: {
+ startDate_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
}
- if (other.hasStopId()) {
- stopId_ = other.stopId_;
- bitField0_ |= 0x00000010;
- onChanged();
+ private int bitField0_;
+
+ private java.lang.Object modificationsId_ = "";
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return Whether the modificationsId field is set.
+ */
+ public boolean hasModificationsId() {
+ return ((bitField0_ & 0x00000001) != 0);
}
- if (other.hasDirectionId()) {
- setDirectionId(other.getDirectionId());
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The modificationsId.
+ */
+ public java.lang.String getModificationsId() {
+ java.lang.Object ref = modificationsId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ modificationsId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
}
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (hasTrip()) {
- if (!getTrip().isInitialized()) {
- return false;
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return The bytes for modificationsId.
+ */
+ public com.google.protobuf.ByteString
+ getModificationsIdBytes() {
+ java.lang.Object ref = modificationsId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ modificationsId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
}
}
- if (!extensionsAreInitialized()) {
- return false;
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @param value The modificationsId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModificationsId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ modificationsId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
}
- return true;
- }
-
- @java.lang.Override
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearModificationsId() {
+ modificationsId_ = getDefaultInstance().getModificationsId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
+ *
+ *
+ * optional string modifications_id = 1;
+ * @param value The bytes for modificationsId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModificationsIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ modificationsId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object affectedTripId_ = "";
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return Whether the affectedTripId field is set.
+ */
+ public boolean hasAffectedTripId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The affectedTripId.
+ */
+ public java.lang.String getAffectedTripId() {
+ java.lang.Object ref = affectedTripId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ affectedTripId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return The bytes for affectedTripId.
+ */
+ public com.google.protobuf.ByteString
+ getAffectedTripIdBytes() {
+ java.lang.Object ref = affectedTripId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ affectedTripId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @param value The affectedTripId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAffectedTripId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ affectedTripId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearAffectedTripId() {
+ affectedTripId_ = getDefaultInstance().getAffectedTripId();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that is modified by the modifications_id
+ *
+ *
+ * optional string affected_trip_id = 2;
+ * @param value The bytes for affectedTripId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAffectedTripIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ affectedTripId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object startTime_ = "";
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return Whether the startTime field is set.
+ */
+ public boolean hasStartTime() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The startTime.
+ */
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startTime_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return The bytes for startTime.
+ */
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @param value The startTime to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartTime(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ startTime_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearStartTime() {
+ startTime_ = getDefaultInstance().getStartTime();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ *
+ *
+ * optional string start_time = 3;
+ * @param value The bytes for startTime to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ startTime_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object startDate_ = "";
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return Whether the startDate field is set.
+ */
+ public boolean hasStartDate() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The startDate.
+ */
+ public java.lang.String getStartDate() {
+ java.lang.Object ref = startDate_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startDate_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return The bytes for startDate.
+ */
+ public com.google.protobuf.ByteString
+ getStartDateBytes() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startDate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @param value The startDate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartDate(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ startDate_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearStartDate() {
+ startDate_ = getDefaultInstance().getStartDate();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ *
+ *
+ * optional string start_date = 4;
+ * @param value The bytes for startDate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartDateBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ startDate_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TripDescriptor.ModifiedTripSelector)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TripDescriptor.ModifiedTripSelector)
+ private static final com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ModifiedTripSelector parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int TRIP_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object tripId_ = "";
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return Whether the tripId field is set.
+ */
+ @java.lang.Override
+ public boolean hasTripId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return The tripId.
+ */
+ @java.lang.Override
+ public java.lang.String getTripId() {
+ java.lang.Object ref = tripId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return The bytes for tripId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getTripIdBytes() {
+ java.lang.Object ref = tripId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ROUTE_ID_FIELD_NUMBER = 5;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object routeId_ = "";
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return Whether the routeId field is set.
+ */
+ @java.lang.Override
+ public boolean hasRouteId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return The routeId.
+ */
+ @java.lang.Override
+ public java.lang.String getRouteId() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ routeId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return The bytes for routeId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getRouteIdBytes() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ routeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DIRECTION_ID_FIELD_NUMBER = 6;
+ private int directionId_ = 0;
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
+ */
+ @java.lang.Override
+ public boolean hasDirectionId() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
+ */
+ @java.lang.Override
+ public int getDirectionId() {
+ return directionId_;
+ }
+
+ public static final int START_TIME_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object startTime_ = "";
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return Whether the startTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartTime() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The startTime.
+ */
+ @java.lang.Override
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startTime_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The bytes for startTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int START_DATE_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object startDate_ = "";
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return Whether the startDate field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartDate() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return The startDate.
+ */
+ @java.lang.Override
+ public java.lang.String getStartDate() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startDate_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return The bytes for startDate.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStartDateBytes() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startDate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 4;
+ private int scheduleRelationship_ = 0;
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return Whether the scheduleRelationship field is set.
+ */
+ @java.lang.Override public boolean hasScheduleRelationship() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return The scheduleRelationship.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
+ }
+
+ public static final int MODIFIED_TRIP_FIELD_NUMBER = 7;
+ private com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector modifiedTrip_;
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return Whether the modifiedTrip field is set.
+ */
+ @java.lang.Override
+ public boolean hasModifiedTrip() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return The modifiedTrip.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getModifiedTrip() {
+ return modifiedTrip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance() : modifiedTrip_;
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder getModifiedTripOrBuilder() {
+ return modifiedTrip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance() : modifiedTrip_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasModifiedTrip()) {
+ if (!getModifiedTrip().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, tripId_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, startTime_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, startDate_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeEnum(4, scheduleRelationship_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, routeId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeUInt32(6, directionId_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeMessage(7, getModifiedTrip());
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tripId_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, startTime_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, startDate_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(4, scheduleRelationship_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, routeId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(6, directionId_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getModifiedTrip());
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor other = (com.google.transit.realtime.GtfsRealtime.TripDescriptor) obj;
+
+ if (hasTripId() != other.hasTripId()) return false;
+ if (hasTripId()) {
+ if (!getTripId()
+ .equals(other.getTripId())) return false;
+ }
+ if (hasRouteId() != other.hasRouteId()) return false;
+ if (hasRouteId()) {
+ if (!getRouteId()
+ .equals(other.getRouteId())) return false;
+ }
+ if (hasDirectionId() != other.hasDirectionId()) return false;
+ if (hasDirectionId()) {
+ if (getDirectionId()
+ != other.getDirectionId()) return false;
+ }
+ if (hasStartTime() != other.hasStartTime()) return false;
+ if (hasStartTime()) {
+ if (!getStartTime()
+ .equals(other.getStartTime())) return false;
+ }
+ if (hasStartDate() != other.hasStartDate()) return false;
+ if (hasStartDate()) {
+ if (!getStartDate()
+ .equals(other.getStartDate())) return false;
+ }
+ if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
+ if (hasScheduleRelationship()) {
+ if (scheduleRelationship_ != other.scheduleRelationship_) return false;
+ }
+ if (hasModifiedTrip() != other.hasModifiedTrip()) return false;
+ if (hasModifiedTrip()) {
+ if (!getModifiedTrip()
+ .equals(other.getModifiedTrip())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTripId()) {
+ hash = (37 * hash) + TRIP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getTripId().hashCode();
+ }
+ if (hasRouteId()) {
+ hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getRouteId().hashCode();
+ }
+ if (hasDirectionId()) {
+ hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getDirectionId();
+ }
+ if (hasStartTime()) {
+ hash = (37 * hash) + START_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getStartTime().hashCode();
+ }
+ if (hasStartDate()) {
+ hash = (37 * hash) + START_DATE_FIELD_NUMBER;
+ hash = (53 * hash) + getStartDate().hashCode();
+ }
+ if (hasScheduleRelationship()) {
+ hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
+ hash = (53 * hash) + scheduleRelationship_;
+ }
+ if (hasModifiedTrip()) {
+ hash = (37 * hash) + MODIFIED_TRIP_FIELD_NUMBER;
+ hash = (53 * hash) + getModifiedTrip().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripDescriptor prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A descriptor that identifies an instance of a GTFS trip, or all instances of
+ * a trip along a route.
+ * - To specify a single trip instance, the trip_id (and if necessary,
+ * start_time) is set. If route_id is also set, then it should be same as one
+ * that the given trip corresponds to.
+ * - To specify all the trips along a given route, only the route_id should be
+ * set. Note that if the trip_id is not known, then stop sequence ids in
+ * TripUpdate are not sufficient, and stop_ids must be provided as well. In
+ * addition, absolute arrival/departure times must be provided.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripDescriptor}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TripDescriptor)
+ com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ internalGetModifiedTripFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ tripId_ = "";
+ routeId_ = "";
+ directionId_ = 0;
+ startTime_ = "";
+ startDate_ = "";
+ scheduleRelationship_ = 0;
+ modifiedTrip_ = null;
+ if (modifiedTripBuilder_ != null) {
+ modifiedTripBuilder_.dispose();
+ modifiedTripBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor build() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor result = new com.google.transit.realtime.GtfsRealtime.TripDescriptor(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripDescriptor result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.tripId_ = tripId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.routeId_ = routeId_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.directionId_ = directionId_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.startTime_ = startTime_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.startDate_ = startDate_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.scheduleRelationship_ = scheduleRelationship_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.modifiedTrip_ = modifiedTripBuilder_ == null
+ ? modifiedTrip_
+ : modifiedTripBuilder_.build();
+ to_bitField0_ |= 0x00000040;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripDescriptor)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripDescriptor other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) return this;
+ if (other.hasTripId()) {
+ tripId_ = other.tripId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasRouteId()) {
+ routeId_ = other.routeId_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasDirectionId()) {
+ setDirectionId(other.getDirectionId());
+ }
+ if (other.hasStartTime()) {
+ startTime_ = other.startTime_;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ if (other.hasStartDate()) {
+ startDate_ = other.startDate_;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ if (other.hasScheduleRelationship()) {
+ setScheduleRelationship(other.getScheduleRelationship());
+ }
+ if (other.hasModifiedTrip()) {
+ mergeModifiedTrip(other.getModifiedTrip());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasModifiedTrip()) {
+ if (!getModifiedTrip().isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ tripId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ startTime_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 18
+ case 26: {
+ startDate_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 26
+ case 32: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship tmpValue =
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(4, tmpRaw);
+ } else {
+ scheduleRelationship_ = tmpRaw;
+ bitField0_ |= 0x00000020;
+ }
+ break;
+ } // case 32
+ case 42: {
+ routeId_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 42
+ case 48: {
+ directionId_ = input.readUInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 48
+ case 58: {
+ input.readMessage(
+ internalGetModifiedTripFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 58
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object tripId_ = "";
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return Whether the tripId field is set.
+ */
+ public boolean hasTripId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return The tripId.
+ */
+ public java.lang.String getTripId() {
+ java.lang.Object ref = tripId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tripId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return The bytes for tripId.
+ */
+ public com.google.protobuf.ByteString
+ getTripIdBytes() {
+ java.lang.Object ref = tripId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tripId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @param value The tripId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearTripId() {
+ tripId_ = getDefaultInstance().getTripId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The trip_id from the GTFS feed that this selector refers to.
+ * For non frequency-based trips, this field is enough to uniquely identify
+ * the trip. For frequency-based trip, start_time and start_date might also be
+ * necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
+ * static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
+ * identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
+ *
+ *
+ * optional string trip_id = 1;
+ * @param value The bytes for tripId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTripIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ tripId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object routeId_ = "";
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return Whether the routeId field is set.
+ */
+ public boolean hasRouteId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return The routeId.
+ */
+ public java.lang.String getRouteId() {
+ java.lang.Object ref = routeId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ routeId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return The bytes for routeId.
+ */
+ public com.google.protobuf.ByteString
+ getRouteIdBytes() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ routeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @param value The routeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRouteId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ routeId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearRouteId() {
+ routeId_ = getDefaultInstance().getRouteId();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The route_id from the GTFS that this selector refers to.
+ *
+ *
+ * optional string route_id = 5;
+ * @param value The bytes for routeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRouteIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ routeId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private int directionId_ ;
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
+ */
+ @java.lang.Override
+ public boolean hasDirectionId() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
+ */
+ @java.lang.Override
+ public int getDirectionId() {
+ return directionId_;
+ }
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @param value The directionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDirectionId(int value) {
+
+ directionId_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The direction_id from the GTFS feed trips.txt file, indicating the
+ * direction of travel for trips this selector refers to.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearDirectionId() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ directionId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object startTime_ = "";
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return Whether the startTime field is set.
+ */
+ public boolean hasStartTime() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The startTime.
+ */
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startTime_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return The bytes for startTime.
+ */
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @param value The startTime to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartTime(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ startTime_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearStartTime() {
+ startTime_ = getDefaultInstance().getStartTime();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The initially scheduled start time of this trip instance.
+ * When the trip_id corresponds to a non-frequency-based trip, this field
+ * should either be omitted or be equal to the value in the GTFS feed. When
+ * the trip_id corresponds to a frequency-based trip, the start_time must be
+ * specified for trip updates and vehicle positions. If the trip corresponds
+ * to exact_times=1 GTFS record, then start_time must be some multiple
+ * (including zero) of headway_secs later than frequencies.txt start_time for
+ * the corresponding time period. If the trip corresponds to exact_times=0,
+ * then its start_time may be arbitrary, and is initially expected to be the
+ * first departure of the trip. Once established, the start_time of this
+ * frequency-based trip should be considered immutable, even if the first
+ * departure time changes -- that time change may instead be reflected in a
+ * StopTimeUpdate.
+ * Format and semantics of the field is same as that of
+ * GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
+ *
+ *
+ * optional string start_time = 2;
+ * @param value The bytes for startTime to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ startTime_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object startDate_ = "";
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return Whether the startDate field is set.
+ */
+ public boolean hasStartDate() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return The startDate.
+ */
+ public java.lang.String getStartDate() {
+ java.lang.Object ref = startDate_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ startDate_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return The bytes for startDate.
+ */
+ public com.google.protobuf.ByteString
+ getStartDateBytes() {
+ java.lang.Object ref = startDate_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startDate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @param value The startDate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartDate(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ startDate_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearStartDate() {
+ startDate_ = getDefaultInstance().getStartDate();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The scheduled start date of this trip instance.
+ * Must be provided to disambiguate trips that are so late as to collide with
+ * a scheduled trip on a next day. For example, for a train that departs 8:00
+ * and 20:00 every day, and is 12 hours late, there would be two distinct
+ * trips on the same time.
+ * This field can be provided but is not mandatory for schedules in which such
+ * collisions are impossible - for example, a service running on hourly
+ * schedule where a vehicle that is one hour late is not considered to be
+ * related to schedule anymore.
+ * In YYYYMMDD format.
+ *
+ *
+ * optional string start_date = 3;
+ * @param value The bytes for startDate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartDateBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ startDate_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ private int scheduleRelationship_ = 0;
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return Whether the scheduleRelationship field is set.
+ */
+ @java.lang.Override public boolean hasScheduleRelationship() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return The scheduleRelationship.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @param value The scheduleRelationship to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000020;
+ scheduleRelationship_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearScheduleRelationship() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ scheduleRelationship_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector modifiedTrip_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder> modifiedTripBuilder_;
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return Whether the modifiedTrip field is set.
+ */
+ public boolean hasModifiedTrip() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ * @return The modifiedTrip.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector getModifiedTrip() {
+ if (modifiedTripBuilder_ == null) {
+ return modifiedTrip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance() : modifiedTrip_;
+ } else {
+ return modifiedTripBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public Builder setModifiedTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector value) {
+ if (modifiedTripBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ modifiedTrip_ = value;
+ } else {
+ modifiedTripBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public Builder setModifiedTrip(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder builderForValue) {
+ if (modifiedTripBuilder_ == null) {
+ modifiedTrip_ = builderForValue.build();
+ } else {
+ modifiedTripBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public Builder mergeModifiedTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector value) {
+ if (modifiedTripBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0) &&
+ modifiedTrip_ != null &&
+ modifiedTrip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance()) {
+ getModifiedTripBuilder().mergeFrom(value);
+ } else {
+ modifiedTrip_ = value;
+ }
+ } else {
+ modifiedTripBuilder_.mergeFrom(value);
+ }
+ if (modifiedTrip_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public Builder clearModifiedTrip() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ modifiedTrip_ = null;
+ if (modifiedTripBuilder_ != null) {
+ modifiedTripBuilder_.dispose();
+ modifiedTripBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder getModifiedTripBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return internalGetModifiedTripFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder getModifiedTripOrBuilder() {
+ if (modifiedTripBuilder_ != null) {
+ return modifiedTripBuilder_.getMessageOrBuilder();
+ } else {
+ return modifiedTrip_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.getDefaultInstance() : modifiedTrip_;
+ }
+ }
+ /**
+ *
+ * Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ * If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ *
+ *
+ * optional .transit_realtime.TripDescriptor.ModifiedTripSelector modified_trip = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder>
+ internalGetModifiedTripFieldBuilder() {
+ if (modifiedTripBuilder_ == null) {
+ modifiedTripBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelector.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptor.ModifiedTripSelectorOrBuilder>(
+ getModifiedTrip(),
+ getParentForChildren(),
+ isClean());
+ modifiedTrip_ = null;
+ }
+ return modifiedTripBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TripDescriptor)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TripDescriptor)
+ private static final com.google.transit.realtime.GtfsRealtime.TripDescriptor DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripDescriptor();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public TripDescriptor parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface VehicleDescriptorOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.VehicleDescriptor)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return Whether the id field is set.
+ */
+ boolean hasId();
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return Whether the label field is set.
+ */
+ boolean hasLabel();
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The label.
+ */
+ java.lang.String getLabel();
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The bytes for label.
+ */
+ com.google.protobuf.ByteString
+ getLabelBytes();
+
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return Whether the licensePlate field is set.
+ */
+ boolean hasLicensePlate();
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The licensePlate.
+ */
+ java.lang.String getLicensePlate();
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The bytes for licensePlate.
+ */
+ com.google.protobuf.ByteString
+ getLicensePlateBytes();
+
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return Whether the wheelchairAccessible field is set.
+ */
+ boolean hasWheelchairAccessible();
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return The wheelchairAccessible.
+ */
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible();
+ }
+ /**
+ *
+ * Identification information for the vehicle performing the trip.
+ *
+ *
+ * Protobuf type {@code transit_realtime.VehicleDescriptor}
+ */
+ public static final class VehicleDescriptor extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ VehicleDescriptor> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.VehicleDescriptor)
+ VehicleDescriptorOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "VehicleDescriptor");
+ }
+ // Use VehicleDescriptor.newBuilder() to construct.
+ private VehicleDescriptor(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private VehicleDescriptor() {
+ id_ = "";
+ label_ = "";
+ licensePlate_ = "";
+ wheelchairAccessible_ = 0;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code transit_realtime.VehicleDescriptor.WheelchairAccessible}
+ */
+ public enum WheelchairAccessible
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * The trip doesn't have information about wheelchair accessibility.
+ * This is the **default** behavior. If the static GTFS contains a
+ * _wheelchair_accessible_ value, it won't be overwritten.
+ *
+ *
+ * NO_VALUE = 0;
+ */
+ NO_VALUE(0),
+ /**
+ *
+ * The trip has no accessibility value present.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * UNKNOWN = 1;
+ */
+ UNKNOWN(1),
+ /**
+ *
+ * The trip is wheelchair accessible.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * WHEELCHAIR_ACCESSIBLE = 2;
+ */
+ WHEELCHAIR_ACCESSIBLE(2),
+ /**
+ *
+ * The trip is **not** wheelchair accessible.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * WHEELCHAIR_INACCESSIBLE = 3;
+ */
+ WHEELCHAIR_INACCESSIBLE(3),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "WheelchairAccessible");
+ }
+ /**
+ *
+ * The trip doesn't have information about wheelchair accessibility.
+ * This is the **default** behavior. If the static GTFS contains a
+ * _wheelchair_accessible_ value, it won't be overwritten.
+ *
+ *
+ * NO_VALUE = 0;
+ */
+ public static final int NO_VALUE_VALUE = 0;
+ /**
+ *
+ * The trip has no accessibility value present.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * UNKNOWN = 1;
+ */
+ public static final int UNKNOWN_VALUE = 1;
+ /**
+ *
+ * The trip is wheelchair accessible.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * WHEELCHAIR_ACCESSIBLE = 2;
+ */
+ public static final int WHEELCHAIR_ACCESSIBLE_VALUE = 2;
+ /**
+ *
+ * The trip is **not** wheelchair accessible.
+ * This value will overwrite the value from the GTFS.
+ *
+ *
+ * WHEELCHAIR_INACCESSIBLE = 3;
+ */
+ public static final int WHEELCHAIR_INACCESSIBLE_VALUE = 3;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static WheelchairAccessible valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static WheelchairAccessible forNumber(int value) {
+ switch (value) {
+ case 0: return NO_VALUE;
+ case 1: return UNKNOWN;
+ case 2: return WHEELCHAIR_ACCESSIBLE;
+ case 3: return WHEELCHAIR_INACCESSIBLE;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ WheelchairAccessible> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public WheelchairAccessible findValueByNumber(int number) {
+ return WheelchairAccessible.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValue(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDescriptor().getEnumType(0);
+ }
+
+ private static final WheelchairAccessible[] VALUES = values();
+
+ public static WheelchairAccessible valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private WheelchairAccessible(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:transit_realtime.VehicleDescriptor.WheelchairAccessible)
+ }
+
+ private int bitField0_;
+ public static final int ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object id_ = "";
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return Whether the id field is set.
+ */
+ @java.lang.Override
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The id.
+ */
+ @java.lang.Override
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ id_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The bytes for id.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LABEL_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object label_ = "";
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return Whether the label field is set.
+ */
+ @java.lang.Override
+ public boolean hasLabel() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The label.
+ */
+ @java.lang.Override
+ public java.lang.String getLabel() {
+ java.lang.Object ref = label_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ label_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The bytes for label.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getLabelBytes() {
+ java.lang.Object ref = label_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ label_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LICENSE_PLATE_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object licensePlate_ = "";
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return Whether the licensePlate field is set.
+ */
+ @java.lang.Override
+ public boolean hasLicensePlate() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The licensePlate.
+ */
+ @java.lang.Override
+ public java.lang.String getLicensePlate() {
+ java.lang.Object ref = licensePlate_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ licensePlate_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The bytes for licensePlate.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getLicensePlateBytes() {
+ java.lang.Object ref = licensePlate_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ licensePlate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int WHEELCHAIR_ACCESSIBLE_FIELD_NUMBER = 4;
+ private int wheelchairAccessible_ = 0;
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return Whether the wheelchairAccessible field is set.
+ */
+ @java.lang.Override public boolean hasWheelchairAccessible() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return The wheelchairAccessible.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible() {
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible result = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(wheelchairAccessible_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.NO_VALUE : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, label_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, licensePlate_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeEnum(4, wheelchairAccessible_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, label_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, licensePlate_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(4, wheelchairAccessible_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other = (com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) obj;
+
+ if (hasId() != other.hasId()) return false;
+ if (hasId()) {
+ if (!getId()
+ .equals(other.getId())) return false;
+ }
+ if (hasLabel() != other.hasLabel()) return false;
+ if (hasLabel()) {
+ if (!getLabel()
+ .equals(other.getLabel())) return false;
+ }
+ if (hasLicensePlate() != other.hasLicensePlate()) return false;
+ if (hasLicensePlate()) {
+ if (!getLicensePlate()
+ .equals(other.getLicensePlate())) return false;
+ }
+ if (hasWheelchairAccessible() != other.hasWheelchairAccessible()) return false;
+ if (hasWheelchairAccessible()) {
+ if (wheelchairAccessible_ != other.wheelchairAccessible_) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasId()) {
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ }
+ if (hasLabel()) {
+ hash = (37 * hash) + LABEL_FIELD_NUMBER;
+ hash = (53 * hash) + getLabel().hashCode();
+ }
+ if (hasLicensePlate()) {
+ hash = (37 * hash) + LICENSE_PLATE_FIELD_NUMBER;
+ hash = (53 * hash) + getLicensePlate().hashCode();
+ }
+ if (hasWheelchairAccessible()) {
+ hash = (37 * hash) + WHEELCHAIR_ACCESSIBLE_FIELD_NUMBER;
+ hash = (53 * hash) + wheelchairAccessible_;
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Identification information for the vehicle performing the trip.
+ *
+ *
+ * Protobuf type {@code transit_realtime.VehicleDescriptor}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.VehicleDescriptor)
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ id_ = "";
+ label_ = "";
+ licensePlate_ = "";
+ wheelchairAccessible_ = 0;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor build() {
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.id_ = id_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.label_ = label_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.licensePlate_ = licensePlate_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.wheelchairAccessible_ = wheelchairAccessible_;
+ to_bitField0_ |= 0x00000008;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) return this;
+ if (other.hasId()) {
+ id_ = other.id_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasLabel()) {
+ label_ = other.label_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasLicensePlate()) {
+ licensePlate_ = other.licensePlate_;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ if (other.hasWheelchairAccessible()) {
+ setWheelchairAccessible(other.getWheelchairAccessible());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ id_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ label_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ licensePlate_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 32: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible tmpValue =
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(4, tmpRaw);
+ } else {
+ wheelchairAccessible_ = tmpRaw;
+ bitField0_ |= 0x00000008;
+ }
+ break;
+ } // case 32
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object id_ = "";
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return Whether the id field is set.
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The id.
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ id_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return The bytes for id.
+ */
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @param value The id to set.
+ * @return This builder for chaining.
+ */
+ public Builder setId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ id_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+ id_ = getDefaultInstance().getId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Internal system identification of the vehicle. Should be unique per
+ * vehicle, and can be used for tracking the vehicle as it proceeds through
+ * the system.
+ *
+ *
+ * optional string id = 1;
+ * @param value The bytes for id to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ id_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object label_ = "";
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return Whether the label field is set.
+ */
+ public boolean hasLabel() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The label.
+ */
+ public java.lang.String getLabel() {
+ java.lang.Object ref = label_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ label_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return The bytes for label.
+ */
+ public com.google.protobuf.ByteString
+ getLabelBytes() {
+ java.lang.Object ref = label_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ label_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @param value The label to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLabel(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ label_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearLabel() {
+ label_ = getDefaultInstance().getLabel();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * User visible label, i.e., something that must be shown to the passenger to
+ * help identify the correct vehicle.
+ *
+ *
+ * optional string label = 2;
+ * @param value The bytes for label to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLabelBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ label_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object licensePlate_ = "";
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return Whether the licensePlate field is set.
+ */
+ public boolean hasLicensePlate() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The licensePlate.
+ */
+ public java.lang.String getLicensePlate() {
+ java.lang.Object ref = licensePlate_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ licensePlate_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return The bytes for licensePlate.
+ */
+ public com.google.protobuf.ByteString
+ getLicensePlateBytes() {
+ java.lang.Object ref = licensePlate_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ licensePlate_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @param value The licensePlate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLicensePlate(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ licensePlate_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearLicensePlate() {
+ licensePlate_ = getDefaultInstance().getLicensePlate();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The license plate of the vehicle.
+ *
+ *
+ * optional string license_plate = 3;
+ * @param value The bytes for licensePlate to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLicensePlateBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ licensePlate_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private int wheelchairAccessible_ = 0;
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return Whether the wheelchairAccessible field is set.
+ */
+ @java.lang.Override public boolean hasWheelchairAccessible() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return The wheelchairAccessible.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible() {
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible result = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(wheelchairAccessible_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.NO_VALUE : result;
+ }
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @param value The wheelchairAccessible to set.
+ * @return This builder for chaining.
+ */
+ public Builder setWheelchairAccessible(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000008;
+ wheelchairAccessible_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
+ * @return This builder for chaining.
+ */
+ public Builder clearWheelchairAccessible() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ wheelchairAccessible_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.VehicleDescriptor)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.VehicleDescriptor)
+ private static final com.google.transit.realtime.GtfsRealtime.VehicleDescriptor DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public VehicleDescriptor parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface EntitySelectorOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.EntitySelector)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return Whether the agencyId field is set.
+ */
+ boolean hasAgencyId();
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The agencyId.
+ */
+ java.lang.String getAgencyId();
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The bytes for agencyId.
+ */
+ com.google.protobuf.ByteString
+ getAgencyIdBytes();
+
+ /**
+ * optional string route_id = 2;
+ * @return Whether the routeId field is set.
+ */
+ boolean hasRouteId();
+ /**
+ * optional string route_id = 2;
+ * @return The routeId.
+ */
+ java.lang.String getRouteId();
+ /**
+ * optional string route_id = 2;
+ * @return The bytes for routeId.
+ */
+ com.google.protobuf.ByteString
+ getRouteIdBytes();
+
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return Whether the routeType field is set.
+ */
+ boolean hasRouteType();
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return The routeType.
+ */
+ int getRouteType();
+
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return Whether the trip field is set.
+ */
+ boolean hasTrip();
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return The trip.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
+
+ /**
+ * optional string stop_id = 5;
+ * @return Whether the stopId field is set.
+ */
+ boolean hasStopId();
+ /**
+ * optional string stop_id = 5;
+ * @return The stopId.
+ */
+ java.lang.String getStopId();
+ /**
+ * optional string stop_id = 5;
+ * @return The bytes for stopId.
+ */
+ com.google.protobuf.ByteString
+ getStopIdBytes();
+
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
+ */
+ boolean hasDirectionId();
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
+ */
+ int getDirectionId();
+ }
+ /**
+ *
+ * A selector for an entity in a GTFS feed.
+ *
+ *
+ * Protobuf type {@code transit_realtime.EntitySelector}
+ */
+ public static final class EntitySelector extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ EntitySelector> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.EntitySelector)
+ EntitySelectorOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "EntitySelector");
+ }
+ // Use EntitySelector.newBuilder() to construct.
+ private EntitySelector(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private EntitySelector() {
+ agencyId_ = "";
+ routeId_ = "";
+ stopId_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int AGENCY_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object agencyId_ = "";
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return Whether the agencyId field is set.
+ */
+ @java.lang.Override
+ public boolean hasAgencyId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The agencyId.
+ */
+ @java.lang.Override
+ public java.lang.String getAgencyId() {
+ java.lang.Object ref = agencyId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ agencyId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The bytes for agencyId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getAgencyIdBytes() {
+ java.lang.Object ref = agencyId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ agencyId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ROUTE_ID_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object routeId_ = "";
+ /**
+ * optional string route_id = 2;
+ * @return Whether the routeId field is set.
+ */
+ @java.lang.Override
+ public boolean hasRouteId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional string route_id = 2;
+ * @return The routeId.
+ */
+ @java.lang.Override
+ public java.lang.String getRouteId() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ routeId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string route_id = 2;
+ * @return The bytes for routeId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getRouteIdBytes() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ routeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ROUTE_TYPE_FIELD_NUMBER = 3;
+ private int routeType_ = 0;
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return Whether the routeType field is set.
+ */
+ @java.lang.Override
+ public boolean hasRouteType() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return The routeType.
+ */
+ @java.lang.Override
+ public int getRouteType() {
+ return routeType_;
+ }
+
+ public static final int TRIP_FIELD_NUMBER = 4;
+ private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return Whether the trip field is set.
+ */
+ @java.lang.Override
+ public boolean hasTrip() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return The trip.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
+ return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
+ return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
+ }
+
+ public static final int STOP_ID_FIELD_NUMBER = 5;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object stopId_ = "";
+ /**
+ * optional string stop_id = 5;
+ * @return Whether the stopId field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopId() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional string stop_id = 5;
+ * @return The stopId.
+ */
+ @java.lang.Override
+ public java.lang.String getStopId() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string stop_id = 5;
+ * @return The bytes for stopId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStopIdBytes() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DIRECTION_ID_FIELD_NUMBER = 6;
+ private int directionId_ = 0;
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
+ */
+ @java.lang.Override
+ public boolean hasDirectionId() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
+ */
+ @java.lang.Override
+ public int getDirectionId() {
+ return directionId_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasTrip()) {
+ if (!getTrip().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, agencyId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, routeId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeInt32(3, routeType_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeMessage(4, getTrip());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, stopId_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeUInt32(6, directionId_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, agencyId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, routeId_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, routeType_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getTrip());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, stopId_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(6, directionId_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.EntitySelector other = (com.google.transit.realtime.GtfsRealtime.EntitySelector) obj;
+
+ if (hasAgencyId() != other.hasAgencyId()) return false;
+ if (hasAgencyId()) {
+ if (!getAgencyId()
+ .equals(other.getAgencyId())) return false;
+ }
+ if (hasRouteId() != other.hasRouteId()) return false;
+ if (hasRouteId()) {
+ if (!getRouteId()
+ .equals(other.getRouteId())) return false;
+ }
+ if (hasRouteType() != other.hasRouteType()) return false;
+ if (hasRouteType()) {
+ if (getRouteType()
+ != other.getRouteType()) return false;
+ }
+ if (hasTrip() != other.hasTrip()) return false;
+ if (hasTrip()) {
+ if (!getTrip()
+ .equals(other.getTrip())) return false;
+ }
+ if (hasStopId() != other.hasStopId()) return false;
+ if (hasStopId()) {
+ if (!getStopId()
+ .equals(other.getStopId())) return false;
+ }
+ if (hasDirectionId() != other.hasDirectionId()) return false;
+ if (hasDirectionId()) {
+ if (getDirectionId()
+ != other.getDirectionId()) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasAgencyId()) {
+ hash = (37 * hash) + AGENCY_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getAgencyId().hashCode();
+ }
+ if (hasRouteId()) {
+ hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getRouteId().hashCode();
+ }
+ if (hasRouteType()) {
+ hash = (37 * hash) + ROUTE_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getRouteType();
+ }
+ if (hasTrip()) {
+ hash = (37 * hash) + TRIP_FIELD_NUMBER;
+ hash = (53 * hash) + getTrip().hashCode();
+ }
+ if (hasStopId()) {
+ hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getStopId().hashCode();
+ }
+ if (hasDirectionId()) {
+ hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getDirectionId();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.EntitySelector prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A selector for an entity in a GTFS feed.
+ *
+ *
+ * Protobuf type {@code transit_realtime.EntitySelector}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.EntitySelector, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.EntitySelector)
+ com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.EntitySelector.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ internalGetTripFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ agencyId_ = "";
+ routeId_ = "";
+ routeType_ = 0;
+ trip_ = null;
+ if (tripBuilder_ != null) {
+ tripBuilder_.dispose();
+ tripBuilder_ = null;
+ }
+ stopId_ = "";
+ directionId_ = 0;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.EntitySelector build() {
+ com.google.transit.realtime.GtfsRealtime.EntitySelector result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.EntitySelector buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.EntitySelector result = new com.google.transit.realtime.GtfsRealtime.EntitySelector(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.EntitySelector result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.agencyId_ = agencyId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.routeId_ = routeId_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.routeType_ = routeType_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.trip_ = tripBuilder_ == null
+ ? trip_
+ : tripBuilder_.build();
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.stopId_ = stopId_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.directionId_ = directionId_;
+ to_bitField0_ |= 0x00000020;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.EntitySelector, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.EntitySelector, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.EntitySelector, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.EntitySelector, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.EntitySelector)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.EntitySelector other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance()) return this;
+ if (other.hasAgencyId()) {
+ agencyId_ = other.agencyId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasRouteId()) {
+ routeId_ = other.routeId_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasRouteType()) {
+ setRouteType(other.getRouteType());
+ }
+ if (other.hasTrip()) {
+ mergeTrip(other.getTrip());
+ }
+ if (other.hasStopId()) {
+ stopId_ = other.stopId_;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ if (other.hasDirectionId()) {
+ setDirectionId(other.getDirectionId());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasTrip()) {
+ if (!getTrip().isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ agencyId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ routeId_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ routeType_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ input.readMessage(
+ internalGetTripFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42: {
+ stopId_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ case 48: {
+ directionId_ = input.readUInt32();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object agencyId_ = "";
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return Whether the agencyId field is set.
+ */
+ public boolean hasAgencyId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The agencyId.
+ */
+ public java.lang.String getAgencyId() {
+ java.lang.Object ref = agencyId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ agencyId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return The bytes for agencyId.
+ */
+ public com.google.protobuf.ByteString
+ getAgencyIdBytes() {
+ java.lang.Object ref = agencyId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ agencyId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @param value The agencyId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAgencyId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ agencyId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearAgencyId() {
+ agencyId_ = getDefaultInstance().getAgencyId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The values of the fields should correspond to the appropriate fields in the
+ * GTFS feed.
+ * At least one specifier must be given. If several are given, then the
+ * matching has to apply to all the given specifiers.
+ *
+ *
+ * optional string agency_id = 1;
+ * @param value The bytes for agencyId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAgencyIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ agencyId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object routeId_ = "";
+ /**
+ * optional string route_id = 2;
+ * @return Whether the routeId field is set.
+ */
+ public boolean hasRouteId() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional string route_id = 2;
+ * @return The routeId.
+ */
+ public java.lang.String getRouteId() {
+ java.lang.Object ref = routeId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ routeId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string route_id = 2;
+ * @return The bytes for routeId.
+ */
+ public com.google.protobuf.ByteString
+ getRouteIdBytes() {
+ java.lang.Object ref = routeId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ routeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string route_id = 2;
+ * @param value The routeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRouteId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ routeId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string route_id = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearRouteId() {
+ routeId_ = getDefaultInstance().getRouteId();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string route_id = 2;
+ * @param value The bytes for routeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRouteIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ routeId_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private int routeType_ ;
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return Whether the routeType field is set.
+ */
+ @java.lang.Override
+ public boolean hasRouteType() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return The routeType.
+ */
+ @java.lang.Override
+ public int getRouteType() {
+ return routeType_;
+ }
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @param value The routeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRouteType(int value) {
+
+ routeType_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * corresponds to route_type in GTFS.
+ *
+ *
+ * optional int32 route_type = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearRouteType() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ routeType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return Whether the trip field is set.
+ */
+ public boolean hasTrip() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ * @return The trip.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
+ if (tripBuilder_ == null) {
+ return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
+ } else {
+ return tripBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
+ if (tripBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ trip_ = value;
+ } else {
+ tripBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public Builder setTrip(
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
+ if (tripBuilder_ == null) {
+ trip_ = builderForValue.build();
+ } else {
+ tripBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
+ if (tripBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0) &&
+ trip_ != null &&
+ trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
+ getTripBuilder().mergeFrom(value);
+ } else {
+ trip_ = value;
+ }
+ } else {
+ tripBuilder_.mergeFrom(value);
+ }
+ if (trip_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public Builder clearTrip() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ trip_ = null;
+ if (tripBuilder_ != null) {
+ tripBuilder_.dispose();
+ tripBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return internalGetTripFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
+ if (tripBuilder_ != null) {
+ return tripBuilder_.getMessageOrBuilder();
+ } else {
+ return trip_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TripDescriptor trip = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
+ internalGetTripFieldBuilder() {
+ if (tripBuilder_ == null) {
+ tripBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>(
+ getTrip(),
+ getParentForChildren(),
+ isClean());
+ trip_ = null;
+ }
+ return tripBuilder_;
+ }
+
+ private java.lang.Object stopId_ = "";
+ /**
+ * optional string stop_id = 5;
+ * @return Whether the stopId field is set.
+ */
+ public boolean hasStopId() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional string stop_id = 5;
+ * @return The stopId.
+ */
+ public java.lang.String getStopId() {
+ java.lang.Object ref = stopId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string stop_id = 5;
+ * @return The bytes for stopId.
+ */
+ public com.google.protobuf.ByteString
+ getStopIdBytes() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string stop_id = 5;
+ * @param value The stopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopId_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_id = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopId() {
+ stopId_ = getDefaultInstance().getStopId();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_id = 5;
+ * @param value The bytes for stopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopId_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ private int directionId_ ;
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return Whether the directionId field is set.
+ */
+ @java.lang.Override
+ public boolean hasDirectionId() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return The directionId.
+ */
+ @java.lang.Override
+ public int getDirectionId() {
+ return directionId_;
+ }
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @param value The directionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDirectionId(int value) {
+
+ directionId_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Corresponds to trip direction_id in GTFS trips.txt. If provided the
+ * route_id must also be provided.
+ *
+ *
+ * optional uint32 direction_id = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearDirectionId() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ directionId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.EntitySelector)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.EntitySelector)
+ private static final com.google.transit.realtime.GtfsRealtime.EntitySelector DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.EntitySelector();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public EntitySelector parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface TranslatedStringOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedString)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ java.util.List
+ getTranslationList();
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index);
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ int getTranslationCount();
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
+ getTranslationOrBuilderList();
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
+ int index);
+ }
+ /**
+ *
+ * An internationalized message containing per-language versions of a snippet of
+ * text or a URL.
+ * One of the strings from a message will be picked up. The resolution proceeds
+ * as follows:
+ * 1. If the UI language matches the language code of a translation,
+ * the first matching translation is picked.
+ * 2. If a default UI language (e.g., English) matches the language code of a
+ * translation, the first matching translation is picked.
+ * 3. If some translation has an unspecified language code, that translation is
+ * picked.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TranslatedString}
+ */
+ public static final class TranslatedString extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ TranslatedString> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TranslatedString)
+ TranslatedStringOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "TranslatedString");
+ }
+ // Use TranslatedString.newBuilder() to construct.
+ private TranslatedString(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private TranslatedString() {
+ translation_ = java.util.Collections.emptyList();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder.class);
+ }
+
+ public interface TranslationOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedString.Translation)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return Whether the text field is set.
+ */
+ boolean hasText();
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The text.
+ */
+ java.lang.String getText();
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The bytes for text.
+ */
+ com.google.protobuf.ByteString
+ getTextBytes();
+
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return Whether the language field is set.
+ */
+ boolean hasLanguage();
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The language.
+ */
+ java.lang.String getLanguage();
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The bytes for language.
+ */
+ com.google.protobuf.ByteString
+ getLanguageBytes();
+ }
+ /**
+ * Protobuf type {@code transit_realtime.TranslatedString.Translation}
+ */
+ public static final class Translation extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ Translation> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TranslatedString.Translation)
+ TranslationOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "Translation");
+ }
+ // Use Translation.newBuilder() to construct.
+ private Translation(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private Translation() {
+ text_ = "";
+ language_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TEXT_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object text_ = "";
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return Whether the text field is set.
+ */
+ @java.lang.Override
+ public boolean hasText() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The text.
+ */
+ @java.lang.Override
+ public java.lang.String getText() {
+ java.lang.Object ref = text_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ text_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The bytes for text.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getTextBytes() {
+ java.lang.Object ref = text_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ text_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LANGUAGE_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object language_ = "";
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return Whether the language field is set.
+ */
+ @java.lang.Override
+ public boolean hasLanguage() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The language.
+ */
+ @java.lang.Override
+ public java.lang.String getLanguage() {
+ java.lang.Object ref = language_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ language_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The bytes for language.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ java.lang.Object ref = language_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasText()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, text_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, language_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, language_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation other = (com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation) obj;
+
+ if (hasText() != other.hasText()) return false;
+ if (hasText()) {
+ if (!getText()
+ .equals(other.getText())) return false;
+ }
+ if (hasLanguage() != other.hasLanguage()) return false;
+ if (hasLanguage()) {
+ if (!getLanguage()
+ .equals(other.getLanguage())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasText()) {
+ hash = (37 * hash) + TEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getText().hashCode();
+ }
+ if (hasLanguage()) {
+ hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguage().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code transit_realtime.TranslatedString.Translation}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedString.Translation)
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ text_ = "";
+ language_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation build() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result = new com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.text_ = text_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.language_ = language_;
+ to_bitField0_ |= 0x00000002;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance()) return this;
+ if (other.hasText()) {
+ text_ = other.text_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasLanguage()) {
+ language_ = other.language_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasText()) {
+ return false;
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ text_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ language_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object text_ = "";
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return Whether the text field is set.
+ */
+ public boolean hasText() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The text.
+ */
+ public java.lang.String getText() {
+ java.lang.Object ref = text_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ text_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return The bytes for text.
+ */
+ public com.google.protobuf.ByteString
+ getTextBytes() {
+ java.lang.Object ref = text_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ text_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @param value The text to set.
+ * @return This builder for chaining.
+ */
+ public Builder setText(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ text_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearText() {
+ text_ = getDefaultInstance().getText();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * A UTF-8 string containing the message.
+ *
+ *
+ * required string text = 1;
+ * @param value The bytes for text to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTextBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ text_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object language_ = "";
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return Whether the language field is set.
+ */
+ public boolean hasLanguage() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The language.
+ */
+ public java.lang.String getLanguage() {
+ java.lang.Object ref = language_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ language_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return The bytes for language.
+ */
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ java.lang.Object ref = language_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @param value The language to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguage(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ language_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearLanguage() {
+ language_ = getDefaultInstance().getLanguage();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 2;
+ * @param value The bytes for language to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ language_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedString.Translation)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TranslatedString.Translation)
+ private static final com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Translation parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public static final int TRANSLATION_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private java.util.List translation_;
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ @java.lang.Override
+ public java.util.List getTranslationList() {
+ return translation_;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
+ getTranslationOrBuilderList() {
+ return translation_;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ @java.lang.Override
+ public int getTranslationCount() {
+ return translation_.size();
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index) {
+ return translation_.get(index);
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
+ int index) {
+ return translation_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ for (int i = 0; i < getTranslationCount(); i++) {
+ if (!getTranslation(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ for (int i = 0; i < translation_.size(); i++) {
+ output.writeMessage(1, translation_.get(i));
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+
+ {
+ final int count = translation_.size();
+ for (int i = 0; i < count; i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSizeNoTag(translation_.get(i));
+ }
+ size += 1 * count;
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TranslatedString other = (com.google.transit.realtime.GtfsRealtime.TranslatedString) obj;
+
+ if (!getTranslationList()
+ .equals(other.getTranslationList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getTranslationCount() > 0) {
+ hash = (37 * hash) + TRANSLATION_FIELD_NUMBER;
+ hash = (53 * hash) + getTranslationList().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedString prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An internationalized message containing per-language versions of a snippet of
+ * text or a URL.
+ * One of the strings from a message will be picked up. The resolution proceeds
+ * as follows:
+ * 1. If the UI language matches the language code of a translation,
+ * the first matching translation is picked.
+ * 2. If a default UI language (e.g., English) matches the language code of a
+ * translation, the first matching translation is picked.
+ * 3. If some translation has an unspecified language code, that translation is
+ * picked.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TranslatedString}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedString)
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TranslatedString.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (translationBuilder_ == null) {
+ translation_ = java.util.Collections.emptyList();
+ } else {
+ translation_ = null;
+ translationBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString build() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedString result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedString result = new com.google.transit.realtime.GtfsRealtime.TranslatedString(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TranslatedString result) {
+ if (translationBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ translation_ = java.util.Collections.unmodifiableList(translation_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.translation_ = translation_;
+ } else {
+ result.translation_ = translationBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedString result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedString)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedString other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) return this;
+ if (translationBuilder_ == null) {
+ if (!other.translation_.isEmpty()) {
+ if (translation_.isEmpty()) {
+ translation_ = other.translation_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureTranslationIsMutable();
+ translation_.addAll(other.translation_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.translation_.isEmpty()) {
+ if (translationBuilder_.isEmpty()) {
+ translationBuilder_.dispose();
+ translationBuilder_ = null;
+ translation_ = other.translation_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ translationBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ internalGetTranslationFieldBuilder() : null;
+ } else {
+ translationBuilder_.addAllMessages(other.translation_);
+ }
+ }
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ for (int i = 0; i < getTranslationCount(); i++) {
+ if (!getTranslation(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation m =
+ input.readMessage(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.parser(),
+ extensionRegistry);
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ translation_.add(m);
+ } else {
+ translationBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List translation_ =
+ java.util.Collections.emptyList();
+ private void ensureTranslationIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ translation_ = new java.util.ArrayList(translation_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder> translationBuilder_;
+
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public java.util.List getTranslationList() {
+ if (translationBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(translation_);
+ } else {
+ return translationBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public int getTranslationCount() {
+ if (translationBuilder_ == null) {
+ return translation_.size();
+ } else {
+ return translationBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index) {
+ if (translationBuilder_ == null) {
+ return translation_.get(index);
+ } else {
+ return translationBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder setTranslation(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
+ if (translationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTranslationIsMutable();
+ translation_.set(index, value);
+ onChanged();
+ } else {
+ translationBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder setTranslation(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ translation_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ translationBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder addTranslation(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
+ if (translationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTranslationIsMutable();
+ translation_.add(value);
+ onChanged();
+ } else {
+ translationBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder addTranslation(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
+ if (translationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTranslationIsMutable();
+ translation_.add(index, value);
+ onChanged();
+ } else {
+ translationBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder addTranslation(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ translation_.add(builderForValue.build());
+ onChanged();
+ } else {
+ translationBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder addTranslation(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ translation_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ translationBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder addAllTranslation(
+ java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation> values) {
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, translation_);
+ onChanged();
+ } else {
+ translationBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder clearTranslation() {
+ if (translationBuilder_ == null) {
+ translation_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ translationBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public Builder removeTranslation(int index) {
+ if (translationBuilder_ == null) {
+ ensureTranslationIsMutable();
+ translation_.remove(index);
+ onChanged();
+ } else {
+ translationBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder getTranslationBuilder(
+ int index) {
+ return internalGetTranslationFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
+ int index) {
+ if (translationBuilder_ == null) {
+ return translation_.get(index); } else {
+ return translationBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
+ getTranslationOrBuilderList() {
+ if (translationBuilder_ != null) {
+ return translationBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(translation_);
+ }
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder addTranslationBuilder() {
+ return internalGetTranslationFieldBuilder().addBuilder(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance());
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder addTranslationBuilder(
+ int index) {
+ return internalGetTranslationFieldBuilder().addBuilder(
+ index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance());
+ }
+ /**
+ *
+ * At least one translation must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedString.Translation translation = 1;
+ */
+ public java.util.List
+ getTranslationBuilderList() {
+ return internalGetTranslationFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
+ internalGetTranslationFieldBuilder() {
+ if (translationBuilder_ == null) {
+ translationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>(
+ translation_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ translation_ = null;
+ }
+ return translationBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedString)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TranslatedString)
+ private static final com.google.transit.realtime.GtfsRealtime.TranslatedString DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedString();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public TranslatedString parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface TranslatedImageOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedImage)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ java.util.List
+ getLocalizedImageList();
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index);
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ int getLocalizedImageCount();
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
+ getLocalizedImageOrBuilderList();
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
+ int index);
+ }
+ /**
+ *
+ * An internationalized image containing per-language versions of a URL linking to an image
+ * along with meta information
+ * Only one of the images from a message will be retained by consumers. The resolution proceeds
+ * as follows:
+ * 1. If the UI language matches the language code of a translation,
+ * the first matching translation is picked.
+ * 2. If a default UI language (e.g., English) matches the language code of a
+ * translation, the first matching translation is picked.
+ * 3. If some translation has an unspecified language code, that translation is
+ * picked.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TranslatedImage}
+ */
+ public static final class TranslatedImage extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ TranslatedImage> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TranslatedImage)
+ TranslatedImageOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "TranslatedImage");
+ }
+ // Use TranslatedImage.newBuilder() to construct.
+ private TranslatedImage(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private TranslatedImage() {
+ localizedImage_ = java.util.Collections.emptyList();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder.class);
+ }
+
+ public interface LocalizedImageOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedImage.LocalizedImage)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return Whether the url field is set.
+ */
+ boolean hasUrl();
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The url.
+ */
+ java.lang.String getUrl();
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The bytes for url.
+ */
+ com.google.protobuf.ByteString
+ getUrlBytes();
+
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return Whether the mediaType field is set.
+ */
+ boolean hasMediaType();
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The mediaType.
+ */
+ java.lang.String getMediaType();
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The bytes for mediaType.
+ */
+ com.google.protobuf.ByteString
+ getMediaTypeBytes();
+
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return Whether the language field is set.
+ */
+ boolean hasLanguage();
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The language.
+ */
+ java.lang.String getLanguage();
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The bytes for language.
+ */
+ com.google.protobuf.ByteString
+ getLanguageBytes();
+ }
+ /**
+ * Protobuf type {@code transit_realtime.TranslatedImage.LocalizedImage}
+ */
+ public static final class LocalizedImage extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ LocalizedImage> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TranslatedImage.LocalizedImage)
+ LocalizedImageOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "LocalizedImage");
+ }
+ // Use LocalizedImage.newBuilder() to construct.
+ private LocalizedImage(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private LocalizedImage() {
+ url_ = "";
+ mediaType_ = "";
+ language_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int URL_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object url_ = "";
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return Whether the url field is set.
+ */
+ @java.lang.Override
+ public boolean hasUrl() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The url.
+ */
+ @java.lang.Override
+ public java.lang.String getUrl() {
+ java.lang.Object ref = url_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ url_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The bytes for url.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ java.lang.Object ref = url_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MEDIA_TYPE_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object mediaType_ = "";
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return Whether the mediaType field is set.
+ */
+ @java.lang.Override
+ public boolean hasMediaType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The mediaType.
+ */
+ @java.lang.Override
+ public java.lang.String getMediaType() {
+ java.lang.Object ref = mediaType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ mediaType_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The bytes for mediaType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getMediaTypeBytes() {
+ java.lang.Object ref = mediaType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ mediaType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LANGUAGE_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object language_ = "";
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return Whether the language field is set.
+ */
+ @java.lang.Override
+ public boolean hasLanguage() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The language.
+ */
+ @java.lang.Override
+ public java.lang.String getLanguage() {
+ java.lang.Object ref = language_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ language_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The bytes for language.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ java.lang.Object ref = language_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasUrl()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasMediaType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, url_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, mediaType_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, language_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, url_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, mediaType_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, language_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage other = (com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage) obj;
+
+ if (hasUrl() != other.hasUrl()) return false;
+ if (hasUrl()) {
+ if (!getUrl()
+ .equals(other.getUrl())) return false;
+ }
+ if (hasMediaType() != other.hasMediaType()) return false;
+ if (hasMediaType()) {
+ if (!getMediaType()
+ .equals(other.getMediaType())) return false;
+ }
+ if (hasLanguage() != other.hasLanguage()) return false;
+ if (hasLanguage()) {
+ if (!getLanguage()
+ .equals(other.getLanguage())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasUrl()) {
+ hash = (37 * hash) + URL_FIELD_NUMBER;
+ hash = (53 * hash) + getUrl().hashCode();
+ }
+ if (hasMediaType()) {
+ hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMediaType().hashCode();
+ }
+ if (hasLanguage()) {
+ hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguage().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code transit_realtime.TranslatedImage.LocalizedImage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedImage.LocalizedImage)
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ url_ = "";
+ mediaType_ = "";
+ language_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage build() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result = new com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.url_ = url_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.mediaType_ = mediaType_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.language_ = language_;
+ to_bitField0_ |= 0x00000004;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance()) return this;
+ if (other.hasUrl()) {
+ url_ = other.url_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasMediaType()) {
+ mediaType_ = other.mediaType_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasLanguage()) {
+ language_ = other.language_;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasUrl()) {
+ return false;
+ }
+ if (!hasMediaType()) {
+ return false;
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ url_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ mediaType_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ language_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object url_ = "";
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return Whether the url field is set.
+ */
+ public boolean hasUrl() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The url.
+ */
+ public java.lang.String getUrl() {
+ java.lang.Object ref = url_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ url_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return The bytes for url.
+ */
+ public com.google.protobuf.ByteString
+ getUrlBytes() {
+ java.lang.Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @param value The url to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUrl(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ url_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearUrl() {
+ url_ = getDefaultInstance().getUrl();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * String containing an URL linking to an image
+ * The image linked must be less than 2MB.
+ * If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
+ * The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
+ *
+ *
+ * required string url = 1;
+ * @param value The bytes for url to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUrlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ url_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object mediaType_ = "";
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return Whether the mediaType field is set.
+ */
+ public boolean hasMediaType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The mediaType.
+ */
+ public java.lang.String getMediaType() {
+ java.lang.Object ref = mediaType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ mediaType_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return The bytes for mediaType.
+ */
+ public com.google.protobuf.ByteString
+ getMediaTypeBytes() {
+ java.lang.Object ref = mediaType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ mediaType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @param value The mediaType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMediaType(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ mediaType_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearMediaType() {
+ mediaType_ = getDefaultInstance().getMediaType();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * IANA media type as to specify the type of image to be displayed.
+ * The type must start with "image/"
+ *
+ *
+ * required string media_type = 2;
+ * @param value The bytes for mediaType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMediaTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ mediaType_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object language_ = "";
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return Whether the language field is set.
+ */
+ public boolean hasLanguage() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The language.
+ */
+ public java.lang.String getLanguage() {
+ java.lang.Object ref = language_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ language_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return The bytes for language.
+ */
+ public com.google.protobuf.ByteString
+ getLanguageBytes() {
+ java.lang.Object ref = language_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ language_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @param value The language to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguage(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ language_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearLanguage() {
+ language_ = getDefaultInstance().getLanguage();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * BCP-47 language code. Can be omitted if the language is unknown or if
+ * no i18n is done at all for the feed. At most one translation is
+ * allowed to have an unspecified language tag.
+ *
+ *
+ * optional string language = 3;
+ * @param value The bytes for language to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ language_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedImage.LocalizedImage)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TranslatedImage.LocalizedImage)
+ private static final com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public LocalizedImage parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public static final int LOCALIZED_IMAGE_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private java.util.List localizedImage_;
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ @java.lang.Override
+ public java.util.List getLocalizedImageList() {
+ return localizedImage_;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
+ getLocalizedImageOrBuilderList() {
+ return localizedImage_;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ @java.lang.Override
+ public int getLocalizedImageCount() {
+ return localizedImage_.size();
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index) {
+ return localizedImage_.get(index);
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
+ int index) {
+ return localizedImage_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ for (int i = 0; i < getLocalizedImageCount(); i++) {
+ if (!getLocalizedImage(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ for (int i = 0; i < localizedImage_.size(); i++) {
+ output.writeMessage(1, localizedImage_.get(i));
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+
+ {
+ final int count = localizedImage_.size();
+ for (int i = 0; i < count; i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSizeNoTag(localizedImage_.get(i));
+ }
+ size += 1 * count;
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage other = (com.google.transit.realtime.GtfsRealtime.TranslatedImage) obj;
+
+ if (!getLocalizedImageList()
+ .equals(other.getLocalizedImageList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getLocalizedImageCount() > 0) {
+ hash = (37 * hash) + LOCALIZED_IMAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getLocalizedImageList().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedImage prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An internationalized image containing per-language versions of a URL linking to an image
+ * along with meta information
+ * Only one of the images from a message will be retained by consumers. The resolution proceeds
+ * as follows:
+ * 1. If the UI language matches the language code of a translation,
+ * the first matching translation is picked.
+ * 2. If a default UI language (e.g., English) matches the language code of a
+ * translation, the first matching translation is picked.
+ * 3. If some translation has an unspecified language code, that translation is
+ * picked.
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TranslatedImage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedImage)
+ com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TranslatedImage.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (localizedImageBuilder_ == null) {
+ localizedImage_ = java.util.Collections.emptyList();
+ } else {
+ localizedImage_ = null;
+ localizedImageBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage build() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage result = new com.google.transit.realtime.GtfsRealtime.TranslatedImage(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TranslatedImage result) {
+ if (localizedImageBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ localizedImage_ = java.util.Collections.unmodifiableList(localizedImage_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.localizedImage_ = localizedImage_;
+ } else {
+ result.localizedImage_ = localizedImageBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedImage result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedImage)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedImage other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance()) return this;
+ if (localizedImageBuilder_ == null) {
+ if (!other.localizedImage_.isEmpty()) {
+ if (localizedImage_.isEmpty()) {
+ localizedImage_ = other.localizedImage_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.addAll(other.localizedImage_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.localizedImage_.isEmpty()) {
+ if (localizedImageBuilder_.isEmpty()) {
+ localizedImageBuilder_.dispose();
+ localizedImageBuilder_ = null;
+ localizedImage_ = other.localizedImage_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ localizedImageBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ internalGetLocalizedImageFieldBuilder() : null;
+ } else {
+ localizedImageBuilder_.addAllMessages(other.localizedImage_);
+ }
+ }
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ for (int i = 0; i < getLocalizedImageCount(); i++) {
+ if (!getLocalizedImage(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage m =
+ input.readMessage(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.parser(),
+ extensionRegistry);
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.add(m);
+ } else {
+ localizedImageBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List localizedImage_ =
+ java.util.Collections.emptyList();
+ private void ensureLocalizedImageIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ localizedImage_ = new java.util.ArrayList(localizedImage_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder> localizedImageBuilder_;
+
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public java.util.List getLocalizedImageList() {
+ if (localizedImageBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(localizedImage_);
+ } else {
+ return localizedImageBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public int getLocalizedImageCount() {
+ if (localizedImageBuilder_ == null) {
+ return localizedImage_.size();
+ } else {
+ return localizedImageBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index) {
+ if (localizedImageBuilder_ == null) {
+ return localizedImage_.get(index);
+ } else {
+ return localizedImageBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder setLocalizedImage(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
+ if (localizedImageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedImageIsMutable();
+ localizedImage_.set(index, value);
+ onChanged();
+ } else {
+ localizedImageBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder setLocalizedImage(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ localizedImageBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder addLocalizedImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
+ if (localizedImageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedImageIsMutable();
+ localizedImage_.add(value);
+ onChanged();
+ } else {
+ localizedImageBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder addLocalizedImage(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
+ if (localizedImageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedImageIsMutable();
+ localizedImage_.add(index, value);
+ onChanged();
+ } else {
+ localizedImageBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder addLocalizedImage(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.add(builderForValue.build());
+ onChanged();
+ } else {
+ localizedImageBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder addLocalizedImage(
+ int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ localizedImageBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder addAllLocalizedImage(
+ java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage> values) {
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, localizedImage_);
+ onChanged();
+ } else {
+ localizedImageBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder clearLocalizedImage() {
+ if (localizedImageBuilder_ == null) {
+ localizedImage_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ localizedImageBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public Builder removeLocalizedImage(int index) {
+ if (localizedImageBuilder_ == null) {
+ ensureLocalizedImageIsMutable();
+ localizedImage_.remove(index);
+ onChanged();
+ } else {
+ localizedImageBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder getLocalizedImageBuilder(
+ int index) {
+ return internalGetLocalizedImageFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
+ int index) {
+ if (localizedImageBuilder_ == null) {
+ return localizedImage_.get(index); } else {
+ return localizedImageBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
+ getLocalizedImageOrBuilderList() {
+ if (localizedImageBuilder_ != null) {
+ return localizedImageBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(localizedImage_);
+ }
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder addLocalizedImageBuilder() {
+ return internalGetLocalizedImageFieldBuilder().addBuilder(
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance());
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder addLocalizedImageBuilder(
+ int index) {
+ return internalGetLocalizedImageFieldBuilder().addBuilder(
+ index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance());
+ }
+ /**
+ *
+ * At least one localized image must be provided.
+ *
+ *
+ * repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
+ */
+ public java.util.List
+ getLocalizedImageBuilderList() {
+ return internalGetLocalizedImageFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
+ internalGetLocalizedImageFieldBuilder() {
+ if (localizedImageBuilder_ == null) {
+ localizedImageBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>(
+ localizedImage_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ localizedImage_ = null;
+ }
+ return localizedImageBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedImage)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.TranslatedImage)
+ private static final com.google.transit.realtime.GtfsRealtime.TranslatedImage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedImage();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public TranslatedImage parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface ShapeOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.Shape)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return Whether the shapeId field is set.
+ */
+ boolean hasShapeId();
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The shapeId.
+ */
+ java.lang.String getShapeId();
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The bytes for shapeId.
+ */
+ com.google.protobuf.ByteString
+ getShapeIdBytes();
+
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return Whether the encodedPolyline field is set.
+ */
+ boolean hasEncodedPolyline();
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The encodedPolyline.
+ */
+ java.lang.String getEncodedPolyline();
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The bytes for encodedPolyline.
+ */
+ com.google.protobuf.ByteString
+ getEncodedPolylineBytes();
+ }
+ /**
+ *
+ * Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
+ * such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
+ * Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
+ * the location of Stops exactly, but all Stops on a trip should lie within a small distance of
+ * the shape for that trip, i.e. close to straight line segments connecting the shape points
+ * NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.Shape}
+ */
+ public static final class Shape extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ Shape> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.Shape)
+ ShapeOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "Shape");
+ }
+ // Use Shape.newBuilder() to construct.
+ private Shape(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private Shape() {
+ shapeId_ = "";
+ encodedPolyline_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.Shape.class, com.google.transit.realtime.GtfsRealtime.Shape.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int SHAPE_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object shapeId_ = "";
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return Whether the shapeId field is set.
+ */
+ @java.lang.Override
+ public boolean hasShapeId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The shapeId.
+ */
+ @java.lang.Override
+ public java.lang.String getShapeId() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ shapeId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The bytes for shapeId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getShapeIdBytes() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ shapeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ENCODED_POLYLINE_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object encodedPolyline_ = "";
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return Whether the encodedPolyline field is set.
+ */
+ @java.lang.Override
+ public boolean hasEncodedPolyline() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The encodedPolyline.
+ */
+ @java.lang.Override
+ public java.lang.String getEncodedPolyline() {
+ java.lang.Object ref = encodedPolyline_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ encodedPolyline_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The bytes for encodedPolyline.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getEncodedPolylineBytes() {
+ java.lang.Object ref = encodedPolyline_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ encodedPolyline_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, shapeId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, encodedPolyline_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, shapeId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, encodedPolyline_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Shape)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.Shape other = (com.google.transit.realtime.GtfsRealtime.Shape) obj;
+
+ if (hasShapeId() != other.hasShapeId()) return false;
+ if (hasShapeId()) {
+ if (!getShapeId()
+ .equals(other.getShapeId())) return false;
+ }
+ if (hasEncodedPolyline() != other.hasEncodedPolyline()) return false;
+ if (hasEncodedPolyline()) {
+ if (!getEncodedPolyline()
+ .equals(other.getEncodedPolyline())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasShapeId()) {
+ hash = (37 * hash) + SHAPE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getShapeId().hashCode();
+ }
+ if (hasEncodedPolyline()) {
+ hash = (37 * hash) + ENCODED_POLYLINE_FIELD_NUMBER;
+ hash = (53 * hash) + getEncodedPolyline().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Shape prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
+ * such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
+ * Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
+ * the location of Stops exactly, but all Stops on a trip should lie within a small distance of
+ * the shape for that trip, i.e. close to straight line segments connecting the shape points
+ * NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.Shape}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.Shape, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.Shape)
+ com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.Shape.class, com.google.transit.realtime.GtfsRealtime.Shape.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.Shape.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ shapeId_ = "";
+ encodedPolyline_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Shape build() {
+ com.google.transit.realtime.GtfsRealtime.Shape result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Shape buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.Shape result = new com.google.transit.realtime.GtfsRealtime.Shape(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Shape result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.shapeId_ = shapeId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.encodedPolyline_ = encodedPolyline_;
+ to_bitField0_ |= 0x00000002;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Shape, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Shape, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Shape, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Shape, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.Shape) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.Shape)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Shape other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance()) return this;
+ if (other.hasShapeId()) {
+ shapeId_ = other.shapeId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasEncodedPolyline()) {
+ encodedPolyline_ = other.encodedPolyline_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ shapeId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ encodedPolyline_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object shapeId_ = "";
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return Whether the shapeId field is set.
+ */
+ public boolean hasShapeId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The shapeId.
+ */
+ public java.lang.String getShapeId() {
+ java.lang.Object ref = shapeId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ shapeId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return The bytes for shapeId.
+ */
+ public com.google.protobuf.ByteString
+ getShapeIdBytes() {
+ java.lang.Object ref = shapeId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ shapeId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @param value The shapeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShapeId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ shapeId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearShapeId() {
+ shapeId_ = getDefaultInstance().getShapeId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string shape_id = 1;
+ * @param value The bytes for shapeId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setShapeIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ shapeId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object encodedPolyline_ = "";
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return Whether the encodedPolyline field is set.
+ */
+ public boolean hasEncodedPolyline() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The encodedPolyline.
+ */
+ public java.lang.String getEncodedPolyline() {
+ java.lang.Object ref = encodedPolyline_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ encodedPolyline_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return The bytes for encodedPolyline.
+ */
+ public com.google.protobuf.ByteString
+ getEncodedPolylineBytes() {
+ java.lang.Object ref = encodedPolyline_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ encodedPolyline_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @param value The encodedPolyline to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEncodedPolyline(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ encodedPolyline_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearEncodedPolyline() {
+ encodedPolyline_ = getDefaultInstance().getEncodedPolyline();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
+ * For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
+ * This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
+ * See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * optional string encoded_polyline = 2;
+ * @param value The bytes for encodedPolyline to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEncodedPolylineBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ encodedPolyline_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.Shape)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.Shape)
+ private static final com.google.transit.realtime.GtfsRealtime.Shape DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Shape();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Shape parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface StopOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.Stop)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ * optional string stop_id = 1;
+ * @return Whether the stopId field is set.
+ */
+ boolean hasStopId();
+ /**
+ * optional string stop_id = 1;
+ * @return The stopId.
+ */
+ java.lang.String getStopId();
+ /**
+ * optional string stop_id = 1;
+ * @return The bytes for stopId.
+ */
+ com.google.protobuf.ByteString
+ getStopIdBytes();
+
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return Whether the stopCode field is set.
+ */
+ boolean hasStopCode();
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return The stopCode.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getStopCode();
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopCodeOrBuilder();
+
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return Whether the stopName field is set.
+ */
+ boolean hasStopName();
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return The stopName.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getStopName();
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopNameOrBuilder();
+
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return Whether the ttsStopName field is set.
+ */
+ boolean hasTtsStopName();
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return The ttsStopName.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsStopName();
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsStopNameOrBuilder();
+
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return Whether the stopDesc field is set.
+ */
+ boolean hasStopDesc();
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return The stopDesc.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getStopDesc();
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopDescOrBuilder();
+
+ /**
+ * optional float stop_lat = 6;
+ * @return Whether the stopLat field is set.
+ */
+ boolean hasStopLat();
+ /**
+ * optional float stop_lat = 6;
+ * @return The stopLat.
+ */
+ float getStopLat();
+
+ /**
+ * optional float stop_lon = 7;
+ * @return Whether the stopLon field is set.
+ */
+ boolean hasStopLon();
+ /**
+ * optional float stop_lon = 7;
+ * @return The stopLon.
+ */
+ float getStopLon();
+
+ /**
+ * optional string zone_id = 8;
+ * @return Whether the zoneId field is set.
+ */
+ boolean hasZoneId();
+ /**
+ * optional string zone_id = 8;
+ * @return The zoneId.
+ */
+ java.lang.String getZoneId();
+ /**
+ * optional string zone_id = 8;
+ * @return The bytes for zoneId.
+ */
+ com.google.protobuf.ByteString
+ getZoneIdBytes();
+
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return Whether the stopUrl field is set.
+ */
+ boolean hasStopUrl();
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return The stopUrl.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getStopUrl();
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopUrlOrBuilder();
+
+ /**
+ * optional string parent_station = 11;
+ * @return Whether the parentStation field is set.
+ */
+ boolean hasParentStation();
+ /**
+ * optional string parent_station = 11;
+ * @return The parentStation.
+ */
+ java.lang.String getParentStation();
+ /**
+ * optional string parent_station = 11;
+ * @return The bytes for parentStation.
+ */
+ com.google.protobuf.ByteString
+ getParentStationBytes();
+
+ /**
+ * optional string stop_timezone = 12;
+ * @return Whether the stopTimezone field is set.
+ */
+ boolean hasStopTimezone();
+ /**
+ * optional string stop_timezone = 12;
+ * @return The stopTimezone.
+ */
+ java.lang.String getStopTimezone();
+ /**
+ * optional string stop_timezone = 12;
+ * @return The bytes for stopTimezone.
+ */
+ com.google.protobuf.ByteString
+ getStopTimezoneBytes();
+
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return Whether the wheelchairBoarding field is set.
+ */
+ boolean hasWheelchairBoarding();
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return The wheelchairBoarding.
+ */
+ com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding getWheelchairBoarding();
+
+ /**
+ * optional string level_id = 14;
+ * @return Whether the levelId field is set.
+ */
+ boolean hasLevelId();
+ /**
+ * optional string level_id = 14;
+ * @return The levelId.
+ */
+ java.lang.String getLevelId();
+ /**
+ * optional string level_id = 14;
+ * @return The bytes for levelId.
+ */
+ com.google.protobuf.ByteString
+ getLevelIdBytes();
+
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return Whether the platformCode field is set.
+ */
+ boolean hasPlatformCode();
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return The platformCode.
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedString getPlatformCode();
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getPlatformCodeOrBuilder();
+ }
+ /**
+ *
+ * Describes a stop which is served by trips. All fields are as described in the GTFS-Static specification.
+ * NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.Stop}
+ */
+ public static final class Stop extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ Stop> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.Stop)
+ StopOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "Stop");
+ }
+ // Use Stop.newBuilder() to construct.
+ private Stop(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private Stop() {
+ stopId_ = "";
+ zoneId_ = "";
+ parentStation_ = "";
+ stopTimezone_ = "";
+ wheelchairBoarding_ = 0;
+ levelId_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.Stop.class, com.google.transit.realtime.GtfsRealtime.Stop.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code transit_realtime.Stop.WheelchairBoarding}
+ */
+ public enum WheelchairBoarding
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * UNKNOWN = 0;
+ */
+ UNKNOWN(0),
+ /**
+ * AVAILABLE = 1;
+ */
+ AVAILABLE(1),
+ /**
+ * NOT_AVAILABLE = 2;
+ */
+ NOT_AVAILABLE(2),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "WheelchairBoarding");
+ }
+ /**
+ * UNKNOWN = 0;
+ */
+ public static final int UNKNOWN_VALUE = 0;
+ /**
+ * AVAILABLE = 1;
+ */
+ public static final int AVAILABLE_VALUE = 1;
+ /**
+ * NOT_AVAILABLE = 2;
+ */
+ public static final int NOT_AVAILABLE_VALUE = 2;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static WheelchairBoarding valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static WheelchairBoarding forNumber(int value) {
+ switch (value) {
+ case 0: return UNKNOWN;
+ case 1: return AVAILABLE;
+ case 2: return NOT_AVAILABLE;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ WheelchairBoarding> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public WheelchairBoarding findValueByNumber(int number) {
+ return WheelchairBoarding.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValue(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.Stop.getDescriptor().getEnumType(0);
+ }
+
+ private static final WheelchairBoarding[] VALUES = values();
+
+ public static WheelchairBoarding valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private WheelchairBoarding(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:transit_realtime.Stop.WheelchairBoarding)
+ }
+
+ private int bitField0_;
+ public static final int STOP_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object stopId_ = "";
+ /**
+ * optional string stop_id = 1;
+ * @return Whether the stopId field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional string stop_id = 1;
+ * @return The stopId.
+ */
+ @java.lang.Override
+ public java.lang.String getStopId() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string stop_id = 1;
+ * @return The bytes for stopId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStopIdBytes() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STOP_CODE_FIELD_NUMBER = 2;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopCode_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return Whether the stopCode field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopCode() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return The stopCode.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopCode() {
+ return stopCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopCode_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopCodeOrBuilder() {
+ return stopCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopCode_;
+ }
+
+ public static final int STOP_NAME_FIELD_NUMBER = 3;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopName_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return Whether the stopName field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopName() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return The stopName.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopName() {
+ return stopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopName_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopNameOrBuilder() {
+ return stopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopName_;
+ }
+
+ public static final int TTS_STOP_NAME_FIELD_NUMBER = 4;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsStopName_;
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return Whether the ttsStopName field is set.
+ */
+ @java.lang.Override
+ public boolean hasTtsStopName() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return The ttsStopName.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsStopName() {
+ return ttsStopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsStopName_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsStopNameOrBuilder() {
+ return ttsStopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsStopName_;
+ }
+
+ public static final int STOP_DESC_FIELD_NUMBER = 5;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopDesc_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return Whether the stopDesc field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopDesc() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return The stopDesc.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopDesc() {
+ return stopDesc_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopDesc_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopDescOrBuilder() {
+ return stopDesc_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopDesc_;
+ }
+
+ public static final int STOP_LAT_FIELD_NUMBER = 6;
+ private float stopLat_ = 0F;
+ /**
+ * optional float stop_lat = 6;
+ * @return Whether the stopLat field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopLat() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional float stop_lat = 6;
+ * @return The stopLat.
+ */
+ @java.lang.Override
+ public float getStopLat() {
+ return stopLat_;
+ }
+
+ public static final int STOP_LON_FIELD_NUMBER = 7;
+ private float stopLon_ = 0F;
+ /**
+ * optional float stop_lon = 7;
+ * @return Whether the stopLon field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopLon() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional float stop_lon = 7;
+ * @return The stopLon.
+ */
+ @java.lang.Override
+ public float getStopLon() {
+ return stopLon_;
+ }
+
+ public static final int ZONE_ID_FIELD_NUMBER = 8;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object zoneId_ = "";
+ /**
+ * optional string zone_id = 8;
+ * @return Whether the zoneId field is set.
+ */
+ @java.lang.Override
+ public boolean hasZoneId() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string zone_id = 8;
+ * @return The zoneId.
+ */
+ @java.lang.Override
+ public java.lang.String getZoneId() {
+ java.lang.Object ref = zoneId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ zoneId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string zone_id = 8;
+ * @return The bytes for zoneId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getZoneIdBytes() {
+ java.lang.Object ref = zoneId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zoneId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STOP_URL_FIELD_NUMBER = 9;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopUrl_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return Whether the stopUrl field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopUrl() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return The stopUrl.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopUrl() {
+ return stopUrl_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopUrl_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopUrlOrBuilder() {
+ return stopUrl_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopUrl_;
+ }
+
+ public static final int PARENT_STATION_FIELD_NUMBER = 11;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object parentStation_ = "";
+ /**
+ * optional string parent_station = 11;
+ * @return Whether the parentStation field is set.
+ */
+ @java.lang.Override
+ public boolean hasParentStation() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+ /**
+ * optional string parent_station = 11;
+ * @return The parentStation.
+ */
+ @java.lang.Override
+ public java.lang.String getParentStation() {
+ java.lang.Object ref = parentStation_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ parentStation_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string parent_station = 11;
+ * @return The bytes for parentStation.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getParentStationBytes() {
+ java.lang.Object ref = parentStation_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parentStation_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STOP_TIMEZONE_FIELD_NUMBER = 12;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object stopTimezone_ = "";
+ /**
+ * optional string stop_timezone = 12;
+ * @return Whether the stopTimezone field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopTimezone() {
+ return ((bitField0_ & 0x00000400) != 0);
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @return The stopTimezone.
+ */
+ @java.lang.Override
+ public java.lang.String getStopTimezone() {
+ java.lang.Object ref = stopTimezone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopTimezone_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @return The bytes for stopTimezone.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStopTimezoneBytes() {
+ java.lang.Object ref = stopTimezone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopTimezone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int WHEELCHAIR_BOARDING_FIELD_NUMBER = 13;
+ private int wheelchairBoarding_ = 0;
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return Whether the wheelchairBoarding field is set.
+ */
+ @java.lang.Override public boolean hasWheelchairBoarding() {
+ return ((bitField0_ & 0x00000800) != 0);
+ }
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return The wheelchairBoarding.
+ */
+ @java.lang.Override public com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding getWheelchairBoarding() {
+ com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding result = com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding.forNumber(wheelchairBoarding_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding.UNKNOWN : result;
+ }
+
+ public static final int LEVEL_ID_FIELD_NUMBER = 14;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object levelId_ = "";
+ /**
+ * optional string level_id = 14;
+ * @return Whether the levelId field is set.
+ */
+ @java.lang.Override
+ public boolean hasLevelId() {
+ return ((bitField0_ & 0x00001000) != 0);
+ }
+ /**
+ * optional string level_id = 14;
+ * @return The levelId.
+ */
+ @java.lang.Override
+ public java.lang.String getLevelId() {
+ java.lang.Object ref = levelId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ levelId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string level_id = 14;
+ * @return The bytes for levelId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getLevelIdBytes() {
+ java.lang.Object ref = levelId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ levelId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PLATFORM_CODE_FIELD_NUMBER = 15;
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString platformCode_;
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return Whether the platformCode field is set.
+ */
+ @java.lang.Override
+ public boolean hasPlatformCode() {
+ return ((bitField0_ & 0x00002000) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return The platformCode.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getPlatformCode() {
+ return platformCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : platformCode_;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getPlatformCodeOrBuilder() {
+ return platformCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : platformCode_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasStopCode()) {
+ if (!getStopCode().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasStopName()) {
+ if (!getStopName().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasTtsStopName()) {
+ if (!getTtsStopName().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasStopDesc()) {
+ if (!getStopDesc().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasStopUrl()) {
+ if (!getStopUrl().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasPlatformCode()) {
+ if (!getPlatformCode().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, stopId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getStopCode());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(3, getStopName());
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeMessage(4, getTtsStopName());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeMessage(5, getStopDesc());
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeFloat(6, stopLat_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeFloat(7, stopLon_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 8, zoneId_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeMessage(9, getStopUrl());
+ }
+ if (((bitField0_ & 0x00000200) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 11, parentStation_);
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 12, stopTimezone_);
+ }
+ if (((bitField0_ & 0x00000800) != 0)) {
+ output.writeEnum(13, wheelchairBoarding_);
+ }
+ if (((bitField0_ & 0x00001000) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 14, levelId_);
+ }
+ if (((bitField0_ & 0x00002000) != 0)) {
+ output.writeMessage(15, getPlatformCode());
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, stopId_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getStopCode());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getStopName());
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getTtsStopName());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getStopDesc());
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(6, stopLat_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(7, stopLon_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(8, zoneId_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(9, getStopUrl());
+ }
+ if (((bitField0_ & 0x00000200) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(11, parentStation_);
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(12, stopTimezone_);
+ }
+ if (((bitField0_ & 0x00000800) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(13, wheelchairBoarding_);
+ }
+ if (((bitField0_ & 0x00001000) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(14, levelId_);
+ }
+ if (((bitField0_ & 0x00002000) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(15, getPlatformCode());
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Stop)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.Stop other = (com.google.transit.realtime.GtfsRealtime.Stop) obj;
+
+ if (hasStopId() != other.hasStopId()) return false;
+ if (hasStopId()) {
+ if (!getStopId()
+ .equals(other.getStopId())) return false;
+ }
+ if (hasStopCode() != other.hasStopCode()) return false;
+ if (hasStopCode()) {
+ if (!getStopCode()
+ .equals(other.getStopCode())) return false;
+ }
+ if (hasStopName() != other.hasStopName()) return false;
+ if (hasStopName()) {
+ if (!getStopName()
+ .equals(other.getStopName())) return false;
+ }
+ if (hasTtsStopName() != other.hasTtsStopName()) return false;
+ if (hasTtsStopName()) {
+ if (!getTtsStopName()
+ .equals(other.getTtsStopName())) return false;
+ }
+ if (hasStopDesc() != other.hasStopDesc()) return false;
+ if (hasStopDesc()) {
+ if (!getStopDesc()
+ .equals(other.getStopDesc())) return false;
+ }
+ if (hasStopLat() != other.hasStopLat()) return false;
+ if (hasStopLat()) {
+ if (java.lang.Float.floatToIntBits(getStopLat())
+ != java.lang.Float.floatToIntBits(
+ other.getStopLat())) return false;
+ }
+ if (hasStopLon() != other.hasStopLon()) return false;
+ if (hasStopLon()) {
+ if (java.lang.Float.floatToIntBits(getStopLon())
+ != java.lang.Float.floatToIntBits(
+ other.getStopLon())) return false;
+ }
+ if (hasZoneId() != other.hasZoneId()) return false;
+ if (hasZoneId()) {
+ if (!getZoneId()
+ .equals(other.getZoneId())) return false;
+ }
+ if (hasStopUrl() != other.hasStopUrl()) return false;
+ if (hasStopUrl()) {
+ if (!getStopUrl()
+ .equals(other.getStopUrl())) return false;
+ }
+ if (hasParentStation() != other.hasParentStation()) return false;
+ if (hasParentStation()) {
+ if (!getParentStation()
+ .equals(other.getParentStation())) return false;
+ }
+ if (hasStopTimezone() != other.hasStopTimezone()) return false;
+ if (hasStopTimezone()) {
+ if (!getStopTimezone()
+ .equals(other.getStopTimezone())) return false;
+ }
+ if (hasWheelchairBoarding() != other.hasWheelchairBoarding()) return false;
+ if (hasWheelchairBoarding()) {
+ if (wheelchairBoarding_ != other.wheelchairBoarding_) return false;
+ }
+ if (hasLevelId() != other.hasLevelId()) return false;
+ if (hasLevelId()) {
+ if (!getLevelId()
+ .equals(other.getLevelId())) return false;
+ }
+ if (hasPlatformCode() != other.hasPlatformCode()) return false;
+ if (hasPlatformCode()) {
+ if (!getPlatformCode()
+ .equals(other.getPlatformCode())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStopId()) {
+ hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getStopId().hashCode();
+ }
+ if (hasStopCode()) {
+ hash = (37 * hash) + STOP_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getStopCode().hashCode();
+ }
+ if (hasStopName()) {
+ hash = (37 * hash) + STOP_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getStopName().hashCode();
+ }
+ if (hasTtsStopName()) {
+ hash = (37 * hash) + TTS_STOP_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getTtsStopName().hashCode();
+ }
+ if (hasStopDesc()) {
+ hash = (37 * hash) + STOP_DESC_FIELD_NUMBER;
+ hash = (53 * hash) + getStopDesc().hashCode();
+ }
+ if (hasStopLat()) {
+ hash = (37 * hash) + STOP_LAT_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getStopLat());
+ }
+ if (hasStopLon()) {
+ hash = (37 * hash) + STOP_LON_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getStopLon());
+ }
+ if (hasZoneId()) {
+ hash = (37 * hash) + ZONE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getZoneId().hashCode();
+ }
+ if (hasStopUrl()) {
+ hash = (37 * hash) + STOP_URL_FIELD_NUMBER;
+ hash = (53 * hash) + getStopUrl().hashCode();
+ }
+ if (hasParentStation()) {
+ hash = (37 * hash) + PARENT_STATION_FIELD_NUMBER;
+ hash = (53 * hash) + getParentStation().hashCode();
+ }
+ if (hasStopTimezone()) {
+ hash = (37 * hash) + STOP_TIMEZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getStopTimezone().hashCode();
+ }
+ if (hasWheelchairBoarding()) {
+ hash = (37 * hash) + WHEELCHAIR_BOARDING_FIELD_NUMBER;
+ hash = (53 * hash) + wheelchairBoarding_;
+ }
+ if (hasLevelId()) {
+ hash = (37 * hash) + LEVEL_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getLevelId().hashCode();
+ }
+ if (hasPlatformCode()) {
+ hash = (37 * hash) + PLATFORM_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getPlatformCode().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.Stop parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Stop prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Describes a stop which is served by trips. All fields are as described in the GTFS-Static specification.
+ * NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.Stop}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.Stop, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.Stop)
+ com.google.transit.realtime.GtfsRealtime.StopOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.Stop.class, com.google.transit.realtime.GtfsRealtime.Stop.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.Stop.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ internalGetStopCodeFieldBuilder();
+ internalGetStopNameFieldBuilder();
+ internalGetTtsStopNameFieldBuilder();
+ internalGetStopDescFieldBuilder();
+ internalGetStopUrlFieldBuilder();
+ internalGetPlatformCodeFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ stopId_ = "";
+ stopCode_ = null;
+ if (stopCodeBuilder_ != null) {
+ stopCodeBuilder_.dispose();
+ stopCodeBuilder_ = null;
+ }
+ stopName_ = null;
+ if (stopNameBuilder_ != null) {
+ stopNameBuilder_.dispose();
+ stopNameBuilder_ = null;
+ }
+ ttsStopName_ = null;
+ if (ttsStopNameBuilder_ != null) {
+ ttsStopNameBuilder_.dispose();
+ ttsStopNameBuilder_ = null;
+ }
+ stopDesc_ = null;
+ if (stopDescBuilder_ != null) {
+ stopDescBuilder_.dispose();
+ stopDescBuilder_ = null;
+ }
+ stopLat_ = 0F;
+ stopLon_ = 0F;
+ zoneId_ = "";
+ stopUrl_ = null;
+ if (stopUrlBuilder_ != null) {
+ stopUrlBuilder_.dispose();
+ stopUrlBuilder_ = null;
+ }
+ parentStation_ = "";
+ stopTimezone_ = "";
+ wheelchairBoarding_ = 0;
+ levelId_ = "";
+ platformCode_ = null;
+ if (platformCodeBuilder_ != null) {
+ platformCodeBuilder_.dispose();
+ platformCodeBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Stop_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop build() {
+ com.google.transit.realtime.GtfsRealtime.Stop result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.Stop result = new com.google.transit.realtime.GtfsRealtime.Stop(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Stop result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.stopId_ = stopId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.stopCode_ = stopCodeBuilder_ == null
+ ? stopCode_
+ : stopCodeBuilder_.build();
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.stopName_ = stopNameBuilder_ == null
+ ? stopName_
+ : stopNameBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.ttsStopName_ = ttsStopNameBuilder_ == null
+ ? ttsStopName_
+ : ttsStopNameBuilder_.build();
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.stopDesc_ = stopDescBuilder_ == null
+ ? stopDesc_
+ : stopDescBuilder_.build();
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.stopLat_ = stopLat_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.stopLon_ = stopLon_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.zoneId_ = zoneId_;
+ to_bitField0_ |= 0x00000080;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.stopUrl_ = stopUrlBuilder_ == null
+ ? stopUrl_
+ : stopUrlBuilder_.build();
+ to_bitField0_ |= 0x00000100;
+ }
+ if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.parentStation_ = parentStation_;
+ to_bitField0_ |= 0x00000200;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.stopTimezone_ = stopTimezone_;
+ to_bitField0_ |= 0x00000400;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.wheelchairBoarding_ = wheelchairBoarding_;
+ to_bitField0_ |= 0x00000800;
+ }
+ if (((from_bitField0_ & 0x00001000) != 0)) {
+ result.levelId_ = levelId_;
+ to_bitField0_ |= 0x00001000;
+ }
+ if (((from_bitField0_ & 0x00002000) != 0)) {
+ result.platformCode_ = platformCodeBuilder_ == null
+ ? platformCode_
+ : platformCodeBuilder_.build();
+ to_bitField0_ |= 0x00002000;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Stop, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Stop, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Stop, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.Stop, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.Stop) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.Stop)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Stop other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.Stop.getDefaultInstance()) return this;
+ if (other.hasStopId()) {
+ stopId_ = other.stopId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasStopCode()) {
+ mergeStopCode(other.getStopCode());
+ }
+ if (other.hasStopName()) {
+ mergeStopName(other.getStopName());
+ }
+ if (other.hasTtsStopName()) {
+ mergeTtsStopName(other.getTtsStopName());
+ }
+ if (other.hasStopDesc()) {
+ mergeStopDesc(other.getStopDesc());
+ }
+ if (other.hasStopLat()) {
+ setStopLat(other.getStopLat());
+ }
+ if (other.hasStopLon()) {
+ setStopLon(other.getStopLon());
+ }
+ if (other.hasZoneId()) {
+ zoneId_ = other.zoneId_;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ }
+ if (other.hasStopUrl()) {
+ mergeStopUrl(other.getStopUrl());
+ }
+ if (other.hasParentStation()) {
+ parentStation_ = other.parentStation_;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ }
+ if (other.hasStopTimezone()) {
+ stopTimezone_ = other.stopTimezone_;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ }
+ if (other.hasWheelchairBoarding()) {
+ setWheelchairBoarding(other.getWheelchairBoarding());
+ }
+ if (other.hasLevelId()) {
+ levelId_ = other.levelId_;
+ bitField0_ |= 0x00001000;
+ onChanged();
+ }
+ if (other.hasPlatformCode()) {
+ mergePlatformCode(other.getPlatformCode());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasStopCode()) {
+ if (!getStopCode().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasStopName()) {
+ if (!getStopName().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasTtsStopName()) {
+ if (!getTtsStopName().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasStopDesc()) {
+ if (!getStopDesc().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasStopUrl()) {
+ if (!getStopUrl().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasPlatformCode()) {
+ if (!getPlatformCode().isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ stopId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ input.readMessage(
+ internalGetStopCodeFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ input.readMessage(
+ internalGetStopNameFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34: {
+ input.readMessage(
+ internalGetTtsStopNameFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42: {
+ input.readMessage(
+ internalGetStopDescFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ case 53: {
+ stopLat_ = input.readFloat();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 53
+ case 61: {
+ stopLon_ = input.readFloat();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 61
+ case 66: {
+ zoneId_ = input.readBytes();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 66
+ case 74: {
+ input.readMessage(
+ internalGetStopUrlFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 74
+ case 90: {
+ parentStation_ = input.readBytes();
+ bitField0_ |= 0x00000200;
+ break;
+ } // case 90
+ case 98: {
+ stopTimezone_ = input.readBytes();
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 98
+ case 104: {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding tmpValue =
+ com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(13, tmpRaw);
+ } else {
+ wheelchairBoarding_ = tmpRaw;
+ bitField0_ |= 0x00000800;
+ }
+ break;
+ } // case 104
+ case 114: {
+ levelId_ = input.readBytes();
+ bitField0_ |= 0x00001000;
+ break;
+ } // case 114
+ case 122: {
+ input.readMessage(
+ internalGetPlatformCodeFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00002000;
+ break;
+ } // case 122
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object stopId_ = "";
+ /**
+ * optional string stop_id = 1;
+ * @return Whether the stopId field is set.
+ */
+ public boolean hasStopId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional string stop_id = 1;
+ * @return The stopId.
+ */
+ public java.lang.String getStopId() {
+ java.lang.Object ref = stopId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string stop_id = 1;
+ * @return The bytes for stopId.
+ */
+ public com.google.protobuf.ByteString
+ getStopIdBytes() {
+ java.lang.Object ref = stopId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string stop_id = 1;
+ * @param value The stopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopId() {
+ stopId_ = getDefaultInstance().getStopId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_id = 1;
+ * @param value The bytes for stopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopCode_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> stopCodeBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return Whether the stopCode field is set.
+ */
+ public boolean hasStopCode() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ * @return The stopCode.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopCode() {
+ if (stopCodeBuilder_ == null) {
+ return stopCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopCode_;
+ } else {
+ return stopCodeBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public Builder setStopCode(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopCodeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stopCode_ = value;
+ } else {
+ stopCodeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public Builder setStopCode(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (stopCodeBuilder_ == null) {
+ stopCode_ = builderForValue.build();
+ } else {
+ stopCodeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public Builder mergeStopCode(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopCodeBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ stopCode_ != null &&
+ stopCode_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getStopCodeBuilder().mergeFrom(value);
+ } else {
+ stopCode_ = value;
+ }
+ } else {
+ stopCodeBuilder_.mergeFrom(value);
+ }
+ if (stopCode_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public Builder clearStopCode() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ stopCode_ = null;
+ if (stopCodeBuilder_ != null) {
+ stopCodeBuilder_.dispose();
+ stopCodeBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getStopCodeBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return internalGetStopCodeFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopCodeOrBuilder() {
+ if (stopCodeBuilder_ != null) {
+ return stopCodeBuilder_.getMessageOrBuilder();
+ } else {
+ return stopCode_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopCode_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_code = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetStopCodeFieldBuilder() {
+ if (stopCodeBuilder_ == null) {
+ stopCodeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getStopCode(),
+ getParentForChildren(),
+ isClean());
+ stopCode_ = null;
+ }
+ return stopCodeBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopName_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> stopNameBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return Whether the stopName field is set.
+ */
+ public boolean hasStopName() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ * @return The stopName.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopName() {
+ if (stopNameBuilder_ == null) {
+ return stopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopName_;
+ } else {
+ return stopNameBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public Builder setStopName(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopNameBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stopName_ = value;
+ } else {
+ stopNameBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public Builder setStopName(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (stopNameBuilder_ == null) {
+ stopName_ = builderForValue.build();
+ } else {
+ stopNameBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public Builder mergeStopName(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopNameBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0) &&
+ stopName_ != null &&
+ stopName_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getStopNameBuilder().mergeFrom(value);
+ } else {
+ stopName_ = value;
+ }
+ } else {
+ stopNameBuilder_.mergeFrom(value);
+ }
+ if (stopName_ != null) {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public Builder clearStopName() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ stopName_ = null;
+ if (stopNameBuilder_ != null) {
+ stopNameBuilder_.dispose();
+ stopNameBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getStopNameBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return internalGetStopNameFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopNameOrBuilder() {
+ if (stopNameBuilder_ != null) {
+ return stopNameBuilder_.getMessageOrBuilder();
+ } else {
+ return stopName_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopName_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_name = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetStopNameFieldBuilder() {
+ if (stopNameBuilder_ == null) {
+ stopNameBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getStopName(),
+ getParentForChildren(),
+ isClean());
+ stopName_ = null;
+ }
+ return stopNameBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsStopName_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> ttsStopNameBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return Whether the ttsStopName field is set.
+ */
+ public boolean hasTtsStopName() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ * @return The ttsStopName.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsStopName() {
+ if (ttsStopNameBuilder_ == null) {
+ return ttsStopName_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsStopName_;
+ } else {
+ return ttsStopNameBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public Builder setTtsStopName(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (ttsStopNameBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ttsStopName_ = value;
+ } else {
+ ttsStopNameBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public Builder setTtsStopName(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (ttsStopNameBuilder_ == null) {
+ ttsStopName_ = builderForValue.build();
+ } else {
+ ttsStopNameBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public Builder mergeTtsStopName(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (ttsStopNameBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0) &&
+ ttsStopName_ != null &&
+ ttsStopName_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getTtsStopNameBuilder().mergeFrom(value);
+ } else {
+ ttsStopName_ = value;
+ }
+ } else {
+ ttsStopNameBuilder_.mergeFrom(value);
+ }
+ if (ttsStopName_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public Builder clearTtsStopName() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ ttsStopName_ = null;
+ if (ttsStopNameBuilder_ != null) {
+ ttsStopNameBuilder_.dispose();
+ ttsStopNameBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getTtsStopNameBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return internalGetTtsStopNameFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsStopNameOrBuilder() {
+ if (ttsStopNameBuilder_ != null) {
+ return ttsStopNameBuilder_.getMessageOrBuilder();
+ } else {
+ return ttsStopName_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsStopName_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString tts_stop_name = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetTtsStopNameFieldBuilder() {
+ if (ttsStopNameBuilder_ == null) {
+ ttsStopNameBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getTtsStopName(),
+ getParentForChildren(),
+ isClean());
+ ttsStopName_ = null;
+ }
+ return ttsStopNameBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopDesc_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> stopDescBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return Whether the stopDesc field is set.
+ */
+ public boolean hasStopDesc() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ * @return The stopDesc.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopDesc() {
+ if (stopDescBuilder_ == null) {
+ return stopDesc_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopDesc_;
+ } else {
+ return stopDescBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public Builder setStopDesc(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopDescBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stopDesc_ = value;
+ } else {
+ stopDescBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public Builder setStopDesc(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (stopDescBuilder_ == null) {
+ stopDesc_ = builderForValue.build();
+ } else {
+ stopDescBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public Builder mergeStopDesc(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopDescBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) != 0) &&
+ stopDesc_ != null &&
+ stopDesc_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getStopDescBuilder().mergeFrom(value);
+ } else {
+ stopDesc_ = value;
+ }
+ } else {
+ stopDescBuilder_.mergeFrom(value);
+ }
+ if (stopDesc_ != null) {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public Builder clearStopDesc() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ stopDesc_ = null;
+ if (stopDescBuilder_ != null) {
+ stopDescBuilder_.dispose();
+ stopDescBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getStopDescBuilder() {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return internalGetStopDescFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopDescOrBuilder() {
+ if (stopDescBuilder_ != null) {
+ return stopDescBuilder_.getMessageOrBuilder();
+ } else {
+ return stopDesc_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopDesc_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_desc = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetStopDescFieldBuilder() {
+ if (stopDescBuilder_ == null) {
+ stopDescBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getStopDesc(),
+ getParentForChildren(),
+ isClean());
+ stopDesc_ = null;
+ }
+ return stopDescBuilder_;
+ }
+
+ private float stopLat_ ;
+ /**
+ * optional float stop_lat = 6;
+ * @return Whether the stopLat field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopLat() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional float stop_lat = 6;
+ * @return The stopLat.
+ */
+ @java.lang.Override
+ public float getStopLat() {
+ return stopLat_;
+ }
+ /**
+ * optional float stop_lat = 6;
+ * @param value The stopLat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopLat(float value) {
+
+ stopLat_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional float stop_lat = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopLat() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ stopLat_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private float stopLon_ ;
+ /**
+ * optional float stop_lon = 7;
+ * @return Whether the stopLon field is set.
+ */
+ @java.lang.Override
+ public boolean hasStopLon() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional float stop_lon = 7;
+ * @return The stopLon.
+ */
+ @java.lang.Override
+ public float getStopLon() {
+ return stopLon_;
+ }
+ /**
+ * optional float stop_lon = 7;
+ * @param value The stopLon to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopLon(float value) {
+
+ stopLon_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional float stop_lon = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopLon() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ stopLon_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zoneId_ = "";
+ /**
+ * optional string zone_id = 8;
+ * @return Whether the zoneId field is set.
+ */
+ public boolean hasZoneId() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string zone_id = 8;
+ * @return The zoneId.
+ */
+ public java.lang.String getZoneId() {
+ java.lang.Object ref = zoneId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ zoneId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string zone_id = 8;
+ * @return The bytes for zoneId.
+ */
+ public com.google.protobuf.ByteString
+ getZoneIdBytes() {
+ java.lang.Object ref = zoneId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zoneId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string zone_id = 8;
+ * @param value The zoneId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZoneId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ zoneId_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string zone_id = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearZoneId() {
+ zoneId_ = getDefaultInstance().getZoneId();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string zone_id = 8;
+ * @param value The bytes for zoneId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZoneIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ zoneId_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString stopUrl_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> stopUrlBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return Whether the stopUrl field is set.
+ */
+ public boolean hasStopUrl() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ * @return The stopUrl.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getStopUrl() {
+ if (stopUrlBuilder_ == null) {
+ return stopUrl_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopUrl_;
+ } else {
+ return stopUrlBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public Builder setStopUrl(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopUrlBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stopUrl_ = value;
+ } else {
+ stopUrlBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public Builder setStopUrl(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (stopUrlBuilder_ == null) {
+ stopUrl_ = builderForValue.build();
+ } else {
+ stopUrlBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public Builder mergeStopUrl(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (stopUrlBuilder_ == null) {
+ if (((bitField0_ & 0x00000100) != 0) &&
+ stopUrl_ != null &&
+ stopUrl_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getStopUrlBuilder().mergeFrom(value);
+ } else {
+ stopUrl_ = value;
+ }
+ } else {
+ stopUrlBuilder_.mergeFrom(value);
+ }
+ if (stopUrl_ != null) {
+ bitField0_ |= 0x00000100;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public Builder clearStopUrl() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ stopUrl_ = null;
+ if (stopUrlBuilder_ != null) {
+ stopUrlBuilder_.dispose();
+ stopUrlBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getStopUrlBuilder() {
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return internalGetStopUrlFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getStopUrlOrBuilder() {
+ if (stopUrlBuilder_ != null) {
+ return stopUrlBuilder_.getMessageOrBuilder();
+ } else {
+ return stopUrl_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : stopUrl_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString stop_url = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetStopUrlFieldBuilder() {
+ if (stopUrlBuilder_ == null) {
+ stopUrlBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getStopUrl(),
+ getParentForChildren(),
+ isClean());
+ stopUrl_ = null;
+ }
+ return stopUrlBuilder_;
+ }
+
+ private java.lang.Object parentStation_ = "";
+ /**
+ * optional string parent_station = 11;
+ * @return Whether the parentStation field is set.
+ */
+ public boolean hasParentStation() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+ /**
+ * optional string parent_station = 11;
+ * @return The parentStation.
+ */
+ public java.lang.String getParentStation() {
+ java.lang.Object ref = parentStation_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ parentStation_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string parent_station = 11;
+ * @return The bytes for parentStation.
+ */
+ public com.google.protobuf.ByteString
+ getParentStationBytes() {
+ java.lang.Object ref = parentStation_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ parentStation_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string parent_station = 11;
+ * @param value The parentStation to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentStation(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ parentStation_ = value;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string parent_station = 11;
+ * @return This builder for chaining.
+ */
+ public Builder clearParentStation() {
+ parentStation_ = getDefaultInstance().getParentStation();
+ bitField0_ = (bitField0_ & ~0x00000200);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string parent_station = 11;
+ * @param value The bytes for parentStation to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentStationBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ parentStation_ = value;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object stopTimezone_ = "";
+ /**
+ * optional string stop_timezone = 12;
+ * @return Whether the stopTimezone field is set.
+ */
+ public boolean hasStopTimezone() {
+ return ((bitField0_ & 0x00000400) != 0);
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @return The stopTimezone.
+ */
+ public java.lang.String getStopTimezone() {
+ java.lang.Object ref = stopTimezone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stopTimezone_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @return The bytes for stopTimezone.
+ */
+ public com.google.protobuf.ByteString
+ getStopTimezoneBytes() {
+ java.lang.Object ref = stopTimezone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stopTimezone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @param value The stopTimezone to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopTimezone(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopTimezone_ = value;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @return This builder for chaining.
+ */
+ public Builder clearStopTimezone() {
+ stopTimezone_ = getDefaultInstance().getStopTimezone();
+ bitField0_ = (bitField0_ & ~0x00000400);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string stop_timezone = 12;
+ * @param value The bytes for stopTimezone to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStopTimezoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ stopTimezone_ = value;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
+ }
+
+ private int wheelchairBoarding_ = 0;
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return Whether the wheelchairBoarding field is set.
+ */
+ @java.lang.Override public boolean hasWheelchairBoarding() {
+ return ((bitField0_ & 0x00000800) != 0);
+ }
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return The wheelchairBoarding.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding getWheelchairBoarding() {
+ com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding result = com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding.forNumber(wheelchairBoarding_);
+ return result == null ? com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding.UNKNOWN : result;
+ }
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @param value The wheelchairBoarding to set.
+ * @return This builder for chaining.
+ */
+ public Builder setWheelchairBoarding(com.google.transit.realtime.GtfsRealtime.Stop.WheelchairBoarding value) {
+ if (value == null) { throw new NullPointerException(); }
+ bitField0_ |= 0x00000800;
+ wheelchairBoarding_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Stop.WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
+ * @return This builder for chaining.
+ */
+ public Builder clearWheelchairBoarding() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ wheelchairBoarding_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object levelId_ = "";
+ /**
+ * optional string level_id = 14;
+ * @return Whether the levelId field is set.
+ */
+ public boolean hasLevelId() {
+ return ((bitField0_ & 0x00001000) != 0);
+ }
+ /**
+ * optional string level_id = 14;
+ * @return The levelId.
+ */
+ public java.lang.String getLevelId() {
+ java.lang.Object ref = levelId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ levelId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string level_id = 14;
+ * @return The bytes for levelId.
+ */
+ public com.google.protobuf.ByteString
+ getLevelIdBytes() {
+ java.lang.Object ref = levelId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ levelId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string level_id = 14;
+ * @param value The levelId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLevelId(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ levelId_ = value;
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string level_id = 14;
+ * @return This builder for chaining.
+ */
+ public Builder clearLevelId() {
+ levelId_ = getDefaultInstance().getLevelId();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string level_id = 14;
+ * @param value The bytes for levelId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLevelIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ levelId_ = value;
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TranslatedString platformCode_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> platformCodeBuilder_;
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return Whether the platformCode field is set.
+ */
+ public boolean hasPlatformCode() {
+ return ((bitField0_ & 0x00002000) != 0);
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ * @return The platformCode.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString getPlatformCode() {
+ if (platformCodeBuilder_ == null) {
+ return platformCode_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : platformCode_;
+ } else {
+ return platformCodeBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public Builder setPlatformCode(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (platformCodeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ platformCode_ = value;
+ } else {
+ platformCodeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public Builder setPlatformCode(
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
+ if (platformCodeBuilder_ == null) {
+ platformCode_ = builderForValue.build();
+ } else {
+ platformCodeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public Builder mergePlatformCode(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
+ if (platformCodeBuilder_ == null) {
+ if (((bitField0_ & 0x00002000) != 0) &&
+ platformCode_ != null &&
+ platformCode_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
+ getPlatformCodeBuilder().mergeFrom(value);
+ } else {
+ platformCode_ = value;
+ }
+ } else {
+ platformCodeBuilder_.mergeFrom(value);
+ }
+ if (platformCode_ != null) {
+ bitField0_ |= 0x00002000;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public Builder clearPlatformCode() {
+ bitField0_ = (bitField0_ & ~0x00002000);
+ platformCode_ = null;
+ if (platformCodeBuilder_ != null) {
+ platformCodeBuilder_.dispose();
+ platformCodeBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getPlatformCodeBuilder() {
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return internalGetPlatformCodeFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getPlatformCodeOrBuilder() {
+ if (platformCodeBuilder_ != null) {
+ return platformCodeBuilder_.getMessageOrBuilder();
+ } else {
+ return platformCode_ == null ?
+ com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : platformCode_;
+ }
+ }
+ /**
+ * optional .transit_realtime.TranslatedString platform_code = 15;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
+ internalGetPlatformCodeFieldBuilder() {
+ if (platformCodeBuilder_ == null) {
+ platformCodeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
+ getPlatformCode(),
+ getParentForChildren(),
+ isClean());
+ platformCode_ = null;
+ }
+ return platformCodeBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.Stop)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.Stop)
+ private static final com.google.transit.realtime.GtfsRealtime.Stop DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Stop();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.Stop getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Stop parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Stop getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface TripModificationsOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripModifications)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * A list of selected trips affected by this TripModifications.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.SelectedTrips selected_trips = 1;
+ */
+ java.util.List
+ getSelectedTripsList();
+ /**
+ *
+ * A list of selected trips affected by this TripModifications.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.SelectedTrips selected_trips = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModifications.SelectedTrips getSelectedTrips(int index);
+ /**
+ *
+ * A list of selected trips affected by this TripModifications.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.SelectedTrips selected_trips = 1;
+ */
+ int getSelectedTripsCount();
+ /**
+ *
+ * A list of selected trips affected by this TripModifications.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.SelectedTrips selected_trips = 1;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.TripModifications.SelectedTripsOrBuilder>
+ getSelectedTripsOrBuilderList();
+ /**
+ *
+ * A list of selected trips affected by this TripModifications.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.SelectedTrips selected_trips = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModifications.SelectedTripsOrBuilder getSelectedTripsOrBuilder(
+ int index);
+
+ /**
+ *
+ * A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
+ * Useful to target multiple departures of a trip_id in a frequency-based trip.
+ *
+ *
+ * repeated string start_times = 2;
+ * @return A list containing the startTimes.
+ */
+ java.util.List
+ getStartTimesList();
+ /**
+ *
+ * A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
+ * Useful to target multiple departures of a trip_id in a frequency-based trip.
+ *
+ *
+ * repeated string start_times = 2;
+ * @return The count of startTimes.
+ */
+ int getStartTimesCount();
+ /**
+ *
+ * A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
+ * Useful to target multiple departures of a trip_id in a frequency-based trip.
+ *
+ *
+ * repeated string start_times = 2;
+ * @param index The index of the element to return.
+ * @return The startTimes at the given index.
+ */
+ java.lang.String getStartTimes(int index);
+ /**
+ *
+ * A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
+ * Useful to target multiple departures of a trip_id in a frequency-based trip.
+ *
+ *
+ * repeated string start_times = 2;
+ * @param index The index of the value to return.
+ * @return The bytes of the startTimes at the given index.
+ */
+ com.google.protobuf.ByteString
+ getStartTimesBytes(int index);
+
+ /**
+ *
+ * Dates on which the modifications occurs, in the YYYYMMDD format. Producers SHOULD only transmit detours occurring within the next week.
+ * The dates provided should not be used as user-facing information, if a user-facing start and end date needs to be provided, they can be provided in the linked service alert with `service_alert_id`
+ *
+ *
+ * repeated string service_dates = 3;
+ * @return A list containing the serviceDates.
+ */
+ java.util.List
+ getServiceDatesList();
+ /**
+ *
+ * Dates on which the modifications occurs, in the YYYYMMDD format. Producers SHOULD only transmit detours occurring within the next week.
+ * The dates provided should not be used as user-facing information, if a user-facing start and end date needs to be provided, they can be provided in the linked service alert with `service_alert_id`
+ *
+ *
+ * repeated string service_dates = 3;
+ * @return The count of serviceDates.
+ */
+ int getServiceDatesCount();
+ /**
+ *
+ * Dates on which the modifications occurs, in the YYYYMMDD format. Producers SHOULD only transmit detours occurring within the next week.
+ * The dates provided should not be used as user-facing information, if a user-facing start and end date needs to be provided, they can be provided in the linked service alert with `service_alert_id`
+ *
+ *
+ * repeated string service_dates = 3;
+ * @param index The index of the element to return.
+ * @return The serviceDates at the given index.
+ */
+ java.lang.String getServiceDates(int index);
+ /**
+ *
+ * Dates on which the modifications occurs, in the YYYYMMDD format. Producers SHOULD only transmit detours occurring within the next week.
+ * The dates provided should not be used as user-facing information, if a user-facing start and end date needs to be provided, they can be provided in the linked service alert with `service_alert_id`
+ *
+ *
+ * repeated string service_dates = 3;
+ * @param index The index of the value to return.
+ * @return The bytes of the serviceDates at the given index.
+ */
+ com.google.protobuf.ByteString
+ getServiceDatesBytes(int index);
+
+ /**
+ *
+ * A list of modifications to apply to the affected trips.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.Modification modifications = 4;
+ */
+ java.util.List
+ getModificationsList();
+ /**
+ *
+ * A list of modifications to apply to the affected trips.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.Modification modifications = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification getModifications(int index);
+ /**
+ *
+ * A list of modifications to apply to the affected trips.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.Modification modifications = 4;
+ */
+ int getModificationsCount();
+ /**
+ *
+ * A list of modifications to apply to the affected trips.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.Modification modifications = 4;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.TripModifications.ModificationOrBuilder>
+ getModificationsOrBuilderList();
+ /**
+ *
+ * A list of modifications to apply to the affected trips.
+ *
+ *
+ * repeated .transit_realtime.TripModifications.Modification modifications = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripModifications.ModificationOrBuilder getModificationsOrBuilder(
+ int index);
+ }
+ /**
+ *
+ * NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripModifications}
+ */
+ public static final class TripModifications extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ TripModifications> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripModifications)
+ TripModificationsOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "TripModifications");
+ }
+ // Use TripModifications.newBuilder() to construct.
+ private TripModifications(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private TripModifications() {
+ selectedTrips_ = java.util.Collections.emptyList();
+ startTimes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ serviceDates_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ modifications_ = java.util.Collections.emptyList();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripModifications.class, com.google.transit.realtime.GtfsRealtime.TripModifications.Builder.class);
+ }
+
+ public interface ModificationOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripModifications.Modification)
+ com.google.protobuf.GeneratedMessage.
+ ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return Whether the startStopSelector field is set.
+ */
+ boolean hasStartStopSelector();
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return The startStopSelector.
+ */
+ com.google.transit.realtime.GtfsRealtime.StopSelector getStartStopSelector();
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getStartStopSelectorOrBuilder();
+
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return Whether the endStopSelector field is set.
+ */
+ boolean hasEndStopSelector();
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return The endStopSelector.
+ */
+ com.google.transit.realtime.GtfsRealtime.StopSelector getEndStopSelector();
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getEndStopSelectorOrBuilder();
+
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return Whether the propagatedModificationDelay field is set.
+ */
+ boolean hasPropagatedModificationDelay();
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return The propagatedModificationDelay.
+ */
+ int getPropagatedModificationDelay();
+
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ java.util.List
+ getReplacementStopsList();
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.ReplacementStop getReplacementStops(int index);
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ int getReplacementStopsCount();
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.ReplacementStopOrBuilder>
+ getReplacementStopsOrBuilderList();
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.ReplacementStopOrBuilder getReplacementStopsOrBuilder(
+ int index);
+
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return Whether the serviceAlertId field is set.
+ */
+ boolean hasServiceAlertId();
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return The serviceAlertId.
+ */
+ java.lang.String getServiceAlertId();
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return The bytes for serviceAlertId.
+ */
+ com.google.protobuf.ByteString
+ getServiceAlertIdBytes();
+
+ /**
+ *
+ * This timestamp identifies the moment when the modification has last been changed.
+ * In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 last_modified_time = 6;
+ * @return Whether the lastModifiedTime field is set.
+ */
+ boolean hasLastModifiedTime();
+ /**
+ *
+ * This timestamp identifies the moment when the modification has last been changed.
+ * In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 last_modified_time = 6;
+ * @return The lastModifiedTime.
+ */
+ long getLastModifiedTime();
+ }
+ /**
+ *
+ * A `Modification` message replaces a span of n stop times from each affected trip starting at `start_stop_selector`.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripModifications.Modification}
+ */
+ public static final class Modification extends
+ com.google.protobuf.GeneratedMessage.ExtendableMessage<
+ Modification> implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripModifications.Modification)
+ ModificationOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 34,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ "Modification");
+ }
+ // Use Modification.newBuilder() to construct.
+ private Modification(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private Modification() {
+ replacementStops_ = java.util.Collections.emptyList();
+ serviceAlertId_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.class, com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int START_STOP_SELECTOR_FIELD_NUMBER = 1;
+ private com.google.transit.realtime.GtfsRealtime.StopSelector startStopSelector_;
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return Whether the startStopSelector field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartStopSelector() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return The startStopSelector.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.StopSelector getStartStopSelector() {
+ return startStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : startStopSelector_;
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getStartStopSelectorOrBuilder() {
+ return startStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : startStopSelector_;
+ }
+
+ public static final int END_STOP_SELECTOR_FIELD_NUMBER = 2;
+ private com.google.transit.realtime.GtfsRealtime.StopSelector endStopSelector_;
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return Whether the endStopSelector field is set.
+ */
+ @java.lang.Override
+ public boolean hasEndStopSelector() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return The endStopSelector.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.StopSelector getEndStopSelector() {
+ return endStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : endStopSelector_;
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getEndStopSelectorOrBuilder() {
+ return endStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : endStopSelector_;
+ }
+
+ public static final int PROPAGATED_MODIFICATION_DELAY_FIELD_NUMBER = 3;
+ private int propagatedModificationDelay_ = 0;
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return Whether the propagatedModificationDelay field is set.
+ */
+ @java.lang.Override
+ public boolean hasPropagatedModificationDelay() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return The propagatedModificationDelay.
+ */
+ @java.lang.Override
+ public int getPropagatedModificationDelay() {
+ return propagatedModificationDelay_;
+ }
+
+ public static final int REPLACEMENT_STOPS_FIELD_NUMBER = 4;
+ @SuppressWarnings("serial")
+ private java.util.List replacementStops_;
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ @java.lang.Override
+ public java.util.List getReplacementStopsList() {
+ return replacementStops_;
+ }
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.ReplacementStopOrBuilder>
+ getReplacementStopsOrBuilderList() {
+ return replacementStops_;
+ }
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ @java.lang.Override
+ public int getReplacementStopsCount() {
+ return replacementStops_.size();
+ }
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.ReplacementStop getReplacementStops(int index) {
+ return replacementStops_.get(index);
+ }
+ /**
+ *
+ * A list of replacement stops, replacing those of the original trip.
+ * The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
+ *
+ *
+ * repeated .transit_realtime.ReplacementStop replacement_stops = 4;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.ReplacementStopOrBuilder getReplacementStopsOrBuilder(
+ int index) {
+ return replacementStops_.get(index);
+ }
+
+ public static final int SERVICE_ALERT_ID_FIELD_NUMBER = 5;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object serviceAlertId_ = "";
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return Whether the serviceAlertId field is set.
+ */
+ @java.lang.Override
+ public boolean hasServiceAlertId() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return The serviceAlertId.
+ */
+ @java.lang.Override
+ public java.lang.String getServiceAlertId() {
+ java.lang.Object ref = serviceAlertId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serviceAlertId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ *
+ * An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
+ *
+ *
+ * optional string service_alert_id = 5;
+ * @return The bytes for serviceAlertId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getServiceAlertIdBytes() {
+ java.lang.Object ref = serviceAlertId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ serviceAlertId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int LAST_MODIFIED_TIME_FIELD_NUMBER = 6;
+ private long lastModifiedTime_ = 0L;
+ /**
+ *
+ * This timestamp identifies the moment when the modification has last been changed.
+ * In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 last_modified_time = 6;
+ * @return Whether the lastModifiedTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasLastModifiedTime() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * This timestamp identifies the moment when the modification has last been changed.
+ * In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 last_modified_time = 6;
+ * @return The lastModifiedTime.
+ */
+ @java.lang.Override
+ public long getLastModifiedTime() {
+ return lastModifiedTime_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasStartStopSelector()) {
+ if (!getStartStopSelector().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasEndStopSelector()) {
+ if (!getEndStopSelector().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getReplacementStopsCount(); i++) {
+ if (!getReplacementStops(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessage
+ .ExtendableMessage.ExtensionSerializer
+ extensionWriter = newExtensionSerializer();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getStartStopSelector());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getEndStopSelector());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeInt32(3, propagatedModificationDelay_);
+ }
+ for (int i = 0; i < replacementStops_.size(); i++) {
+ output.writeMessage(4, replacementStops_.get(i));
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, serviceAlertId_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeUInt64(6, lastModifiedTime_);
+ }
+ extensionWriter.writeUntil(10000, output);
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getStartStopSelector());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getEndStopSelector());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, propagatedModificationDelay_);
+ }
+
+ {
+ final int count = replacementStops_.size();
+ for (int i = 0; i < count; i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSizeNoTag(replacementStops_.get(i));
+ }
+ size += 1 * count;
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, serviceAlertId_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(6, lastModifiedTime_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripModifications.Modification)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification other = (com.google.transit.realtime.GtfsRealtime.TripModifications.Modification) obj;
+
+ if (hasStartStopSelector() != other.hasStartStopSelector()) return false;
+ if (hasStartStopSelector()) {
+ if (!getStartStopSelector()
+ .equals(other.getStartStopSelector())) return false;
+ }
+ if (hasEndStopSelector() != other.hasEndStopSelector()) return false;
+ if (hasEndStopSelector()) {
+ if (!getEndStopSelector()
+ .equals(other.getEndStopSelector())) return false;
+ }
+ if (hasPropagatedModificationDelay() != other.hasPropagatedModificationDelay()) return false;
+ if (hasPropagatedModificationDelay()) {
+ if (getPropagatedModificationDelay()
+ != other.getPropagatedModificationDelay()) return false;
+ }
+ if (!getReplacementStopsList()
+ .equals(other.getReplacementStopsList())) return false;
+ if (hasServiceAlertId() != other.hasServiceAlertId()) return false;
+ if (hasServiceAlertId()) {
+ if (!getServiceAlertId()
+ .equals(other.getServiceAlertId())) return false;
+ }
+ if (hasLastModifiedTime() != other.hasLastModifiedTime()) return false;
+ if (hasLastModifiedTime()) {
+ if (getLastModifiedTime()
+ != other.getLastModifiedTime()) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStartStopSelector()) {
+ hash = (37 * hash) + START_STOP_SELECTOR_FIELD_NUMBER;
+ hash = (53 * hash) + getStartStopSelector().hashCode();
+ }
+ if (hasEndStopSelector()) {
+ hash = (37 * hash) + END_STOP_SELECTOR_FIELD_NUMBER;
+ hash = (53 * hash) + getEndStopSelector().hashCode();
+ }
+ if (hasPropagatedModificationDelay()) {
+ hash = (37 * hash) + PROPAGATED_MODIFICATION_DELAY_FIELD_NUMBER;
+ hash = (53 * hash) + getPropagatedModificationDelay();
+ }
+ if (getReplacementStopsCount() > 0) {
+ hash = (37 * hash) + REPLACEMENT_STOPS_FIELD_NUMBER;
+ hash = (53 * hash) + getReplacementStopsList().hashCode();
+ }
+ if (hasServiceAlertId()) {
+ hash = (37 * hash) + SERVICE_ALERT_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceAlertId().hashCode();
+ }
+ if (hasLastModifiedTime()) {
+ hash = (37 * hash) + LAST_MODIFIED_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getLastModifiedTime());
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripModifications.Modification parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripModifications.Modification prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A `Modification` message replaces a span of n stop times from each affected trip starting at `start_stop_selector`.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripModifications.Modification}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.ExtendableBuilder<
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification, Builder> implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TripModifications.Modification)
+ com.google.transit.realtime.GtfsRealtime.TripModifications.ModificationOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.class, com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ internalGetStartStopSelectorFieldBuilder();
+ internalGetEndStopSelectorFieldBuilder();
+ internalGetReplacementStopsFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ startStopSelector_ = null;
+ if (startStopSelectorBuilder_ != null) {
+ startStopSelectorBuilder_.dispose();
+ startStopSelectorBuilder_ = null;
+ }
+ endStopSelector_ = null;
+ if (endStopSelectorBuilder_ != null) {
+ endStopSelectorBuilder_.dispose();
+ endStopSelectorBuilder_ = null;
+ }
+ propagatedModificationDelay_ = 0;
+ if (replacementStopsBuilder_ == null) {
+ replacementStops_ = java.util.Collections.emptyList();
+ } else {
+ replacementStops_ = null;
+ replacementStopsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000008);
+ serviceAlertId_ = "";
+ lastModifiedTime_ = 0L;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripModifications_Modification_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripModifications.Modification getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripModifications.Modification build() {
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripModifications.Modification buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification result = new com.google.transit.realtime.GtfsRealtime.TripModifications.Modification(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TripModifications.Modification result) {
+ if (replacementStopsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)) {
+ replacementStops_ = java.util.Collections.unmodifiableList(replacementStops_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.replacementStops_ = replacementStops_;
+ } else {
+ result.replacementStops_ = replacementStopsBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripModifications.Modification result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.startStopSelector_ = startStopSelectorBuilder_ == null
+ ? startStopSelector_
+ : startStopSelectorBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.endStopSelector_ = endStopSelectorBuilder_ == null
+ ? endStopSelector_
+ : endStopSelectorBuilder_.build();
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.propagatedModificationDelay_ = propagatedModificationDelay_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.serviceAlertId_ = serviceAlertId_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.lastModifiedTime_ = lastModifiedTime_;
+ to_bitField0_ |= 0x00000010;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.transit.realtime.GtfsRealtime.TripModifications.Modification, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TripModifications.Modification) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripModifications.Modification)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripModifications.Modification other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TripModifications.Modification.getDefaultInstance()) return this;
+ if (other.hasStartStopSelector()) {
+ mergeStartStopSelector(other.getStartStopSelector());
+ }
+ if (other.hasEndStopSelector()) {
+ mergeEndStopSelector(other.getEndStopSelector());
+ }
+ if (other.hasPropagatedModificationDelay()) {
+ setPropagatedModificationDelay(other.getPropagatedModificationDelay());
+ }
+ if (replacementStopsBuilder_ == null) {
+ if (!other.replacementStops_.isEmpty()) {
+ if (replacementStops_.isEmpty()) {
+ replacementStops_ = other.replacementStops_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureReplacementStopsIsMutable();
+ replacementStops_.addAll(other.replacementStops_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.replacementStops_.isEmpty()) {
+ if (replacementStopsBuilder_.isEmpty()) {
+ replacementStopsBuilder_.dispose();
+ replacementStopsBuilder_ = null;
+ replacementStops_ = other.replacementStops_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ replacementStopsBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ internalGetReplacementStopsFieldBuilder() : null;
+ } else {
+ replacementStopsBuilder_.addAllMessages(other.replacementStops_);
+ }
+ }
+ }
+ if (other.hasServiceAlertId()) {
+ serviceAlertId_ = other.serviceAlertId_;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ if (other.hasLastModifiedTime()) {
+ setLastModifiedTime(other.getLastModifiedTime());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasStartStopSelector()) {
+ if (!getStartStopSelector().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasEndStopSelector()) {
+ if (!getEndStopSelector().isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getReplacementStopsCount(); i++) {
+ if (!getReplacementStops(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ input.readMessage(
+ internalGetStartStopSelectorFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ input.readMessage(
+ internalGetEndStopSelectorFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24: {
+ propagatedModificationDelay_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 34: {
+ com.google.transit.realtime.GtfsRealtime.ReplacementStop m =
+ input.readMessage(
+ com.google.transit.realtime.GtfsRealtime.ReplacementStop.parser(),
+ extensionRegistry);
+ if (replacementStopsBuilder_ == null) {
+ ensureReplacementStopsIsMutable();
+ replacementStops_.add(m);
+ } else {
+ replacementStopsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 34
+ case 42: {
+ serviceAlertId_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ case 48: {
+ lastModifiedTime_ = input.readUInt64();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private com.google.transit.realtime.GtfsRealtime.StopSelector startStopSelector_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder> startStopSelectorBuilder_;
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return Whether the startStopSelector field is set.
+ */
+ public boolean hasStartStopSelector() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ * @return The startStopSelector.
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelector getStartStopSelector() {
+ if (startStopSelectorBuilder_ == null) {
+ return startStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : startStopSelector_;
+ } else {
+ return startStopSelectorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public Builder setStartStopSelector(com.google.transit.realtime.GtfsRealtime.StopSelector value) {
+ if (startStopSelectorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ startStopSelector_ = value;
+ } else {
+ startStopSelectorBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public Builder setStartStopSelector(
+ com.google.transit.realtime.GtfsRealtime.StopSelector.Builder builderForValue) {
+ if (startStopSelectorBuilder_ == null) {
+ startStopSelector_ = builderForValue.build();
+ } else {
+ startStopSelectorBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public Builder mergeStartStopSelector(com.google.transit.realtime.GtfsRealtime.StopSelector value) {
+ if (startStopSelectorBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0) &&
+ startStopSelector_ != null &&
+ startStopSelector_ != com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance()) {
+ getStartStopSelectorBuilder().mergeFrom(value);
+ } else {
+ startStopSelector_ = value;
+ }
+ } else {
+ startStopSelectorBuilder_.mergeFrom(value);
+ }
+ if (startStopSelector_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public Builder clearStartStopSelector() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ startStopSelector_ = null;
+ if (startStopSelectorBuilder_ != null) {
+ startStopSelectorBuilder_.dispose();
+ startStopSelectorBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelector.Builder getStartStopSelectorBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return internalGetStartStopSelectorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getStartStopSelectorOrBuilder() {
+ if (startStopSelectorBuilder_ != null) {
+ return startStopSelectorBuilder_.getMessageOrBuilder();
+ } else {
+ return startStopSelector_ == null ?
+ com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : startStopSelector_;
+ }
+ }
+ /**
+ *
+ * The stop selector of the first stop_time of the original trip that is to be affected by this modification.
+ * Used in conjunction with `end_stop_selector`.
+ * `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
+ *
+ *
+ * optional .transit_realtime.StopSelector start_stop_selector = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder>
+ internalGetStartStopSelectorFieldBuilder() {
+ if (startStopSelectorBuilder_ == null) {
+ startStopSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder>(
+ getStartStopSelector(),
+ getParentForChildren(),
+ isClean());
+ startStopSelector_ = null;
+ }
+ return startStopSelectorBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.StopSelector endStopSelector_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder> endStopSelectorBuilder_;
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return Whether the endStopSelector field is set.
+ */
+ public boolean hasEndStopSelector() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ * @return The endStopSelector.
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelector getEndStopSelector() {
+ if (endStopSelectorBuilder_ == null) {
+ return endStopSelector_ == null ? com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : endStopSelector_;
+ } else {
+ return endStopSelectorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public Builder setEndStopSelector(com.google.transit.realtime.GtfsRealtime.StopSelector value) {
+ if (endStopSelectorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endStopSelector_ = value;
+ } else {
+ endStopSelectorBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public Builder setEndStopSelector(
+ com.google.transit.realtime.GtfsRealtime.StopSelector.Builder builderForValue) {
+ if (endStopSelectorBuilder_ == null) {
+ endStopSelector_ = builderForValue.build();
+ } else {
+ endStopSelectorBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public Builder mergeEndStopSelector(com.google.transit.realtime.GtfsRealtime.StopSelector value) {
+ if (endStopSelectorBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ endStopSelector_ != null &&
+ endStopSelector_ != com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance()) {
+ getEndStopSelectorBuilder().mergeFrom(value);
+ } else {
+ endStopSelector_ = value;
+ }
+ } else {
+ endStopSelectorBuilder_.mergeFrom(value);
+ }
+ if (endStopSelector_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public Builder clearEndStopSelector() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ endStopSelector_ = null;
+ if (endStopSelectorBuilder_ != null) {
+ endStopSelectorBuilder_.dispose();
+ endStopSelectorBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelector.Builder getEndStopSelectorBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return internalGetEndStopSelectorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder getEndStopSelectorOrBuilder() {
+ if (endStopSelectorBuilder_ != null) {
+ return endStopSelectorBuilder_.getMessageOrBuilder();
+ } else {
+ return endStopSelector_ == null ?
+ com.google.transit.realtime.GtfsRealtime.StopSelector.getDefaultInstance() : endStopSelector_;
+ }
+ }
+ /**
+ *
+ * The stop selector of the last stop of the original trip that is to be affected by this modification.
+ * The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
+ * If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
+ *
+ *
+ * optional .transit_realtime.StopSelector end_stop_selector = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder>
+ internalGetEndStopSelectorFieldBuilder() {
+ if (endStopSelectorBuilder_ == null) {
+ endStopSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.transit.realtime.GtfsRealtime.StopSelector, com.google.transit.realtime.GtfsRealtime.StopSelector.Builder, com.google.transit.realtime.GtfsRealtime.StopSelectorOrBuilder>(
+ getEndStopSelector(),
+ getParentForChildren(),
+ isClean());
+ endStopSelector_ = null;
+ }
+ return endStopSelectorBuilder_;
+ }
+
+ private int propagatedModificationDelay_ ;
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return Whether the propagatedModificationDelay field is set.
+ */
+ @java.lang.Override
+ public boolean hasPropagatedModificationDelay() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return The propagatedModificationDelay.
+ */
+ @java.lang.Override
+ public int getPropagatedModificationDelay() {
+ return propagatedModificationDelay_;
+ }
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @param value The propagatedModificationDelay to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPropagatedModificationDelay(int value) {
+
+ propagatedModificationDelay_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The number of seconds of delay to add to all departure and arrival times following the end of this modification.
+ * If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
+ *
+ *
+ * optional int32 propagated_modification_delay = 3 [default = 0];
+ * @return This builder for chaining.
+ */
+ public Builder clearPropagatedModificationDelay() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ propagatedModificationDelay_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List replacementStops_ =
+ java.util.Collections.emptyList();
+ private void ensureReplacementStopsIsMutable() {
+ if (!((bitField0_ & 0x00000008) != 0)) {
+ replacementStops_ = new java.util.ArrayList