getEntityList();
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index);
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ int getEntityCount();
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> getEntityOrBuilderList();
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(int index);
}
/**
*
@@ -458,7898 +100,3964 @@ protected Builder newBuilderForType(
*
* Protobuf type {@code transit_realtime.FeedMessage}
*/
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.FeedMessage, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.FeedMessage)
- com.google.transit.realtime.GtfsRealtime.FeedMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.FeedMessage.class, com.google.transit.realtime.GtfsRealtime.FeedMessage.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.FeedMessage.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getHeaderFieldBuilder();
- getEntityFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- header_ = null;
- if (headerBuilder_ != null) {
- headerBuilder_.dispose();
- headerBuilder_ = null;
- }
- if (entityBuilder_ == null) {
- entity_ = java.util.Collections.emptyList();
- } else {
- entity_ = null;
- entityBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedMessage build() {
- com.google.transit.realtime.GtfsRealtime.FeedMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedMessage buildPartial() {
- com.google.transit.realtime.GtfsRealtime.FeedMessage result = new com.google.transit.realtime.GtfsRealtime.FeedMessage(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
- if (entityBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- entity_ = java.util.Collections.unmodifiableList(entity_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.entity_ = entity_;
- } else {
- result.entity_ = entityBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.header_ = headerBuilder_ == null
- ? header_
- : headerBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedMessage, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedMessage, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedMessage, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedMessage, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedMessage) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedMessage other) {
- if (other == com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance()) return this;
- if (other.hasHeader()) {
- mergeHeader(other.getHeader());
- }
- if (entityBuilder_ == null) {
- if (!other.entity_.isEmpty()) {
- if (entity_.isEmpty()) {
- entity_ = other.entity_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureEntityIsMutable();
- entity_.addAll(other.entity_);
- }
- onChanged();
- }
- } else {
- if (!other.entity_.isEmpty()) {
- if (entityBuilder_.isEmpty()) {
- entityBuilder_.dispose();
- entityBuilder_ = null;
- entity_ = other.entity_;
- bitField0_ = (bitField0_ & ~0x00000002);
- entityBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getEntityFieldBuilder() : null;
- } else {
- entityBuilder_.addAllMessages(other.entity_);
- }
- }
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!hasHeader()) {
- return false;
- }
- if (!getHeader().isInitialized()) {
- return false;
- }
- for (int i = 0; i < getEntityCount(); i++) {
- if (!getEntity(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(
- getHeaderFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- com.google.transit.realtime.GtfsRealtime.FeedEntity m =
- input.readMessage(
- com.google.transit.realtime.GtfsRealtime.FeedEntity.PARSER,
- extensionRegistry);
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- entity_.add(m);
- } else {
- entityBuilder_.addMessage(m);
- }
- 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 com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder> headerBuilder_;
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- * @return Whether the header field is set.
- */
- public boolean hasHeader() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- * @return The header.
- */
- public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
- if (headerBuilder_ == null) {
- return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
- } else {
- return headerBuilder_.getMessage();
- }
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public Builder setHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
- if (headerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- header_ = value;
- } else {
- headerBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public Builder setHeader(
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder builderForValue) {
- if (headerBuilder_ == null) {
- header_ = builderForValue.build();
- } else {
- headerBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public Builder mergeHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
- if (headerBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- header_ != null &&
- header_ != com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) {
- getHeaderBuilder().mergeFrom(value);
- } else {
- header_ = value;
- }
- } else {
- headerBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public Builder clearHeader() {
- bitField0_ = (bitField0_ & ~0x00000001);
- header_ = null;
- if (headerBuilder_ != null) {
- headerBuilder_.dispose();
- headerBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder getHeaderBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getHeaderFieldBuilder().getBuilder();
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
- if (headerBuilder_ != null) {
- return headerBuilder_.getMessageOrBuilder();
- } else {
- return header_ == null ?
- com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
- }
- }
- /**
- *
- * Metadata about this feed and feed message.
- *
- *
- * required .transit_realtime.FeedHeader header = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>
- getHeaderFieldBuilder() {
- if (headerBuilder_ == null) {
- headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>(
- getHeader(),
- getParentForChildren(),
- isClean());
- header_ = null;
- }
- return headerBuilder_;
- }
-
- private java.util.List entity_ =
- java.util.Collections.emptyList();
- private void ensureEntityIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- entity_ = new java.util.ArrayList(entity_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> entityBuilder_;
-
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public java.util.List getEntityList() {
- if (entityBuilder_ == null) {
- return java.util.Collections.unmodifiableList(entity_);
- } else {
- return entityBuilder_.getMessageList();
- }
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public int getEntityCount() {
- if (entityBuilder_ == null) {
- return entity_.size();
- } else {
- return entityBuilder_.getCount();
- }
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
- if (entityBuilder_ == null) {
- return entity_.get(index);
- } else {
- return entityBuilder_.getMessage(index);
- }
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder setEntity(
- int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
- if (entityBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEntityIsMutable();
- entity_.set(index, value);
- onChanged();
- } else {
- entityBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder setEntity(
- int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- entity_.set(index, builderForValue.build());
- onChanged();
- } else {
- entityBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder addEntity(com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
- if (entityBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEntityIsMutable();
- entity_.add(value);
- onChanged();
- } else {
- entityBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder addEntity(
- int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
- if (entityBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureEntityIsMutable();
- entity_.add(index, value);
- onChanged();
- } else {
- entityBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder addEntity(
- com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- entity_.add(builderForValue.build());
- onChanged();
- } else {
- entityBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder addEntity(
- int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- entity_.add(index, builderForValue.build());
- onChanged();
- } else {
- entityBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder addAllEntity(
- java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.FeedEntity> values) {
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, entity_);
- onChanged();
- } else {
- entityBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder clearEntity() {
- if (entityBuilder_ == null) {
- entity_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- entityBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public Builder removeEntity(int index) {
- if (entityBuilder_ == null) {
- ensureEntityIsMutable();
- entity_.remove(index);
- onChanged();
- } else {
- entityBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder getEntityBuilder(
- int index) {
- return getEntityFieldBuilder().getBuilder(index);
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
- int index) {
- if (entityBuilder_ == null) {
- return entity_.get(index); } else {
- return entityBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
- getEntityOrBuilderList() {
- if (entityBuilder_ != null) {
- return entityBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(entity_);
- }
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder() {
- return getEntityFieldBuilder().addBuilder(
- com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder(
- int index) {
- return getEntityFieldBuilder().addBuilder(
- index, com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
- }
- /**
- *
- * Contents of the feed.
- *
- *
- * repeated .transit_realtime.FeedEntity entity = 2;
- */
- public java.util.List
- getEntityBuilderList() {
- return getEntityFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
- getEntityFieldBuilder() {
- if (entityBuilder_ == null) {
- entityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>(
- entity_,
- ((bitField0_ & 0x00000002) != 0),
- getParentForChildren(),
- isClean());
- entity_ = null;
- }
- return entityBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.FeedMessage)
- }
+ public static final class FeedMessage extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.FeedMessage)
+ FeedMessageOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FeedMessage.newBuilder() to construct.
+ private FeedMessage(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private FeedMessage() {
+ entity_ = java.util.Collections.emptyList();
+ }
- // @@protoc_insertion_point(class_scope:transit_realtime.FeedMessage)
- private static final com.google.transit.realtime.GtfsRealtime.FeedMessage DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedMessage();
- }
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new FeedMessage();
+ }
- public static com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
+ }
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public FeedMessage 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
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedMessage.class,
+ com.google.transit.realtime.GtfsRealtime.FeedMessage.Builder.class);
+ }
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ * @return Whether the header field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeader() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ * @return The header.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
+ return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
+ return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
+ public static final int ENTITY_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private java.util.List entity_;
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ @java.lang.Override
+ public java.util.List getEntityList() {
+ return entity_;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> getEntityOrBuilderList() {
+ return entity_;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ @java.lang.Override
+ public int getEntityCount() {
+ return entity_.size();
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
+ return entity_.get(index);
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(int index) {
+ return entity_.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;
+
+ if (!hasHeader()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getHeader().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ for (int i = 0; i < getEntityCount(); i++) {
+ if (!getEntity(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
- public interface FeedHeaderOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.FeedHeader)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getHeader());
+ }
+ for (int i = 0; i < entity_.size(); i++) {
+ output.writeMessage(2, entity_.get(i));
+ }
+ extensionWriter.writeUntil(2000, output);
+ getUnknownFields().writeTo(output);
+ }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return Whether the gtfsRealtimeVersion field is set.
- */
- boolean hasGtfsRealtimeVersion();
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The gtfsRealtimeVersion.
- */
- java.lang.String getGtfsRealtimeVersion();
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The bytes for gtfsRealtimeVersion.
- */
- com.google.protobuf.ByteString
- getGtfsRealtimeVersionBytes();
+ @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, getHeader());
+ }
+ for (int i = 0; i < entity_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, entity_.get(i));
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return Whether the incrementality field is set.
- */
- boolean hasIncrementality();
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return The incrementality.
- */
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality();
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedMessage)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.FeedMessage other = (com.google.transit.realtime.GtfsRealtime.FeedMessage) obj;
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return Whether the timestamp field is set.
- */
- boolean hasTimestamp();
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return The timestamp.
- */
- long getTimestamp();
- }
- /**
- *
- * Metadata about a feed, included in feed messages.
- *
- *
- * Protobuf type {@code transit_realtime.FeedHeader}
- */
- public static final class FeedHeader extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- FeedHeader> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.FeedHeader)
- FeedHeaderOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use FeedHeader.newBuilder() to construct.
- private FeedHeader(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private FeedHeader() {
- gtfsRealtimeVersion_ = "";
- incrementality_ = 0;
- }
+ if (hasHeader() != other.hasHeader())
+ return false;
+ if (hasHeader()) {
+ if (!getHeader().equals(other.getHeader()))
+ return false;
+ }
+ if (!getEntityList().equals(other.getEntityList()))
+ return false;
+ if (!getUnknownFields().equals(other.getUnknownFields()))
+ return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new FeedHeader();
- }
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ if (getEntityCount() > 0) {
+ hash = (37 * hash) + ENTITY_FIELD_NUMBER;
+ hash = (53 * hash) + getEntityList().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage 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.FeedMessage parseFrom(
+ com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage 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.FeedMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage 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.FeedMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseDelimitedFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
+ extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
+ com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_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.FeedMessage 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.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.FeedHeader.class, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
- }
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * The contents of a feed message.
+ * A feed is a continuous stream of feed messages. Each message in the stream is
+ * obtained as a response to an appropriate HTTP GET request.
+ * A realtime feed is always defined with relation to an existing GTFS feed.
+ * All the entity ids are resolved with respect to the GTFS feed.
+ * Note that "required" and "optional" as stated in this file refer to Protocol
+ * Buffer cardinality, not semantic cardinality. See reference.md at
+ * https://github.com/google/transit/tree/master/gtfs-realtime for field
+ * semantic cardinality.
+ *
+ *
+ * Protobuf type {@code transit_realtime.FeedMessage}
+ */
+ public static final class Builder
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
+ implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.FeedMessage)
+ com.google.transit.realtime.GtfsRealtime.FeedMessageOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
+ }
- /**
- *
- * Determines whether the current fetch is incremental. Currently,
- * DIFFERENTIAL mode is unsupported and behavior is unspecified for feeds
- * that use this mode. There are discussions on the GTFS Realtime mailing
- * list around fully specifying the behavior of DIFFERENTIAL mode and the
- * documentation will be updated when those discussions are finalized.
- *
- *
- * Protobuf enum {@code transit_realtime.FeedHeader.Incrementality}
- */
- public enum Incrementality
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * FULL_DATASET = 0;
- */
- FULL_DATASET(0),
- /**
- * DIFFERENTIAL = 1;
- */
- DIFFERENTIAL(1),
- ;
-
- /**
- * FULL_DATASET = 0;
- */
- public static final int FULL_DATASET_VALUE = 0;
- /**
- * DIFFERENTIAL = 1;
- */
- public static final int DIFFERENTIAL_VALUE = 1;
-
-
- 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 Incrementality 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 Incrementality forNumber(int value) {
- switch (value) {
- case 0: return FULL_DATASET;
- case 1: return DIFFERENTIAL;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Incrementality> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Incrementality findValueByNumber(int number) {
- return Incrementality.forNumber(number);
- }
- };
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedMessage.class,
+ com.google.transit.realtime.GtfsRealtime.FeedMessage.Builder.class);
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Incrementality[] VALUES = values();
-
- public static Incrementality 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 Incrementality(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.FeedHeader.Incrementality)
- }
+ // Construct using com.google.transit.realtime.GtfsRealtime.FeedMessage.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
- private int bitField0_;
- public static final int GTFS_REALTIME_VERSION_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object gtfsRealtimeVersion_ = "";
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return Whether the gtfsRealtimeVersion field is set.
- */
- @java.lang.Override
- public boolean hasGtfsRealtimeVersion() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The gtfsRealtimeVersion.
- */
- @java.lang.Override
- public java.lang.String getGtfsRealtimeVersion() {
- java.lang.Object ref = gtfsRealtimeVersion_;
- 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()) {
- gtfsRealtimeVersion_ = s;
- }
- return s;
- }
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The bytes for gtfsRealtimeVersion.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getGtfsRealtimeVersionBytes() {
- java.lang.Object ref = gtfsRealtimeVersion_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- gtfsRealtimeVersion_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getHeaderFieldBuilder();
+ getEntityFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ header_ = null;
+ if (headerBuilder_ != null) {
+ headerBuilder_.dispose();
+ headerBuilder_ = null;
+ }
+ if (entityBuilder_ == null) {
+ entity_ = java.util.Collections.emptyList();
+ } else {
+ entity_ = null;
+ entityBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
- public static final int INCREMENTALITY_FIELD_NUMBER = 2;
- private int incrementality_ = 0;
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return Whether the incrementality field is set.
- */
- @java.lang.Override public boolean hasIncrementality() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return The incrementality.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(incrementality_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET : result;
- }
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
+ }
- public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private long timestamp_ = 0L;
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance();
+ }
- 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 (!hasGtfsRealtimeVersion()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedMessage build() {
+ com.google.transit.realtime.GtfsRealtime.FeedMessage result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gtfsRealtimeVersion_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeEnum(2, incrementality_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeUInt64(3, timestamp_);
- }
- extensionWriter.writeUntil(2000, output);
- getUnknownFields().writeTo(output);
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedMessage buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.FeedMessage result = new com.google.transit.realtime.GtfsRealtime.FeedMessage(
+ this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gtfsRealtimeVersion_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(2, incrementality_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(3, timestamp_);
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
+ private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
+ if (entityBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)) {
+ entity_ = java.util.Collections.unmodifiableList(entity_);
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.entity_ = entity_;
+ } else {
+ result.entity_ = entityBuilder_.build();
+ }
+ }
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.FeedHeader other = (com.google.transit.realtime.GtfsRealtime.FeedHeader) obj;
-
- if (hasGtfsRealtimeVersion() != other.hasGtfsRealtimeVersion()) return false;
- if (hasGtfsRealtimeVersion()) {
- if (!getGtfsRealtimeVersion()
- .equals(other.getGtfsRealtimeVersion())) return false;
- }
- if (hasIncrementality() != other.hasIncrementality()) return false;
- if (hasIncrementality()) {
- if (incrementality_ != other.incrementality_) return false;
- }
- if (hasTimestamp() != other.hasTimestamp()) return false;
- if (hasTimestamp()) {
- if (getTimestamp()
- != other.getTimestamp()) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
- }
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasGtfsRealtimeVersion()) {
- hash = (37 * hash) + GTFS_REALTIME_VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getGtfsRealtimeVersion().hashCode();
- }
- if (hasIncrementality()) {
- hash = (37 * hash) + INCREMENTALITY_FIELD_NUMBER;
- hash = (53 * hash) + incrementality_;
- }
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedMessage) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedMessage) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedMessage other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance())
+ return this;
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ if (entityBuilder_ == null) {
+ if (!other.entity_.isEmpty()) {
+ if (entity_.isEmpty()) {
+ entity_ = other.entity_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureEntityIsMutable();
+ entity_.addAll(other.entity_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.entity_.isEmpty()) {
+ if (entityBuilder_.isEmpty()) {
+ entityBuilder_.dispose();
+ entityBuilder_ = null;
+ entity_ = other.entity_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ entityBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getEntityFieldBuilder()
+ : null;
+ } else {
+ entityBuilder_.addAllMessages(other.entity_);
+ }
+ }
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
- @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.FeedHeader 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
+ public final boolean isInitialized() {
+ if (!hasHeader()) {
+ return false;
+ }
+ if (!getHeader().isInitialized()) {
+ return false;
+ }
+ for (int i = 0; i < getEntityCount(); i++) {
+ if (!getEntity(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Metadata about a feed, included in feed messages.
- *
- *
- * Protobuf type {@code transit_realtime.FeedHeader}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.FeedHeader)
- com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.FeedHeader.class, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.FeedHeader.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- gtfsRealtimeVersion_ = "";
- incrementality_ = 0;
- timestamp_ = 0L;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedHeader build() {
- com.google.transit.realtime.GtfsRealtime.FeedHeader result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedHeader buildPartial() {
- com.google.transit.realtime.GtfsRealtime.FeedHeader result = new com.google.transit.realtime.GtfsRealtime.FeedHeader(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedHeader result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.gtfsRealtimeVersion_ = gtfsRealtimeVersion_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.incrementality_ = incrementality_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.timestamp_ = timestamp_;
- to_bitField0_ |= 0x00000004;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedHeader, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedHeader)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedHeader other) {
- if (other == com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) return this;
- if (other.hasGtfsRealtimeVersion()) {
- gtfsRealtimeVersion_ = other.gtfsRealtimeVersion_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasIncrementality()) {
- setIncrementality(other.getIncrementality());
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!hasGtfsRealtimeVersion()) {
- 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: {
- gtfsRealtimeVersion_ = input.readBytes();
+ @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(getHeaderFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18 : {
+ com.google.transit.realtime.GtfsRealtime.FeedEntity m = input.readMessage(
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.PARSER, extensionRegistry);
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ entity_.add(m);
+ } else {
+ entityBuilder_.addMessage(m);
+ }
+ 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 com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
+ private com.google.protobuf.SingleFieldBuilderV3 headerBuilder_;
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ * @return Whether the header field is set.
+ */
+ public boolean hasHeader() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ * @return The header.
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null
+ ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()
+ : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public Builder setHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ } else {
+ headerBuilder_.setMessage(value);
+ }
bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16: {
- int tmpRaw = input.readEnum();
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality tmpValue =
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(tmpRaw);
- if (tmpValue == null) {
- mergeUnknownVarintField(2, tmpRaw);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public Builder setHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
} else {
- incrementality_ = tmpRaw;
- bitField0_ |= 0x00000002;
+ headerBuilder_.setMessage(builderForValue.build());
}
- break;
- } // case 16
- case 24: {
- timestamp_ = input.readUInt64();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- 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 gtfsRealtimeVersion_ = "";
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return Whether the gtfsRealtimeVersion field is set.
- */
- public boolean hasGtfsRealtimeVersion() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The gtfsRealtimeVersion.
- */
- public java.lang.String getGtfsRealtimeVersion() {
- java.lang.Object ref = gtfsRealtimeVersion_;
- 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()) {
- gtfsRealtimeVersion_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return The bytes for gtfsRealtimeVersion.
- */
- public com.google.protobuf.ByteString
- getGtfsRealtimeVersionBytes() {
- java.lang.Object ref = gtfsRealtimeVersion_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- gtfsRealtimeVersion_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @param value The gtfsRealtimeVersion to set.
- * @return This builder for chaining.
- */
- public Builder setGtfsRealtimeVersion(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- gtfsRealtimeVersion_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @return This builder for chaining.
- */
- public Builder clearGtfsRealtimeVersion() {
- gtfsRealtimeVersion_ = getDefaultInstance().getGtfsRealtimeVersion();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * Version of the feed specification.
- * The current version is 2.0. Valid versions are "2.0", "1.0".
- *
- *
- * required string gtfs_realtime_version = 1;
- * @param value The bytes for gtfsRealtimeVersion to set.
- * @return This builder for chaining.
- */
- public Builder setGtfsRealtimeVersionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- gtfsRealtimeVersion_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private int incrementality_ = 0;
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return Whether the incrementality field is set.
- */
- @java.lang.Override public boolean hasIncrementality() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return The incrementality.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
- com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(incrementality_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET : result;
- }
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @param value The incrementality to set.
- * @return This builder for chaining.
- */
- public Builder setIncrementality(com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- incrementality_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
- * @return This builder for chaining.
- */
- public Builder clearIncrementality() {
- bitField0_ = (bitField0_ & ~0x00000002);
- incrementality_ = 0;
- onChanged();
- return this;
- }
-
- private long timestamp_ ;
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * This timestamp identifies the moment when the content of this feed has been
- * created (in server time). In POSIX time (i.e., number of seconds since
- * January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 3;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000004);
- timestamp_ = 0L;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.FeedHeader)
- }
-
- // @@protoc_insertion_point(class_scope:transit_realtime.FeedHeader)
- private static final com.google.transit.realtime.GtfsRealtime.FeedHeader DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedHeader();
- }
-
- public static com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public FeedHeader 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.FeedHeader getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface FeedEntityOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.FeedEntity)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public Builder mergeHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
+ if (headerBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0) && header_ != null
+ && header_ != com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) {
+ getHeaderBuilder().mergeFrom(value);
+ } else {
+ header_ = value;
+ }
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public Builder clearHeader() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ header_ = null;
+ if (headerBuilder_ != null) {
+ headerBuilder_.dispose();
+ headerBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder getHeaderBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null
+ ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()
+ : header_;
+ }
+ }
+ /**
+ *
+ * Metadata about this feed and feed message.
+ *
+ *
+ * required .transit_realtime.FeedHeader header = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3 getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(
+ getHeader(), getParentForChildren(), isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return Whether the id field is set.
- */
- boolean hasId();
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return The id.
- */
- java.lang.String getId();
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return The bytes for id.
- */
- com.google.protobuf.ByteString
- getIdBytes();
+ private java.util.List entity_ = java.util.Collections
+ .emptyList();
+ private void ensureEntityIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ entity_ = new java.util.ArrayList(entity_);
+ bitField0_ |= 0x00000002;
+ }
+ }
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return Whether the isDeleted field is set.
- */
- boolean hasIsDeleted();
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return The isDeleted.
- */
- boolean getIsDeleted();
+ private com.google.protobuf.RepeatedFieldBuilderV3 entityBuilder_;
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return Whether the tripUpdate field is set.
- */
- boolean hasTripUpdate();
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return The tripUpdate.
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate();
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder();
-
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return Whether the vehicle field is set.
- */
- boolean hasVehicle();
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return The vehicle.
- */
- com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle();
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder();
-
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return Whether the alert field is set.
- */
- boolean hasAlert();
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return The alert.
- */
- com.google.transit.realtime.GtfsRealtime.Alert getAlert();
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder();
- }
- /**
- *
- * A definition (or update) of an entity in the transit feed.
- *
- *
- * Protobuf type {@code transit_realtime.FeedEntity}
- */
- public static final class FeedEntity extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- FeedEntity> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.FeedEntity)
- FeedEntityOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use FeedEntity.newBuilder() to construct.
- private FeedEntity(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private FeedEntity() {
- id_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new FeedEntity();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.FeedEntity.class, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
- }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public java.util.List getEntityList() {
+ if (entityBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(entity_);
+ } else {
+ return entityBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public int getEntityCount() {
+ if (entityBuilder_ == null) {
+ return entity_.size();
+ } else {
+ return entityBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
+ if (entityBuilder_ == null) {
+ return entity_.get(index);
+ } else {
+ return entityBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder setEntity(int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
+ if (entityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEntityIsMutable();
+ entity_.set(index, value);
+ onChanged();
+ } else {
+ entityBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder setEntity(int index,
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ entity_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ entityBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder addEntity(com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
+ if (entityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEntityIsMutable();
+ entity_.add(value);
+ onChanged();
+ } else {
+ entityBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder addEntity(int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
+ if (entityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEntityIsMutable();
+ entity_.add(index, value);
+ onChanged();
+ } else {
+ entityBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder addEntity(com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ entity_.add(builderForValue.build());
+ onChanged();
+ } else {
+ entityBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder addEntity(int index,
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ entity_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ entityBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder addAllEntity(
+ java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.FeedEntity> values) {
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entity_);
+ onChanged();
+ } else {
+ entityBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder clearEntity() {
+ if (entityBuilder_ == null) {
+ entity_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ entityBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public Builder removeEntity(int index) {
+ if (entityBuilder_ == null) {
+ ensureEntityIsMutable();
+ entity_.remove(index);
+ onChanged();
+ } else {
+ entityBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder getEntityBuilder(int index) {
+ return getEntityFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(int index) {
+ if (entityBuilder_ == null) {
+ return entity_.get(index);
+ } else {
+ return entityBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> getEntityOrBuilderList() {
+ if (entityBuilder_ != null) {
+ return entityBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(entity_);
+ }
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder() {
+ return getEntityFieldBuilder()
+ .addBuilder(com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder(int index) {
+ return getEntityFieldBuilder().addBuilder(index,
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
+ }
+ /**
+ *
+ * Contents of the feed.
+ *
+ *
+ * repeated .transit_realtime.FeedEntity entity = 2;
+ */
+ public java.util.List getEntityBuilderList() {
+ return getEntityFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3 getEntityFieldBuilder() {
+ if (entityBuilder_ == null) {
+ entityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(
+ entity_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
+ entity_ = null;
+ }
+ return entityBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object id_ = "";
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return Whether the id field is set.
- */
- @java.lang.Override
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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;
- }
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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;
- }
- }
+ @java.lang.Override
+ public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
- public static final int IS_DELETED_FIELD_NUMBER = 2;
- private boolean isDeleted_ = false;
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return Whether the isDeleted field is set.
- */
- @java.lang.Override
- public boolean hasIsDeleted() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return The isDeleted.
- */
- @java.lang.Override
- public boolean getIsDeleted() {
- return isDeleted_;
- }
+ // @@protoc_insertion_point(builder_scope:transit_realtime.FeedMessage)
+ }
- public static final int TRIP_UPDATE_FIELD_NUMBER = 3;
- private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return Whether the tripUpdate field is set.
- */
- @java.lang.Override
- public boolean hasTripUpdate() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return The tripUpdate.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
- return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
- return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
- }
+ // @@protoc_insertion_point(class_scope:transit_realtime.FeedMessage)
+ private static final com.google.transit.realtime.GtfsRealtime.FeedMessage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedMessage();
+ }
- public static final int VEHICLE_FIELD_NUMBER = 4;
- private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return Whether the vehicle field is set.
- */
- @java.lang.Override
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return The vehicle.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
- }
+ public static com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
- public static final int ALERT_FIELD_NUMBER = 5;
- private com.google.transit.realtime.GtfsRealtime.Alert alert_;
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return Whether the alert field is set.
- */
- @java.lang.Override
- public boolean hasAlert() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return The alert.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
- return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
- return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
- }
+ @java.lang.Deprecated
+ public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FeedMessage 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 byte memoizedIsInitialized = -1;
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasId()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (hasTripUpdate()) {
- if (!getTripUpdate().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasAlert()) {
- if (!getAlert().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeBool(2, isDeleted_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(3, getTripUpdate());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeMessage(4, getVehicle());
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeMessage(5, getAlert());
- }
- extensionWriter.writeUntil(2000, output);
- getUnknownFields().writeTo(output);
- }
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(2, isDeleted_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getTripUpdate());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, getVehicle());
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, getAlert());
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.FeedEntity other = (com.google.transit.realtime.GtfsRealtime.FeedEntity) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (!getId()
- .equals(other.getId())) return false;
- }
- if (hasIsDeleted() != other.hasIsDeleted()) return false;
- if (hasIsDeleted()) {
- if (getIsDeleted()
- != other.getIsDeleted()) return false;
- }
- if (hasTripUpdate() != other.hasTripUpdate()) return false;
- if (hasTripUpdate()) {
- if (!getTripUpdate()
- .equals(other.getTripUpdate())) return false;
- }
- if (hasVehicle() != other.hasVehicle()) return false;
- if (hasVehicle()) {
- if (!getVehicle()
- .equals(other.getVehicle())) return false;
- }
- if (hasAlert() != other.hasAlert()) return false;
- if (hasAlert()) {
- if (!getAlert()
- .equals(other.getAlert())) 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 (hasIsDeleted()) {
- hash = (37 * hash) + IS_DELETED_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getIsDeleted());
- }
- if (hasTripUpdate()) {
- hash = (37 * hash) + TRIP_UPDATE_FIELD_NUMBER;
- hash = (53 * hash) + getTripUpdate().hashCode();
- }
- if (hasVehicle()) {
- hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
- hash = (53 * hash) + getVehicle().hashCode();
- }
- if (hasAlert()) {
- hash = (37 * hash) + ALERT_FIELD_NUMBER;
- hash = (53 * hash) + getAlert().hashCode();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
+ public interface FeedHeaderOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.FeedHeader)
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder {
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return Whether the gtfsRealtimeVersion field is set.
+ */
+ boolean hasGtfsRealtimeVersion();
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return The gtfsRealtimeVersion.
+ */
+ java.lang.String getGtfsRealtimeVersion();
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return The bytes for gtfsRealtimeVersion.
+ */
+ com.google.protobuf.ByteString getGtfsRealtimeVersionBytes();
- @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.FeedEntity prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return Whether the incrementality field is set.
+ */
+ boolean hasIncrementality();
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return The incrementality.
+ */
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality();
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @return The timestamp.
+ */
+ long getTimestamp();
}
/**
*
- * A definition (or update) of an entity in the transit feed.
+ * Metadata about a feed, included in feed messages.
*
*
- * Protobuf type {@code transit_realtime.FeedEntity}
+ * Protobuf type {@code transit_realtime.FeedHeader}
*/
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.FeedEntity)
- com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.FeedEntity.class, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.FeedEntity.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getTripUpdateFieldBuilder();
- getVehicleFieldBuilder();
- getAlertFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- id_ = "";
- isDeleted_ = false;
- tripUpdate_ = null;
- if (tripUpdateBuilder_ != null) {
- tripUpdateBuilder_.dispose();
- tripUpdateBuilder_ = null;
- }
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- alert_ = null;
- if (alertBuilder_ != null) {
- alertBuilder_.dispose();
- alertBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedEntity build() {
- com.google.transit.realtime.GtfsRealtime.FeedEntity result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedEntity buildPartial() {
- com.google.transit.realtime.GtfsRealtime.FeedEntity result = new com.google.transit.realtime.GtfsRealtime.FeedEntity(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedEntity 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.isDeleted_ = isDeleted_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.tripUpdate_ = tripUpdateBuilder_ == null
- ? tripUpdate_
- : tripUpdateBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.vehicle_ = vehicleBuilder_ == null
- ? vehicle_
- : vehicleBuilder_.build();
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.alert_ = alertBuilder_ == null
- ? alert_
- : alertBuilder_.build();
- to_bitField0_ |= 0x00000010;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.FeedEntity, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedEntity)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedEntity other) {
- if (other == com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance()) return this;
- if (other.hasId()) {
- id_ = other.id_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasIsDeleted()) {
- setIsDeleted(other.getIsDeleted());
- }
- if (other.hasTripUpdate()) {
- mergeTripUpdate(other.getTripUpdate());
- }
- if (other.hasVehicle()) {
- mergeVehicle(other.getVehicle());
- }
- if (other.hasAlert()) {
- mergeAlert(other.getAlert());
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!hasId()) {
- return false;
- }
- if (hasTripUpdate()) {
- if (!getTripUpdate().isInitialized()) {
- return false;
- }
- }
- if (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- return false;
- }
- }
- if (hasAlert()) {
- if (!getAlert().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: {
- id_ = input.readBytes();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16: {
- isDeleted_ = input.readBool();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 26: {
- input.readMessage(
- getTripUpdateFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34: {
- input.readMessage(
- getVehicleFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 42: {
- input.readMessage(
- getAlertFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- 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_ = "";
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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;
- }
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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;
- }
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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;
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required string id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
- id_ = getDefaultInstance().getId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * The ids are used only to provide incrementality support. The id should be
- * unique within a FeedMessage. Consequent FeedMessages may contain
- * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- * FeedEntity with some id will replace the old FeedEntity with the same id
- * (or delete it - see is_deleted below).
- * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- * feed must be specified by explicit selectors (see EntitySelector below for
- * more info).
- *
- *
- * required 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 boolean isDeleted_ ;
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return Whether the isDeleted field is set.
- */
- @java.lang.Override
- public boolean hasIsDeleted() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return The isDeleted.
- */
- @java.lang.Override
- public boolean getIsDeleted() {
- return isDeleted_;
- }
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @param value The isDeleted to set.
- * @return This builder for chaining.
- */
- public Builder setIsDeleted(boolean value) {
-
- isDeleted_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Whether this entity is to be deleted. Relevant only for incremental
- * fetches.
- *
- *
- * optional bool is_deleted = 2 [default = false];
- * @return This builder for chaining.
- */
- public Builder clearIsDeleted() {
- bitField0_ = (bitField0_ & ~0x00000002);
- isDeleted_ = false;
- onChanged();
- return this;
- }
-
- private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder> tripUpdateBuilder_;
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return Whether the tripUpdate field is set.
- */
- public boolean hasTripUpdate() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- * @return The tripUpdate.
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
- if (tripUpdateBuilder_ == null) {
- return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
- } else {
- return tripUpdateBuilder_.getMessage();
- }
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
- if (tripUpdateBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- tripUpdate_ = value;
- } else {
- tripUpdateBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public Builder setTripUpdate(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder builderForValue) {
- if (tripUpdateBuilder_ == null) {
- tripUpdate_ = builderForValue.build();
- } else {
- tripUpdateBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public Builder mergeTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
- if (tripUpdateBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0) &&
- tripUpdate_ != null &&
- tripUpdate_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()) {
- getTripUpdateBuilder().mergeFrom(value);
- } else {
- tripUpdate_ = value;
- }
- } else {
- tripUpdateBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public Builder clearTripUpdate() {
- bitField0_ = (bitField0_ & ~0x00000004);
- tripUpdate_ = null;
- if (tripUpdateBuilder_ != null) {
- tripUpdateBuilder_.dispose();
- tripUpdateBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder getTripUpdateBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getTripUpdateFieldBuilder().getBuilder();
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
- if (tripUpdateBuilder_ != null) {
- return tripUpdateBuilder_.getMessageOrBuilder();
- } else {
- return tripUpdate_ == null ?
- com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
- }
- }
- /**
- *
- * Data about the entity itself. Exactly one of the following fields must be
- * present (unless the entity is being deleted).
- *
- *
- * optional .transit_realtime.TripUpdate trip_update = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>
- getTripUpdateFieldBuilder() {
- if (tripUpdateBuilder_ == null) {
- tripUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>(
- getTripUpdate(),
- getParentForChildren(),
- isClean());
- tripUpdate_ = null;
- }
- return tripUpdateBuilder_;
- }
-
- private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder> vehicleBuilder_;
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return Whether the vehicle field is set.
- */
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- * @return The vehicle.
- */
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
- if (vehicleBuilder_ == null) {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
- } else {
- return vehicleBuilder_.getMessage();
- }
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
- if (vehicleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- vehicle_ = value;
- } else {
- vehicleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public Builder setVehicle(
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder builderForValue) {
- if (vehicleBuilder_ == null) {
- vehicle_ = builderForValue.build();
- } else {
- vehicleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
- if (vehicleBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0) &&
- vehicle_ != null &&
- vehicle_ != com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) {
- getVehicleBuilder().mergeFrom(value);
- } else {
- vehicle_ = value;
- }
- } else {
- vehicleBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public Builder clearVehicle() {
- bitField0_ = (bitField0_ & ~0x00000008);
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder getVehicleBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getVehicleFieldBuilder().getBuilder();
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
- if (vehicleBuilder_ != null) {
- return vehicleBuilder_.getMessageOrBuilder();
- } else {
- return vehicle_ == null ?
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
- }
- }
- /**
- * optional .transit_realtime.VehiclePosition vehicle = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>
- getVehicleFieldBuilder() {
- if (vehicleBuilder_ == null) {
- vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>(
- getVehicle(),
- getParentForChildren(),
- isClean());
- vehicle_ = null;
- }
- return vehicleBuilder_;
- }
-
- private com.google.transit.realtime.GtfsRealtime.Alert alert_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder> alertBuilder_;
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return Whether the alert field is set.
- */
- public boolean hasAlert() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- * @return The alert.
- */
- public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
- if (alertBuilder_ == null) {
- return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
- } else {
- return alertBuilder_.getMessage();
- }
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
- if (alertBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- alert_ = value;
- } else {
- alertBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public Builder setAlert(
- com.google.transit.realtime.GtfsRealtime.Alert.Builder builderForValue) {
- if (alertBuilder_ == null) {
- alert_ = builderForValue.build();
- } else {
- alertBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public Builder mergeAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
- if (alertBuilder_ == null) {
- if (((bitField0_ & 0x00000010) != 0) &&
- alert_ != null &&
- alert_ != com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) {
- getAlertBuilder().mergeFrom(value);
- } else {
- alert_ = value;
- }
- } else {
- alertBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public Builder clearAlert() {
- bitField0_ = (bitField0_ & ~0x00000010);
- alert_ = null;
- if (alertBuilder_ != null) {
- alertBuilder_.dispose();
- alertBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public com.google.transit.realtime.GtfsRealtime.Alert.Builder getAlertBuilder() {
- bitField0_ |= 0x00000010;
- onChanged();
- return getAlertFieldBuilder().getBuilder();
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
- if (alertBuilder_ != null) {
- return alertBuilder_.getMessageOrBuilder();
- } else {
- return alert_ == null ?
- com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
- }
- }
- /**
- * optional .transit_realtime.Alert alert = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>
- getAlertFieldBuilder() {
- if (alertBuilder_ == null) {
- alertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>(
- getAlert(),
- getParentForChildren(),
- isClean());
- alert_ = null;
- }
- return alertBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.FeedEntity)
- }
-
- // @@protoc_insertion_point(class_scope:transit_realtime.FeedEntity)
- private static final com.google.transit.realtime.GtfsRealtime.FeedEntity DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedEntity();
- }
+ public static final class FeedHeader extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.FeedHeader)
+ FeedHeaderOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FeedHeader.newBuilder() to construct.
+ private FeedHeader(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private FeedHeader() {
+ gtfsRealtimeVersion_ = "";
+ incrementality_ = 0;
+ }
- public static com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new FeedHeader();
+ }
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public FeedEntity 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 final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
+ }
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedHeader.class,
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
+ /**
+ *
+ * Determines whether the current fetch is incremental. Currently,
+ * DIFFERENTIAL mode is unsupported and behavior is unspecified for feeds
+ * that use this mode. There are discussions on the GTFS Realtime mailing
+ * list around fully specifying the behavior of DIFFERENTIAL mode and the
+ * documentation will be updated when those discussions are finalized.
+ *
+ *
+ * Protobuf enum {@code transit_realtime.FeedHeader.Incrementality}
+ */
+ public enum Incrementality implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * FULL_DATASET = 0;
+ */
+ FULL_DATASET(0),
+ /**
+ * DIFFERENTIAL = 1;
+ */
+ DIFFERENTIAL(1),;
+
+ /**
+ * FULL_DATASET = 0;
+ */
+ public static final int FULL_DATASET_VALUE = 0;
+ /**
+ * DIFFERENTIAL = 1;
+ */
+ public static final int DIFFERENTIAL_VALUE = 1;
+
+ 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 Incrementality valueOf(int value) {
+ return forNumber(value);
+ }
- public interface TripUpdateOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static Incrementality forNumber(int value) {
+ switch (value) {
+ case 0 :
+ return FULL_DATASET;
+ case 1 :
+ return DIFFERENTIAL;
+ default :
+ return null;
+ }
+ }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- boolean hasTrip();
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @return The trip.
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
-
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return Whether the vehicle field is set.
- */
- boolean hasVehicle();
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return The vehicle.
- */
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
-
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- java.util.List
- getStopTimeUpdateList();
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index);
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- int getStopTimeUpdateCount();
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
- getStopTimeUpdateOrBuilderList();
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
- int index);
-
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return Whether the timestamp field is set.
- */
- boolean hasTimestamp();
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return The timestamp.
- */
- long getTimestamp();
-
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return Whether the delay field is set.
- */
- boolean hasDelay();
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return The delay.
- */
- int getDelay();
- }
- /**
- *
- * Realtime update of the progress of a vehicle along a trip.
- * Depending on the value of ScheduleRelationship, a TripUpdate can specify:
- * - A trip that proceeds along the schedule.
- * - A trip that proceeds along a route but has no fixed schedule.
- * - A trip that have been added or removed with regard to schedule.
- * The updates can be for future, predicted arrival/departure events, or for
- * past events that already occurred.
- * Normally, updates should get more precise and more certain (see
- * uncertainty below) as the events gets closer to current time.
- * Even if that is not possible, the information for past events should be
- * precise and certain. In particular, if an update points to time in the past
- * but its update's uncertainty is not 0, the client should conclude that the
- * update is a (wrong) prediction and that the trip has not completed yet.
- * Note that the update can describe a trip that is already completed.
- * To this end, it is enough to provide an update for the last stop of the trip.
- * If the time of that is in the past, the client will conclude from that that
- * the whole trip is in the past (it is possible, although inconsequential, to
- * also provide updates for preceding stops).
- * This option is most relevant for a trip that has completed ahead of schedule,
- * but according to the schedule, the trip is still proceeding at the current
- * time. Removing the updates for this trip could make the client assume
- * that the trip is still proceeding.
- * Note that the feed provider is allowed, but not required, to purge past
- * updates - this is one case where this would be practically useful.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate}
- */
- public static final class TripUpdate extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- TripUpdate> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate)
- TripUpdateOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use TripUpdate.newBuilder() to construct.
- private TripUpdate(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private TripUpdate() {
- stopTimeUpdate_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new TripUpdate();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
- }
-
- public interface StopTimeEventOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeEvent)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
-
- /**
- *
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- *
- *
- * optional int32 delay = 1;
- * @return Whether the delay field is set.
- */
- boolean hasDelay();
- /**
- *
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- *
- *
- * optional int32 delay = 1;
- * @return The delay.
- */
- int getDelay();
-
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return Whether the time field is set.
- */
- boolean hasTime();
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return The time.
- */
- long getTime();
-
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @return Whether the uncertainty field is set.
- */
- boolean hasUncertainty();
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @return The uncertainty.
- */
- int getUncertainty();
- }
- /**
- *
- * Timing information for a single predicted event (either arrival or
- * departure).
- * Timing consists of delay and/or estimated time, and uncertainty.
- * - delay should be used when the prediction is given relative to some
- * existing schedule in GTFS.
- * - time should be given whether there is a predicted schedule or not. If
- * both time and delay are specified, time will take precedence
- * (although normally, time, if given for a scheduled trip, should be
- * equal to scheduled time in GTFS + delay).
- * Uncertainty applies equally to both time and delay.
- * The uncertainty roughly specifies the expected error in true delay (but
- * note, we don't yet define its precise statistical meaning). It's possible
- * for the uncertainty to be 0, for example for trains that are driven under
- * computer timing control.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
- */
- public static final class StopTimeEvent extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- StopTimeEvent> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeEvent)
- StopTimeEventOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use StopTimeEvent.newBuilder() to construct.
- private StopTimeEvent(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private StopTimeEvent() {
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new StopTimeEvent();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
- }
-
- private int bitField0_;
- public static final int DELAY_FIELD_NUMBER = 1;
- private int delay_ = 0;
- /**
- *
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- *
- *
- * optional int32 delay = 1;
- * @return Whether the delay field is set.
- */
- @java.lang.Override
- public boolean hasDelay() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- *
- *
- * optional int32 delay = 1;
- * @return The delay.
- */
- @java.lang.Override
- public int getDelay() {
- return delay_;
- }
-
- public static final int TIME_FIELD_NUMBER = 2;
- private long time_ = 0L;
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return Whether the time field is set.
- */
- @java.lang.Override
- public boolean hasTime() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return The time.
- */
- @java.lang.Override
- public long getTime() {
- return time_;
- }
-
- public static final int UNCERTAINTY_FIELD_NUMBER = 3;
- private int uncertainty_ = 0;
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @return Whether the uncertainty field is set.
- */
- @java.lang.Override
- public boolean hasUncertainty() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @return The uncertainty.
- */
- @java.lang.Override
- public int getUncertainty() {
- return uncertainty_;
- }
-
- 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.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeInt32(1, delay_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeInt64(2, time_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeInt32(3, uncertainty_);
- }
- extensionWriter.writeUntil(2000, 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
- .computeInt32Size(1, delay_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, time_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, uncertainty_);
- }
- 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.TripUpdate.StopTimeEvent)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) obj;
-
- if (hasDelay() != other.hasDelay()) return false;
- if (hasDelay()) {
- if (getDelay()
- != other.getDelay()) return false;
- }
- if (hasTime() != other.hasTime()) return false;
- if (hasTime()) {
- if (getTime()
- != other.getTime()) return false;
- }
- if (hasUncertainty() != other.hasUncertainty()) return false;
- if (hasUncertainty()) {
- if (getUncertainty()
- != other.getUncertainty()) 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 (hasDelay()) {
- hash = (37 * hash) + DELAY_FIELD_NUMBER;
- hash = (53 * hash) + getDelay();
- }
- if (hasTime()) {
- hash = (37 * hash) + TIME_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTime());
- }
- if (hasUncertainty()) {
- hash = (37 * hash) + UNCERTAINTY_FIELD_NUMBER;
- hash = (53 * hash) + getUncertainty();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .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.TripUpdate.StopTimeEvent 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.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Timing information for a single predicted event (either arrival or
- * departure).
- * Timing consists of delay and/or estimated time, and uncertainty.
- * - delay should be used when the prediction is given relative to some
- * existing schedule in GTFS.
- * - time should be given whether there is a predicted schedule or not. If
- * both time and delay are specified, time will take precedence
- * (although normally, time, if given for a scheduled trip, should be
- * equal to scheduled time in GTFS + delay).
- * Uncertainty applies equally to both time and delay.
- * The uncertainty roughly specifies the expected error in true delay (but
- * note, we don't yet define its precise statistical meaning). It's possible
- * for the uncertainty to be 0, for example for trains that are driven under
- * computer timing control.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeEvent)
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- delay_ = 0;
- time_ = 0L;
- uncertainty_ = 0;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
- }
+ public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() {
+ public Incrementality findValueByNumber(int number) {
+ return Incrementality.forNumber(number);
+ }
+ };
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance();
- }
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ return getDescriptor().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDescriptor().getEnumTypes().get(0);
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent build() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
+ private static final Incrementality[] VALUES = values();
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
+ public static Incrementality 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 void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.delay_ = delay_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.time_ = time_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.uncertainty_ = uncertainty_;
- to_bitField0_ |= 0x00000004;
- }
- result.bitField0_ |= to_bitField0_;
- }
+ private final int value;
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
+ private Incrementality(int value) {
+ this.value = value;
+ }
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) return this;
- if (other.hasDelay()) {
- setDelay(other.getDelay());
- }
- if (other.hasTime()) {
- setTime(other.getTime());
- }
- if (other.hasUncertainty()) {
- setUncertainty(other.getUncertainty());
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
+ // @@protoc_insertion_point(enum_scope:transit_realtime.FeedHeader.Incrementality)
}
- @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 8: {
- delay_ = input.readInt32();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 16: {
- time_ = input.readInt64();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 24: {
- uncertainty_ = input.readInt32();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- 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 int delay_ ;
+ public static final int GTFS_REALTIME_VERSION_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object gtfsRealtimeVersion_ = "";
/**
*
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
- * optional int32 delay = 1;
- * @return Whether the delay field is set.
+ * required string gtfs_realtime_version = 1;
+ * @return Whether the gtfsRealtimeVersion field is set.
*/
@java.lang.Override
- public boolean hasDelay() {
- return ((bitField0_ & 0x00000001) != 0);
+ public boolean hasGtfsRealtimeVersion() {
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
- * optional int32 delay = 1;
- * @return The delay.
+ * required string gtfs_realtime_version = 1;
+ * @return The gtfsRealtimeVersion.
*/
@java.lang.Override
- public int getDelay() {
- return delay_;
- }
- /**
- *
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- *
- *
- * optional int32 delay = 1;
- * @param value The delay to set.
- * @return This builder for chaining.
- */
- public Builder setDelay(int value) {
-
- delay_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
+ public java.lang.String getGtfsRealtimeVersion() {
+ java.lang.Object ref = gtfsRealtimeVersion_;
+ 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()) {
+ gtfsRealtimeVersion_ = s;
+ }
+ return s;
+ }
}
/**
*
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
- * optional int32 delay = 1;
- * @return This builder for chaining.
+ * required string gtfs_realtime_version = 1;
+ * @return The bytes for gtfsRealtimeVersion.
*/
- public Builder clearDelay() {
- bitField0_ = (bitField0_ & ~0x00000001);
- delay_ = 0;
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.protobuf.ByteString getGtfsRealtimeVersionBytes() {
+ java.lang.Object ref = gtfsRealtimeVersion_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ gtfsRealtimeVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
}
- private long time_ ;
+ public static final int INCREMENTALITY_FIELD_NUMBER = 2;
+ private int incrementality_ = 0;
/**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return Whether the time field is set.
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return Whether the incrementality field is set.
*/
@java.lang.Override
- public boolean hasTime() {
- return ((bitField0_ & 0x00000002) != 0);
+ public boolean hasIncrementality() {
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return The time.
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return The incrementality.
*/
@java.lang.Override
- public long getTime() {
- return time_;
- }
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @param value The time to set.
- * @return This builder for chaining.
- */
- public Builder setTime(long value) {
-
- time_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Event as absolute time.
- * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- * UTC).
- *
- *
- * optional int64 time = 2;
- * @return This builder for chaining.
- */
- public Builder clearTime() {
- bitField0_ = (bitField0_ & ~0x00000002);
- time_ = 0L;
- onChanged();
- return this;
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality
+ .forNumber(incrementality_);
+ return result == null
+ ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET
+ : result;
}
- private int uncertainty_ ;
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @return Whether the uncertainty field is set.
- */
- @java.lang.Override
- public boolean hasUncertainty() {
- return ((bitField0_ & 0x00000004) != 0);
- }
+ public static final int TIMESTAMP_FIELD_NUMBER = 3;
+ private long timestamp_ = 0L;
/**
*
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
*
*
- * optional int32 uncertainty = 3;
- * @return The uncertainty.
+ * optional uint64 timestamp = 3;
+ * @return Whether the timestamp field is set.
*/
@java.lang.Override
- public int getUncertainty() {
- return uncertainty_;
- }
- /**
- *
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
- *
- *
- * optional int32 uncertainty = 3;
- * @param value The uncertainty to set.
- * @return This builder for chaining.
- */
- public Builder setUncertainty(int value) {
-
- uncertainty_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
*
- * If uncertainty is omitted, it is interpreted as unknown.
- * If the prediction is unknown or too uncertain, the delay (or time) field
- * should be empty. In such case, the uncertainty field is ignored.
- * To specify a completely certain prediction, set its uncertainty to 0.
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
*
*
- * optional int32 uncertainty = 3;
- * @return This builder for chaining.
+ * optional uint64 timestamp = 3;
+ * @return The timestamp.
*/
- public Builder clearUncertainty() {
- bitField0_ = (bitField0_ & ~0x00000004);
- uncertainty_ = 0;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
@java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
+ public long getTimestamp() {
+ return timestamp_;
}
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeEvent)
- }
-
- // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeEvent)
- private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent();
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
+ private byte memoizedIsInitialized = -1;
@java.lang.Override
- public StopTimeEvent 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.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StopTimePropertiesOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeProperties)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return Whether the assignedStopId field is set.
- */
- boolean hasAssignedStopId();
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return The assignedStopId.
- */
- java.lang.String getAssignedStopId();
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return The bytes for assignedStopId.
- */
- com.google.protobuf.ByteString
- getAssignedStopIdBytes();
- }
- /**
- *
- * Realtime update for certain properties defined within GTFS stop_times.txt.
- * Caution: this message is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeProperties}
- */
- public static final class StopTimeProperties extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeProperties)
- StopTimePropertiesOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use StopTimeProperties.newBuilder() to construct.
- private StopTimeProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private StopTimeProperties() {
- assignedStopId_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new StopTimeProperties();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder.class);
- }
-
- private int bitField0_;
- public static final int ASSIGNED_STOP_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object assignedStopId_ = "";
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return Whether the assignedStopId field is set.
- */
- @java.lang.Override
- public boolean hasAssignedStopId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return The assignedStopId.
- */
- @java.lang.Override
- public java.lang.String getAssignedStopId() {
- java.lang.Object ref = assignedStopId_;
- 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()) {
- assignedStopId_ = s;
- }
- return s;
- }
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return The bytes for assignedStopId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getAssignedStopIdBytes() {
- java.lang.Object ref = assignedStopId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- assignedStopId_ = 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;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assignedStopId_);
- }
- 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.GeneratedMessageV3.computeStringSize(1, assignedStopId_);
- }
- 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.TripUpdate.StopTimeProperties)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties) obj;
-
- if (hasAssignedStopId() != other.hasAssignedStopId()) return false;
- if (hasAssignedStopId()) {
- if (!getAssignedStopId()
- .equals(other.getAssignedStopId())) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasAssignedStopId()) {
- hash = (37 * hash) + ASSIGNED_STOP_ID_FIELD_NUMBER;
- hash = (53 * hash) + getAssignedStopId().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .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.TripUpdate.StopTimeProperties 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.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Realtime update for certain properties defined within GTFS stop_times.txt.
- * Caution: this message is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeProperties}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeProperties)
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.newBuilder()
- private Builder() {
-
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
-
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- assignedStopId_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1)
+ return true;
+ if (isInitialized == 0)
+ return false;
+
+ if (!hasGtfsRealtimeVersion()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance();
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gtfsRealtimeVersion_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeEnum(2, incrementality_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeUInt64(3, timestamp_);
+ }
+ extensionWriter.writeUntil(2000, output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties build() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1)
+ return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gtfsRealtimeVersion_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, incrementality_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3, timestamp_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
}
@java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.FeedHeader other = (com.google.transit.realtime.GtfsRealtime.FeedHeader) obj;
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.assignedStopId_ = assignedStopId_;
- to_bitField0_ |= 0x00000001;
- }
- result.bitField0_ |= to_bitField0_;
+ if (hasGtfsRealtimeVersion() != other.hasGtfsRealtimeVersion())
+ return false;
+ if (hasGtfsRealtimeVersion()) {
+ if (!getGtfsRealtimeVersion().equals(other.getGtfsRealtimeVersion()))
+ return false;
+ }
+ if (hasIncrementality() != other.hasIncrementality())
+ return false;
+ if (hasIncrementality()) {
+ if (incrementality_ != other.incrementality_)
+ return false;
+ }
+ if (hasTimestamp() != other.hasTimestamp())
+ return false;
+ if (hasTimestamp()) {
+ if (getTimestamp() != other.getTimestamp())
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields()))
+ return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
}
@java.lang.Override
- public Builder clone() {
- return super.clone();
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasGtfsRealtimeVersion()) {
+ hash = (37 * hash) + GTFS_REALTIME_VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getGtfsRealtimeVersion().hashCode();
+ }
+ if (hasIncrementality()) {
+ hash = (37 * hash) + INCREMENTALITY_FIELD_NUMBER;
+ hash = (53 * hash) + incrementality_;
+ }
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestamp());
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader 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.FeedHeader parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
+ extensionRegistry);
}
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
+ com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
}
+
@java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
+ public Builder newBuilderForType() {
+ return newBuilder();
}
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.FeedHeader prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance()) return this;
- if (other.hasAssignedStopId()) {
- assignedStopId_ = other.assignedStopId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
- public final boolean isInitialized() {
- 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: {
- assignedStopId_ = input.readBytes();
- bitField0_ |= 0x00000001;
- 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.lang.Object assignedStopId_ = "";
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return Whether the assignedStopId field is set.
- */
- public boolean hasAssignedStopId() {
- return ((bitField0_ & 0x00000001) != 0);
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
}
/**
*
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return The assignedStopId.
- */
- public java.lang.String getAssignedStopId() {
- java.lang.Object ref = assignedStopId_;
- 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()) {
- assignedStopId_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
+ * Metadata about a feed, included in feed messages.
*
*
- * optional string assigned_stop_id = 1;
- * @return The bytes for assignedStopId.
- */
- public com.google.protobuf.ByteString
- getAssignedStopIdBytes() {
- java.lang.Object ref = assignedStopId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- assignedStopId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @param value The assignedStopId to set.
- * @return This builder for chaining.
- */
- public Builder setAssignedStopId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- assignedStopId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @return This builder for chaining.
- */
- public Builder clearAssignedStopId() {
- assignedStopId_ = getDefaultInstance().getAssignedStopId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- * Supports real-time stop assignments. Refers to a stop_id defined in the
- * GTFS stops.txt.
- * The new assigned_stop_id should not result in a significantly different
- * trip experience for the end user than the stop_id defined in GTFS
- * stop_times.txt. In other words, the end user should not view this new
- * stop_id as an "unusual change" if the new stop was presented within an
- * app without any additional context. For example, this field is intended
- * to be used for platform assignments by using a stop_id that belongs to
- * the same station as the stop originally defined in GTFS stop_times.txt.
- * To assign a stop without providing any real-time arrival or departure
- * predictions, populate this field and set
- * StopTimeUpdate.schedule_relationship = NO_DATA.
- * If this field is populated, StopTimeUpdate.stop_sequence must be
- * populated and StopTimeUpdate.stop_id should not be populated. Stop
- * assignments should be reflected in other GTFS-realtime fields as well
- * (e.g., VehiclePosition.stop_id).
- * Caution: this field is still experimental, and subject to change. It
- * may be formally adopted in the future.
- *
- *
- * optional string assigned_stop_id = 1;
- * @param value The bytes for assignedStopId to set.
- * @return This builder for chaining.
+ * Protobuf type {@code transit_realtime.FeedHeader}
*/
- public Builder setAssignedStopIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- assignedStopId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
+ public static final class Builder
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
+ implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.FeedHeader)
+ com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
+ }
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedHeader.class,
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
+ }
+ // Construct using com.google.transit.realtime.GtfsRealtime.FeedHeader.newBuilder()
+ private Builder() {
- // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeProperties)
- }
+ }
- // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeProperties)
- private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties();
- }
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ gtfsRealtimeVersion_ = "";
+ incrementality_ = 0;
+ timestamp_ = 0L;
+ return this;
+ }
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public StopTimeProperties 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();
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader build() {
+ com.google.transit.realtime.GtfsRealtime.FeedHeader result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.FeedHeader result = new com.google.transit.realtime.GtfsRealtime.FeedHeader(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedHeader result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.gtfsRealtimeVersion_ = gtfsRealtimeVersion_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.incrementality_ = incrementality_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000004;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedHeader) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedHeader other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance())
+ return this;
+ if (other.hasGtfsRealtimeVersion()) {
+ gtfsRealtimeVersion_ = other.gtfsRealtimeVersion_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasIncrementality()) {
+ setIncrementality(other.getIncrementality());
+ }
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasGtfsRealtimeVersion()) {
+ 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 : {
+ gtfsRealtimeVersion_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16 : {
+ int tmpRaw = input.readEnum();
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality tmpValue = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality
+ .forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(2, tmpRaw);
+ } else {
+ incrementality_ = tmpRaw;
+ bitField0_ |= 0x00000002;
+ }
+ break;
+ } // case 16
+ case 24 : {
+ timestamp_ = input.readUInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ 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 gtfsRealtimeVersion_ = "";
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return Whether the gtfsRealtimeVersion field is set.
+ */
+ public boolean hasGtfsRealtimeVersion() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return The gtfsRealtimeVersion.
+ */
+ public java.lang.String getGtfsRealtimeVersion() {
+ java.lang.Object ref = gtfsRealtimeVersion_;
+ 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()) {
+ gtfsRealtimeVersion_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return The bytes for gtfsRealtimeVersion.
+ */
+ public com.google.protobuf.ByteString getGtfsRealtimeVersionBytes() {
+ java.lang.Object ref = gtfsRealtimeVersion_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b = com.google.protobuf.ByteString
+ .copyFromUtf8((java.lang.String) ref);
+ gtfsRealtimeVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @param value The gtfsRealtimeVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGtfsRealtimeVersion(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ gtfsRealtimeVersion_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearGtfsRealtimeVersion() {
+ gtfsRealtimeVersion_ = getDefaultInstance().getGtfsRealtimeVersion();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Version of the feed specification.
+ * The current version is 2.0. Valid versions are "2.0", "1.0".
+ *
+ *
+ * required string gtfs_realtime_version = 1;
+ * @param value The bytes for gtfsRealtimeVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGtfsRealtimeVersionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ gtfsRealtimeVersion_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private int incrementality_ = 0;
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return Whether the incrementality field is set.
+ */
+ @java.lang.Override
+ public boolean hasIncrementality() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return The incrementality.
+ */
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
+ com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality
+ .forNumber(incrementality_);
+ return result == null
+ ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET
+ : result;
+ }
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @param value The incrementality to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIncrementality(com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ incrementality_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
+ * @return This builder for chaining.
+ */
+ public Builder clearIncrementality() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ incrementality_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_;
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * This timestamp identifies the moment when the content of this feed has been
+ * created (in server time). In POSIX time (i.e., number of seconds since
+ * January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.FeedHeader)
}
- };
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
+ // @@protoc_insertion_point(class_scope:transit_realtime.FeedHeader)
+ private static final com.google.transit.realtime.GtfsRealtime.FeedHeader DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedHeader();
+ }
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ public static com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Deprecated
+ public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FeedHeader 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;
+ }
- public interface StopTimeUpdateOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeUpdate)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
-
- /**
- *
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
- *
- *
- * optional uint32 stop_sequence = 1;
- * @return Whether the stopSequence field is set.
- */
- boolean hasStopSequence();
- /**
- *
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
- *
- *
- * optional uint32 stop_sequence = 1;
- * @return The stopSequence.
- */
- int getStopSequence();
-
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @return Whether the stopId field is set.
- */
- boolean hasStopId();
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @return The stopId.
- */
- java.lang.String getStopId();
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @return The bytes for stopId.
- */
- com.google.protobuf.ByteString
- getStopIdBytes();
-
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return Whether the arrival field is set.
- */
- boolean hasArrival();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return The arrival.
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder();
-
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return Whether the departure field is set.
- */
- boolean hasDeparture();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return The departure.
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder();
-
- /**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @return Whether the scheduleRelationship field is set.
- */
- boolean hasScheduleRelationship();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @return The scheduleRelationship.
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship();
-
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return Whether the stopTimeProperties field is set.
- */
- boolean hasStopTimeProperties();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return The stopTimeProperties.
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getStopTimeProperties();
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- */
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder();
- }
- /**
- *
- * Realtime update for arrival and/or departure events for a given stop on a
- * trip. Updates can be supplied for both past and future events.
- * The producer is allowed, although not required, to drop past events.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate}
- */
- public static final class StopTimeUpdate extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- StopTimeUpdate> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeUpdate)
- StopTimeUpdateOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use StopTimeUpdate.newBuilder() to construct.
- private StopTimeUpdate(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private StopTimeUpdate() {
- stopId_ = "";
- scheduleRelationship_ = 0;
- }
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new StopTimeUpdate();
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
- }
+ }
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder.class);
- }
+ public interface FeedEntityOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.FeedEntity)
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder {
- /**
- *
- * The relation between this StopTime and the static schedule.
- *
- *
- * Protobuf enum {@code transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
- */
- public enum ScheduleRelationship
- implements com.google.protobuf.ProtocolMessageEnum {
/**
*
- * The vehicle is proceeding in accordance with its static schedule of
- * stops, although not necessarily according to the times of the schedule.
- * At least one of arrival and departure must be provided. If the schedule
- * for this stop contains both arrival and departure times then so must
- * this update.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * SCHEDULED = 0;
+ * required string id = 1;
+ * @return Whether the id field is set.
*/
- SCHEDULED(0),
+ boolean hasId();
/**
*
- * The stop is skipped, i.e., the vehicle will not stop at this stop.
- * Arrival and departure are optional.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * SKIPPED = 1;
+ * required string id = 1;
+ * @return The id.
*/
- SKIPPED(1),
+ java.lang.String getId();
/**
*
- * 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.
- * Neither arrival nor departure should be supplied.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * NO_DATA = 2;
+ * required string id = 1;
+ * @return The bytes for id.
*/
- NO_DATA(2),
- ;
+ com.google.protobuf.ByteString getIdBytes();
/**
*
- * The vehicle is proceeding in accordance with its static schedule of
- * stops, although not necessarily according to the times of the schedule.
- * At least one of arrival and departure must be provided. If the schedule
- * for this stop contains both arrival and departure times then so must
- * this update.
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
*
*
- * SCHEDULED = 0;
+ * optional bool is_deleted = 2 [default = false];
+ * @return Whether the isDeleted field is set.
*/
- public static final int SCHEDULED_VALUE = 0;
+ boolean hasIsDeleted();
/**
*
- * The stop is skipped, i.e., the vehicle will not stop at this stop.
- * Arrival and departure are optional.
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
*
*
- * SKIPPED = 1;
+ * optional bool is_deleted = 2 [default = false];
+ * @return The isDeleted.
*/
- public static final int SKIPPED_VALUE = 1;
+ boolean getIsDeleted();
+
/**
*
- * 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.
- * Neither arrival nor departure should be supplied.
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
*
*
- * NO_DATA = 2;
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return Whether the tripUpdate field is set.
*/
- public static final int NO_DATA_VALUE = 2;
-
-
- public final int getNumber() {
- return value;
- }
-
+ boolean hasTripUpdate();
/**
- * @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.
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return The tripUpdate.
*/
- @java.lang.Deprecated
- public static ScheduleRelationship valueOf(int value) {
- return forNumber(value);
- }
+ com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate();
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder();
/**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return Whether the vehicle field is set.
*/
- public static ScheduleRelationship forNumber(int value) {
- switch (value) {
- case 0: return SCHEDULED;
- case 1: return SKIPPED;
- case 2: return NO_DATA;
- default: return null;
- }
- }
+ boolean hasVehicle();
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return The vehicle.
+ */
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle();
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder();
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ * @return Whether the alert field is set.
+ */
+ boolean hasAlert();
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ * @return The alert.
+ */
+ com.google.transit.realtime.GtfsRealtime.Alert getAlert();
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder();
+ }
+ /**
+ *
+ * A definition (or update) of an entity in the transit feed.
+ *
+ *
+ * Protobuf type {@code transit_realtime.FeedEntity}
+ */
+ public static final class FeedEntity extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.FeedEntity)
+ FeedEntityOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FeedEntity.newBuilder() to construct.
+ private FeedEntity(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
}
- 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().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDescriptor().getEnumTypes().get(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.TripUpdate.StopTimeUpdate.ScheduleRelationship)
- }
-
- private int bitField0_;
- public static final int STOP_SEQUENCE_FIELD_NUMBER = 1;
- private int stopSequence_ = 0;
- /**
- *
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
- *
- *
- * optional uint32 stop_sequence = 1;
- * @return Whether the stopSequence field is set.
- */
- @java.lang.Override
- public boolean hasStopSequence() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
- *
- *
- * optional uint32 stop_sequence = 1;
- * @return The stopSequence.
- */
- @java.lang.Override
- public int getStopSequence() {
- return stopSequence_;
- }
-
- public static final int STOP_ID_FIELD_NUMBER = 4;
- @SuppressWarnings("serial")
- private volatile java.lang.Object stopId_ = "";
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @return Whether the stopId field is set.
- */
- @java.lang.Override
- public boolean hasStopId() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @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;
- }
- }
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @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 ARRIVAL_FIELD_NUMBER = 2;
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent arrival_;
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return Whether the arrival field is set.
- */
- @java.lang.Override
- public boolean hasArrival() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return The arrival.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival() {
- return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder() {
- return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
- }
-
- public static final int DEPARTURE_FIELD_NUMBER = 3;
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent departure_;
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return Whether the departure field is set.
- */
- @java.lang.Override
- public boolean hasDeparture() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return The departure.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture() {
- return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder() {
- return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
- }
-
- public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 5;
- 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);
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @return The scheduleRelationship.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(scheduleRelationship_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.SCHEDULED : result;
- }
-
- public static final int STOP_TIME_PROPERTIES_FIELD_NUMBER = 6;
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties stopTimeProperties_;
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return Whether the stopTimeProperties field is set.
- */
- @java.lang.Override
- public boolean hasStopTimeProperties() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return The stopTimeProperties.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getStopTimeProperties() {
- return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder() {
- return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
- }
-
- 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 (hasArrival()) {
- if (!getArrival().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasDeparture()) {
- if (!getDeparture().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.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeUInt32(1, stopSequence_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(2, getArrival());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeMessage(3, getDeparture());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stopId_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeEnum(5, scheduleRelationship_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeMessage(6, getStopTimeProperties());
- }
- extensionWriter.writeUntil(2000, 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
- .computeUInt32Size(1, stopSequence_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getArrival());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getDeparture());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stopId_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(5, scheduleRelationship_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(6, getStopTimeProperties());
- }
- 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.TripUpdate.StopTimeUpdate)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate) obj;
-
- if (hasStopSequence() != other.hasStopSequence()) return false;
- if (hasStopSequence()) {
- if (getStopSequence()
- != other.getStopSequence()) return false;
- }
- if (hasStopId() != other.hasStopId()) return false;
- if (hasStopId()) {
- if (!getStopId()
- .equals(other.getStopId())) return false;
- }
- if (hasArrival() != other.hasArrival()) return false;
- if (hasArrival()) {
- if (!getArrival()
- .equals(other.getArrival())) return false;
- }
- if (hasDeparture() != other.hasDeparture()) return false;
- if (hasDeparture()) {
- if (!getDeparture()
- .equals(other.getDeparture())) return false;
- }
- if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
- if (hasScheduleRelationship()) {
- if (scheduleRelationship_ != other.scheduleRelationship_) return false;
- }
- if (hasStopTimeProperties() != other.hasStopTimeProperties()) return false;
- if (hasStopTimeProperties()) {
- if (!getStopTimeProperties()
- .equals(other.getStopTimeProperties())) 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 (hasStopSequence()) {
- hash = (37 * hash) + STOP_SEQUENCE_FIELD_NUMBER;
- hash = (53 * hash) + getStopSequence();
- }
- if (hasStopId()) {
- hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
- hash = (53 * hash) + getStopId().hashCode();
- }
- if (hasArrival()) {
- hash = (37 * hash) + ARRIVAL_FIELD_NUMBER;
- hash = (53 * hash) + getArrival().hashCode();
- }
- if (hasDeparture()) {
- hash = (37 * hash) + DEPARTURE_FIELD_NUMBER;
- hash = (53 * hash) + getDeparture().hashCode();
- }
- if (hasScheduleRelationship()) {
- hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
- hash = (53 * hash) + scheduleRelationship_;
- }
- if (hasStopTimeProperties()) {
- hash = (37 * hash) + STOP_TIME_PROPERTIES_FIELD_NUMBER;
- hash = (53 * hash) + getStopTimeProperties().hashCode();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate 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.TripUpdate.StopTimeUpdate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate 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.TripUpdate.StopTimeUpdate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate 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.TripUpdate.StopTimeUpdate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .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.TripUpdate.StopTimeUpdate 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.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Realtime update for arrival and/or departure events for a given stop on a
- * trip. Updates can be supplied for both past and future events.
- * The producer is allowed, although not required, to drop past events.
- *
- *
- * Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeUpdate)
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getArrivalFieldBuilder();
- getDepartureFieldBuilder();
- getStopTimePropertiesFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- stopSequence_ = 0;
- stopId_ = "";
- arrival_ = null;
- if (arrivalBuilder_ != null) {
- arrivalBuilder_.dispose();
- arrivalBuilder_ = null;
- }
- departure_ = null;
- if (departureBuilder_ != null) {
- departureBuilder_.dispose();
- departureBuilder_ = null;
- }
- scheduleRelationship_ = 0;
- stopTimeProperties_ = null;
- if (stopTimePropertiesBuilder_ != null) {
- stopTimePropertiesBuilder_.dispose();
- stopTimePropertiesBuilder_ = null;
- }
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate build() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.stopSequence_ = stopSequence_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.stopId_ = stopId_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.arrival_ = arrivalBuilder_ == null
- ? arrival_
- : arrivalBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.departure_ = departureBuilder_ == null
- ? departure_
- : departureBuilder_.build();
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.scheduleRelationship_ = scheduleRelationship_;
- to_bitField0_ |= 0x00000010;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.stopTimeProperties_ = stopTimePropertiesBuilder_ == null
- ? stopTimeProperties_
- : stopTimePropertiesBuilder_.build();
- to_bitField0_ |= 0x00000020;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
+ private FeedEntity() {
+ id_ = "";
}
+
@java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance()) return this;
- if (other.hasStopSequence()) {
- setStopSequence(other.getStopSequence());
- }
- if (other.hasStopId()) {
- stopId_ = other.stopId_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.hasArrival()) {
- mergeArrival(other.getArrival());
- }
- if (other.hasDeparture()) {
- mergeDeparture(other.getDeparture());
- }
- if (other.hasScheduleRelationship()) {
- setScheduleRelationship(other.getScheduleRelationship());
- }
- if (other.hasStopTimeProperties()) {
- mergeStopTimeProperties(other.getStopTimeProperties());
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new FeedEntity();
}
@java.lang.Override
- public final boolean isInitialized() {
- if (hasArrival()) {
- if (!getArrival().isInitialized()) {
- return false;
- }
- }
- if (hasDeparture()) {
- if (!getDeparture().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 8: {
- stopSequence_ = input.readUInt32();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 18: {
- input.readMessage(
- getArrivalFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 18
- case 26: {
- input.readMessage(
- getDepartureFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000008;
- break;
- } // case 26
- case 34: {
- stopId_ = input.readBytes();
- bitField0_ |= 0x00000002;
- break;
- } // case 34
- case 40: {
- int tmpRaw = input.readEnum();
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship tmpValue =
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(tmpRaw);
- if (tmpValue == null) {
- mergeUnknownVarintField(5, tmpRaw);
- } else {
- scheduleRelationship_ = tmpRaw;
- bitField0_ |= 0x00000010;
- }
- break;
- } // case 40
- case 50: {
- input.readMessage(
- getStopTimePropertiesFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- 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;
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
}
- private int bitField0_;
- private int stopSequence_ ;
- /**
- *
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
- *
- *
- * optional uint32 stop_sequence = 1;
- * @return Whether the stopSequence field is set.
- */
@java.lang.Override
- public boolean hasStopSequence() {
- return ((bitField0_ & 0x00000001) != 0);
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedEntity.class,
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
}
+
+ private int bitField0_;
+ public static final int ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object id_ = "";
/**
*
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * optional uint32 stop_sequence = 1;
- * @return The stopSequence.
+ * required string id = 1;
+ * @return Whether the id field is set.
*/
@java.lang.Override
- public int getStopSequence() {
- return stopSequence_;
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
*
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * optional uint32 stop_sequence = 1;
- * @param value The stopSequence to set.
- * @return This builder for chaining.
+ * required string id = 1;
+ * @return The id.
*/
- public Builder setStopSequence(int value) {
-
- stopSequence_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
+ @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;
+ }
}
/**
*
- * Must be the same as in stop_times.txt in the corresponding GTFS feed.
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
*
*
- * optional uint32 stop_sequence = 1;
- * @return This builder for chaining.
+ * required string id = 1;
+ * @return The bytes for id.
*/
- public Builder clearStopSequence() {
- bitField0_ = (bitField0_ & ~0x00000001);
- stopSequence_ = 0;
- onChanged();
- return this;
+ @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;
+ }
}
- private java.lang.Object stopId_ = "";
- /**
- *
- * Must be the same as in stops.txt in the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 4;
- * @return Whether the stopId field is set.
- */
- public boolean hasStopId() {
- return ((bitField0_ & 0x00000002) != 0);
- }
+ public static final int IS_DELETED_FIELD_NUMBER = 2;
+ private boolean isDeleted_ = false;
/**
*
- * Must be the same as in stops.txt in the corresponding GTFS feed.
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
*
*
- * optional string stop_id = 4;
- * @return The stopId.
+ * optional bool is_deleted = 2 [default = false];
+ * @return Whether the isDeleted field is set.
*/
- 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;
- }
+ @java.lang.Override
+ public boolean hasIsDeleted() {
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
*
- * Must be the same as in stops.txt in the corresponding GTFS feed.
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
*
*
- * optional string stop_id = 4;
- * @return The bytes for stopId.
+ * optional bool is_deleted = 2 [default = false];
+ * @return The isDeleted.
*/
- 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;
- }
+ @java.lang.Override
+ public boolean getIsDeleted() {
+ return isDeleted_;
}
+
+ public static final int TRIP_UPDATE_FIELD_NUMBER = 3;
+ private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
/**
*
- * Must be the same as in stops.txt in the corresponding GTFS feed.
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
*
*
- * optional string stop_id = 4;
- * @param value The stopId to set.
- * @return This builder for chaining.
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return Whether the tripUpdate field is set.
*/
- public Builder setStopId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- stopId_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
+ @java.lang.Override
+ public boolean hasTripUpdate() {
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
*
- * Must be the same as in stops.txt in the corresponding GTFS feed.
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
*
*
- * optional string stop_id = 4;
- * @return This builder for chaining.
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return The tripUpdate.
*/
- public Builder clearStopId() {
- stopId_ = getDefaultInstance().getStopId();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
+ return tripUpdate_ == null
+ ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()
+ : tripUpdate_;
}
/**
*
- * Must be the same as in stops.txt in the corresponding GTFS feed.
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
*
*
- * optional string stop_id = 4;
- * @param value The bytes for stopId to set.
- * @return This builder for chaining.
+ * optional .transit_realtime.TripUpdate trip_update = 3;
*/
- public Builder setStopIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- stopId_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
+ return tripUpdate_ == null
+ ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()
+ : tripUpdate_;
}
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent arrival_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> arrivalBuilder_;
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return Whether the arrival field is set.
- */
- public boolean hasArrival() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- * @return The arrival.
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival() {
- if (arrivalBuilder_ == null) {
- return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
- } else {
- return arrivalBuilder_.getMessage();
- }
- }
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
- */
- public Builder setArrival(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
- if (arrivalBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- arrival_ = value;
- } else {
- arrivalBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
+ public static final int VEHICLE_FIELD_NUMBER = 4;
+ private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return Whether the vehicle field is set.
*/
- public Builder setArrival(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder builderForValue) {
- if (arrivalBuilder_ == null) {
- arrival_ = builderForValue.build();
- } else {
- arrivalBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
+ @java.lang.Override
+ public boolean hasVehicle() {
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return The vehicle.
*/
- public Builder mergeArrival(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
- if (arrivalBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0) &&
- arrival_ != null &&
- arrival_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
- getArrivalBuilder().mergeFrom(value);
- } else {
- arrival_ = value;
- }
- } else {
- arrivalBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
+ return vehicle_ == null
+ ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()
+ : vehicle_;
}
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
*/
- public Builder clearArrival() {
- bitField0_ = (bitField0_ & ~0x00000004);
- arrival_ = null;
- if (arrivalBuilder_ != null) {
- arrivalBuilder_.dispose();
- arrivalBuilder_ = null;
- }
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
+ return vehicle_ == null
+ ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()
+ : vehicle_;
}
+
+ public static final int ALERT_FIELD_NUMBER = 5;
+ private com.google.transit.realtime.GtfsRealtime.Alert alert_;
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.Alert alert = 5;
+ * @return Whether the alert field is set.
*/
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder getArrivalBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getArrivalFieldBuilder().getBuilder();
+ @java.lang.Override
+ public boolean hasAlert() {
+ return ((bitField0_ & 0x00000010) != 0);
}
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.Alert alert = 5;
+ * @return The alert.
*/
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder() {
- if (arrivalBuilder_ != null) {
- return arrivalBuilder_.getMessageOrBuilder();
- } else {
- return arrival_ == null ?
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
+ return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
/**
- * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * optional .transit_realtime.Alert alert = 5;
*/
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>
- getArrivalFieldBuilder() {
- if (arrivalBuilder_ == null) {
- arrivalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>(
- getArrival(),
- getParentForChildren(),
- isClean());
- arrival_ = null;
- }
- return arrivalBuilder_;
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
+ return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent departure_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> departureBuilder_;
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return Whether the departure field is set.
- */
- public boolean hasDeparture() {
- return ((bitField0_ & 0x00000008) != 0);
+ 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 (!hasId()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (hasTripUpdate()) {
+ if (!getTripUpdate().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasVehicle()) {
+ if (!getVehicle().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (hasAlert()) {
+ if (!getAlert().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- * @return The departure.
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture() {
- if (departureBuilder_ == null) {
- return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
- } else {
- return departureBuilder_.getMessage();
- }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeBool(2, isDeleted_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(3, getTripUpdate());
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeMessage(4, getVehicle());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeMessage(5, getAlert());
+ }
+ extensionWriter.writeUntil(2000, output);
+ getUnknownFields().writeTo(output);
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public Builder setDeparture(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
- if (departureBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1)
+ return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDeleted_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTripUpdate());
}
- departure_ = value;
- } else {
- departureBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVehicle());
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAlert());
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public Builder setDeparture(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder builderForValue) {
- if (departureBuilder_ == null) {
- departure_ = builderForValue.build();
- } else {
- departureBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.FeedEntity other = (com.google.transit.realtime.GtfsRealtime.FeedEntity) obj;
+
+ if (hasId() != other.hasId())
+ return false;
+ if (hasId()) {
+ if (!getId().equals(other.getId()))
+ return false;
+ }
+ if (hasIsDeleted() != other.hasIsDeleted())
+ return false;
+ if (hasIsDeleted()) {
+ if (getIsDeleted() != other.getIsDeleted())
+ return false;
+ }
+ if (hasTripUpdate() != other.hasTripUpdate())
+ return false;
+ if (hasTripUpdate()) {
+ if (!getTripUpdate().equals(other.getTripUpdate()))
+ return false;
+ }
+ if (hasVehicle() != other.hasVehicle())
+ return false;
+ if (hasVehicle()) {
+ if (!getVehicle().equals(other.getVehicle()))
+ return false;
+ }
+ if (hasAlert() != other.hasAlert())
+ return false;
+ if (hasAlert()) {
+ if (!getAlert().equals(other.getAlert()))
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields()))
+ return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public Builder mergeDeparture(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
- if (departureBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0) &&
- departure_ != null &&
- departure_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
- getDepartureBuilder().mergeFrom(value);
- } else {
- departure_ = value;
+
+ @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();
}
- } else {
- departureBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
+ if (hasIsDeleted()) {
+ hash = (37 * hash) + IS_DELETED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDeleted());
+ }
+ if (hasTripUpdate()) {
+ hash = (37 * hash) + TRIP_UPDATE_FIELD_NUMBER;
+ hash = (53 * hash) + getTripUpdate().hashCode();
+ }
+ if (hasVehicle()) {
+ hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
+ hash = (53 * hash) + getVehicle().hashCode();
+ }
+ if (hasAlert()) {
+ hash = (37 * hash) + ALERT_FIELD_NUMBER;
+ hash = (53 * hash) + getAlert().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity 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.FeedEntity parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
+ extensionRegistry);
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public Builder clearDeparture() {
- bitField0_ = (bitField0_ & ~0x00000008);
- departure_ = null;
- if (departureBuilder_ != null) {
- departureBuilder_.dispose();
- departureBuilder_ = null;
- }
- onChanged();
- return this;
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder getDepartureBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getDepartureFieldBuilder().getBuilder();
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
+ com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder() {
- if (departureBuilder_ != null) {
- return departureBuilder_.getMessageOrBuilder();
- } else {
- return departure_ == null ?
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
- }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
}
- /**
- * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>
- getDepartureFieldBuilder() {
- if (departureBuilder_ == null) {
- departureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>(
- getDeparture(),
- getParentForChildren(),
- isClean());
- departure_ = null;
- }
- return departureBuilder_;
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.FeedEntity prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(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);
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
}
/**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @return The scheduleRelationship.
+ *
+ * A definition (or update) of an entity in the transit feed.
+ *
+ *
+ * Protobuf type {@code transit_realtime.FeedEntity}
*/
+ public static final class Builder
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
+ implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.FeedEntity)
+ com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.FeedEntity.class,
+ com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
+ }
+
+ // Construct using com.google.transit.realtime.GtfsRealtime.FeedEntity.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getTripUpdateFieldBuilder();
+ getVehicleFieldBuilder();
+ getAlertFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ id_ = "";
+ isDeleted_ = false;
+ tripUpdate_ = null;
+ if (tripUpdateBuilder_ != null) {
+ tripUpdateBuilder_.dispose();
+ tripUpdateBuilder_ = null;
+ }
+ vehicle_ = null;
+ if (vehicleBuilder_ != null) {
+ vehicleBuilder_.dispose();
+ vehicleBuilder_ = null;
+ }
+ alert_ = null;
+ if (alertBuilder_ != null) {
+ alertBuilder_.dispose();
+ alertBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity build() {
+ com.google.transit.realtime.GtfsRealtime.FeedEntity result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.FeedEntity result = new com.google.transit.realtime.GtfsRealtime.FeedEntity(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedEntity 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.isDeleted_ = isDeleted_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.tripUpdate_ = tripUpdateBuilder_ == null ? tripUpdate_ : tripUpdateBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.vehicle_ = vehicleBuilder_ == null ? vehicle_ : vehicleBuilder_.build();
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.alert_ = alertBuilder_ == null ? alert_ : alertBuilder_.build();
+ to_bitField0_ |= 0x00000010;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedEntity) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedEntity other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance())
+ return this;
+ if (other.hasId()) {
+ id_ = other.id_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasIsDeleted()) {
+ setIsDeleted(other.getIsDeleted());
+ }
+ if (other.hasTripUpdate()) {
+ mergeTripUpdate(other.getTripUpdate());
+ }
+ if (other.hasVehicle()) {
+ mergeVehicle(other.getVehicle());
+ }
+ if (other.hasAlert()) {
+ mergeAlert(other.getAlert());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasId()) {
+ return false;
+ }
+ if (hasTripUpdate()) {
+ if (!getTripUpdate().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasVehicle()) {
+ if (!getVehicle().isInitialized()) {
+ return false;
+ }
+ }
+ if (hasAlert()) {
+ if (!getAlert().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 : {
+ id_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16 : {
+ isDeleted_ = input.readBool();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 26 : {
+ input.readMessage(getTripUpdateFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34 : {
+ input.readMessage(getVehicleFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42 : {
+ input.readMessage(getAlertFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ 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_ = "";
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required string id = 1;
+ * @return Whether the id field is set.
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required 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;
+ }
+ }
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required 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;
+ }
+ }
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required 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;
+ }
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required string id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+ id_ = getDefaultInstance().getId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The ids are used only to provide incrementality support. The id should be
+ * unique within a FeedMessage. Consequent FeedMessages may contain
+ * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
+ * FeedEntity with some id will replace the old FeedEntity with the same id
+ * (or delete it - see is_deleted below).
+ * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
+ * feed must be specified by explicit selectors (see EntitySelector below for
+ * more info).
+ *
+ *
+ * required 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 boolean isDeleted_;
+ /**
+ *
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ *
+ * optional bool is_deleted = 2 [default = false];
+ * @return Whether the isDeleted field is set.
+ */
+ @java.lang.Override
+ public boolean hasIsDeleted() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ *
+ * optional bool is_deleted = 2 [default = false];
+ * @return The isDeleted.
+ */
+ @java.lang.Override
+ public boolean getIsDeleted() {
+ return isDeleted_;
+ }
+ /**
+ *
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ *
+ * optional bool is_deleted = 2 [default = false];
+ * @param value The isDeleted to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIsDeleted(boolean value) {
+
+ isDeleted_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Whether this entity is to be deleted. Relevant only for incremental
+ * fetches.
+ *
+ *
+ * optional bool is_deleted = 2 [default = false];
+ * @return This builder for chaining.
+ */
+ public Builder clearIsDeleted() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ isDeleted_ = false;
+ onChanged();
+ return this;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
+ private com.google.protobuf.SingleFieldBuilderV3 tripUpdateBuilder_;
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return Whether the tripUpdate field is set.
+ */
+ public boolean hasTripUpdate() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ * @return The tripUpdate.
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
+ if (tripUpdateBuilder_ == null) {
+ return tripUpdate_ == null
+ ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()
+ : tripUpdate_;
+ } else {
+ return tripUpdateBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
+ if (tripUpdateBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tripUpdate_ = value;
+ } else {
+ tripUpdateBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder builderForValue) {
+ if (tripUpdateBuilder_ == null) {
+ tripUpdate_ = builderForValue.build();
+ } else {
+ tripUpdateBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public Builder mergeTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
+ if (tripUpdateBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0) && tripUpdate_ != null
+ && tripUpdate_ != com.google.transit.realtime.GtfsRealtime.TripUpdate
+ .getDefaultInstance()) {
+ getTripUpdateBuilder().mergeFrom(value);
+ } else {
+ tripUpdate_ = value;
+ }
+ } else {
+ tripUpdateBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public Builder clearTripUpdate() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ tripUpdate_ = null;
+ if (tripUpdateBuilder_ != null) {
+ tripUpdateBuilder_.dispose();
+ tripUpdateBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder getTripUpdateBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getTripUpdateFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
+ if (tripUpdateBuilder_ != null) {
+ return tripUpdateBuilder_.getMessageOrBuilder();
+ } else {
+ return tripUpdate_ == null
+ ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()
+ : tripUpdate_;
+ }
+ }
+ /**
+ *
+ * Data about the entity itself. Exactly one of the following fields must be
+ * present (unless the entity is being deleted).
+ *
+ *
+ * optional .transit_realtime.TripUpdate trip_update = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3 getTripUpdateFieldBuilder() {
+ if (tripUpdateBuilder_ == null) {
+ tripUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(
+ getTripUpdate(), getParentForChildren(), isClean());
+ tripUpdate_ = null;
+ }
+ return tripUpdateBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
+ private com.google.protobuf.SingleFieldBuilderV3 vehicleBuilder_;
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return Whether the vehicle field is set.
+ */
+ public boolean hasVehicle() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ * @return The vehicle.
+ */
+ public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
+ if (vehicleBuilder_ == null) {
+ return vehicle_ == null
+ ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()
+ : vehicle_;
+ } else {
+ return vehicleBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
+ if (vehicleBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ vehicle_ = value;
+ } else {
+ vehicleBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public Builder setVehicle(
+ com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder builderForValue) {
+ if (vehicleBuilder_ == null) {
+ vehicle_ = builderForValue.build();
+ } else {
+ vehicleBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
+ if (vehicleBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0) && vehicle_ != null
+ && vehicle_ != com.google.transit.realtime.GtfsRealtime.VehiclePosition
+ .getDefaultInstance()) {
+ getVehicleBuilder().mergeFrom(value);
+ } else {
+ vehicle_ = value;
+ }
+ } else {
+ vehicleBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public Builder clearVehicle() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ vehicle_ = null;
+ if (vehicleBuilder_ != null) {
+ vehicleBuilder_.dispose();
+ vehicleBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder getVehicleBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getVehicleFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
+ if (vehicleBuilder_ != null) {
+ return vehicleBuilder_.getMessageOrBuilder();
+ } else {
+ return vehicle_ == null
+ ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()
+ : vehicle_;
+ }
+ }
+ /**
+ * optional .transit_realtime.VehiclePosition vehicle = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3 getVehicleFieldBuilder() {
+ if (vehicleBuilder_ == null) {
+ vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(
+ getVehicle(), getParentForChildren(), isClean());
+ vehicle_ = null;
+ }
+ return vehicleBuilder_;
+ }
+
+ private com.google.transit.realtime.GtfsRealtime.Alert alert_;
+ private com.google.protobuf.SingleFieldBuilderV3 alertBuilder_;
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ * @return Whether the alert field is set.
+ */
+ public boolean hasAlert() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ * @return The alert.
+ */
+ public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
+ if (alertBuilder_ == null) {
+ return alert_ == null
+ ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()
+ : alert_;
+ } else {
+ return alertBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
+ if (alertBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ alert_ = value;
+ } else {
+ alertBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert.Builder builderForValue) {
+ if (alertBuilder_ == null) {
+ alert_ = builderForValue.build();
+ } else {
+ alertBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public Builder mergeAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
+ if (alertBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) != 0) && alert_ != null
+ && alert_ != com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) {
+ getAlertBuilder().mergeFrom(value);
+ } else {
+ alert_ = value;
+ }
+ } else {
+ alertBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public Builder clearAlert() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ alert_ = null;
+ if (alertBuilder_ != null) {
+ alertBuilder_.dispose();
+ alertBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public com.google.transit.realtime.GtfsRealtime.Alert.Builder getAlertBuilder() {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return getAlertFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
+ if (alertBuilder_ != null) {
+ return alertBuilder_.getMessageOrBuilder();
+ } else {
+ return alert_ == null
+ ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()
+ : alert_;
+ }
+ }
+ /**
+ * optional .transit_realtime.Alert alert = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3 getAlertFieldBuilder() {
+ if (alertBuilder_ == null) {
+ alertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(
+ getAlert(), getParentForChildren(), isClean());
+ alert_ = null;
+ }
+ return alertBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:transit_realtime.FeedEntity)
+ }
+
+ // @@protoc_insertion_point(class_scope:transit_realtime.FeedEntity)
+ private static final com.google.transit.realtime.GtfsRealtime.FeedEntity DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedEntity();
+ }
+
+ public static com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated
+ public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FeedEntity 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.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(scheduleRelationship_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.SCHEDULED : result;
+ public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
}
+
+ }
+
+ public interface TripUpdateOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate)
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder {
+
/**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @param value The scheduleRelationship to set.
- * @return This builder for chaining.
+ *
+ * The Trip that this message applies to. There can be at most one
+ * TripUpdate entity for each actual trip instance.
+ * If there is none, that means there is no prediction information available.
+ * It does *not* mean that the trip is progressing according to schedule.
+ *
+ *
+ * required .transit_realtime.TripDescriptor trip = 1;
+ * @return Whether the trip field is set.
*/
- public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- scheduleRelationship_ = value.getNumber();
- onChanged();
- return this;
- }
+ boolean hasTrip();
/**
- * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
- * @return This builder for chaining.
+ *
+ * The Trip that this message applies to. There can be at most one
+ * TripUpdate entity for each actual trip instance.
+ * If there is none, that means there is no prediction information available.
+ * It does *not* mean that the trip is progressing according to schedule.
+ *
+ *
+ * required .transit_realtime.TripDescriptor trip = 1;
+ * @return The trip.
*/
- public Builder clearScheduleRelationship() {
- bitField0_ = (bitField0_ & ~0x00000010);
- scheduleRelationship_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties stopTimeProperties_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder> stopTimePropertiesBuilder_;
+ com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return Whether the stopTimeProperties field is set.
+ *
+ * The Trip that this message applies to. There can be at most one
+ * TripUpdate entity for each actual trip instance.
+ * If there is none, that means there is no prediction information available.
+ * It does *not* mean that the trip is progressing according to schedule.
+ *
+ *
+ * required .transit_realtime.TripDescriptor trip = 1;
*/
- public boolean hasStopTimeProperties() {
- return ((bitField0_ & 0x00000020) != 0);
- }
+ com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
+
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
- * @return The stopTimeProperties.
+ *
+ * Additional information on the vehicle that is serving this trip.
+ *
+ *
+ * optional .transit_realtime.VehicleDescriptor vehicle = 3;
+ * @return Whether the vehicle field is set.
*/
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getStopTimeProperties() {
- if (stopTimePropertiesBuilder_ == null) {
- return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
- } else {
- return stopTimePropertiesBuilder_.getMessage();
- }
- }
+ boolean hasVehicle();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Additional information on the vehicle that is serving this trip.
+ *
+ *
+ * optional .transit_realtime.VehicleDescriptor vehicle = 3;
+ * @return The vehicle.
*/
- public Builder setStopTimeProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties value) {
- if (stopTimePropertiesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- stopTimeProperties_ = value;
- } else {
- stopTimePropertiesBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Additional information on the vehicle that is serving this trip.
+ *
+ *
+ * optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
- public Builder setStopTimeProperties(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder builderForValue) {
- if (stopTimePropertiesBuilder_ == null) {
- stopTimeProperties_ = builderForValue.build();
- } else {
- stopTimePropertiesBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
+ com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
+
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Updates to StopTimes for the trip (both future, i.e., predictions, and in
+ * some cases, past ones, i.e., those that already happened).
+ * The updates must be sorted by stop_sequence, and apply for all the
+ * following stops of the trip up to the next specified one.
+ * Example 1:
+ * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
+ * delay of 0 for stop_sequence of the current stop means that the trip is
+ * exactly on time.
+ * Example 2:
+ * For the same trip instance, 3 StopTimeUpdates are provided:
+ * - delay of 5 min for stop_sequence 3
+ * - delay of 1 min for stop_sequence 8
+ * - delay of unspecified duration for stop_sequence 10
+ * This will be interpreted as:
+ * - stop_sequences 3,4,5,6,7 have delay of 5 min.
+ * - stop_sequences 8,9 have delay of 1 min.
+ * - stop_sequences 10,... have unknown delay.
+ *
+ *
+ * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
- public Builder mergeStopTimeProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties value) {
- if (stopTimePropertiesBuilder_ == null) {
- if (((bitField0_ & 0x00000020) != 0) &&
- stopTimeProperties_ != null &&
- stopTimeProperties_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance()) {
- getStopTimePropertiesBuilder().mergeFrom(value);
- } else {
- stopTimeProperties_ = value;
- }
- } else {
- stopTimePropertiesBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
+ java.util.List getStopTimeUpdateList();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Updates to StopTimes for the trip (both future, i.e., predictions, and in
+ * some cases, past ones, i.e., those that already happened).
+ * The updates must be sorted by stop_sequence, and apply for all the
+ * following stops of the trip up to the next specified one.
+ * Example 1:
+ * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
+ * delay of 0 for stop_sequence of the current stop means that the trip is
+ * exactly on time.
+ * Example 2:
+ * For the same trip instance, 3 StopTimeUpdates are provided:
+ * - delay of 5 min for stop_sequence 3
+ * - delay of 1 min for stop_sequence 8
+ * - delay of unspecified duration for stop_sequence 10
+ * This will be interpreted as:
+ * - stop_sequences 3,4,5,6,7 have delay of 5 min.
+ * - stop_sequences 8,9 have delay of 1 min.
+ * - stop_sequences 10,... have unknown delay.
+ *
+ *
+ * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
- public Builder clearStopTimeProperties() {
- bitField0_ = (bitField0_ & ~0x00000020);
- stopTimeProperties_ = null;
- if (stopTimePropertiesBuilder_ != null) {
- stopTimePropertiesBuilder_.dispose();
- stopTimePropertiesBuilder_ = null;
- }
- onChanged();
- return this;
- }
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index);
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Updates to StopTimes for the trip (both future, i.e., predictions, and in
+ * some cases, past ones, i.e., those that already happened).
+ * The updates must be sorted by stop_sequence, and apply for all the
+ * following stops of the trip up to the next specified one.
+ * Example 1:
+ * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
+ * delay of 0 for stop_sequence of the current stop means that the trip is
+ * exactly on time.
+ * Example 2:
+ * For the same trip instance, 3 StopTimeUpdates are provided:
+ * - delay of 5 min for stop_sequence 3
+ * - delay of 1 min for stop_sequence 8
+ * - delay of unspecified duration for stop_sequence 10
+ * This will be interpreted as:
+ * - stop_sequences 3,4,5,6,7 have delay of 5 min.
+ * - stop_sequences 8,9 have delay of 1 min.
+ * - stop_sequences 10,... have unknown delay.
+ *
+ *
+ * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder getStopTimePropertiesBuilder() {
- bitField0_ |= 0x00000020;
- onChanged();
- return getStopTimePropertiesFieldBuilder().getBuilder();
- }
+ int getStopTimeUpdateCount();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Updates to StopTimes for the trip (both future, i.e., predictions, and in
+ * some cases, past ones, i.e., those that already happened).
+ * The updates must be sorted by stop_sequence, and apply for all the
+ * following stops of the trip up to the next specified one.
+ * Example 1:
+ * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
+ * delay of 0 for stop_sequence of the current stop means that the trip is
+ * exactly on time.
+ * Example 2:
+ * For the same trip instance, 3 StopTimeUpdates are provided:
+ * - delay of 5 min for stop_sequence 3
+ * - delay of 1 min for stop_sequence 8
+ * - delay of unspecified duration for stop_sequence 10
+ * This will be interpreted as:
+ * - stop_sequences 3,4,5,6,7 have delay of 5 min.
+ * - stop_sequences 8,9 have delay of 1 min.
+ * - stop_sequences 10,... have unknown delay.
+ *
+ *
+ * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder() {
- if (stopTimePropertiesBuilder_ != null) {
- return stopTimePropertiesBuilder_.getMessageOrBuilder();
- } else {
- return stopTimeProperties_ == null ?
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
- }
- }
+ java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> getStopTimeUpdateOrBuilderList();
/**
- * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ *
+ * Updates to StopTimes for the trip (both future, i.e., predictions, and in
+ * some cases, past ones, i.e., those that already happened).
+ * The updates must be sorted by stop_sequence, and apply for all the
+ * following stops of the trip up to the next specified one.
+ * Example 1:
+ * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
+ * delay of 0 for stop_sequence of the current stop means that the trip is
+ * exactly on time.
+ * Example 2:
+ * For the same trip instance, 3 StopTimeUpdates are provided:
+ * - delay of 5 min for stop_sequence 3
+ * - delay of 1 min for stop_sequence 8
+ * - delay of unspecified duration for stop_sequence 10
+ * This will be interpreted as:
+ * - stop_sequences 3,4,5,6,7 have delay of 5 min.
+ * - stop_sequences 8,9 have delay of 1 min.
+ * - stop_sequences 10,... have unknown delay.
+ *
+ *
+ * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder>
- getStopTimePropertiesFieldBuilder() {
- if (stopTimePropertiesBuilder_ == null) {
- stopTimePropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder>(
- getStopTimeProperties(),
- getParentForChildren(),
- isClean());
- stopTimeProperties_ = null;
- }
- return stopTimePropertiesBuilder_;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
+ int index);
+ /**
+ *
+ * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 4;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ *
+ * Moment at which the vehicle's real-time progress was measured. In POSIX
+ * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
+ *
+ *
+ * optional uint64 timestamp = 4;
+ * @return The timestamp.
+ */
+ long getTimestamp();
- // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeUpdate)
- }
-
- // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeUpdate)
- private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate();
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public StopTimeUpdate 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.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private int bitField0_;
- public static final int TRIP_FIELD_NUMBER = 1;
- private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- @java.lang.Override
- public boolean hasTrip() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @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_;
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- @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 VEHICLE_FIELD_NUMBER = 3;
- private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return Whether the vehicle field is set.
- */
- @java.lang.Override
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return The vehicle.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
-
- public static final int STOP_TIME_UPDATE_FIELD_NUMBER = 2;
- @SuppressWarnings("serial")
- private java.util.List stopTimeUpdate_;
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- @java.lang.Override
- public java.util.List getStopTimeUpdateList() {
- return stopTimeUpdate_;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- @java.lang.Override
- public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
- getStopTimeUpdateOrBuilderList() {
- return stopTimeUpdate_;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- @java.lang.Override
- public int getStopTimeUpdateCount() {
- return stopTimeUpdate_.size();
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
- return stopTimeUpdate_.get(index);
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
- int index) {
- return stopTimeUpdate_.get(index);
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 4;
- private long timestamp_ = 0L;
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
-
- public static final int DELAY_FIELD_NUMBER = 5;
- private int delay_ = 0;
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return Whether the delay field is set.
- */
- @java.lang.Override
- public boolean hasDelay() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return The delay.
- */
- @java.lang.Override
- public int getDelay() {
- return delay_;
- }
-
- 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()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!getTrip().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getStopTimeUpdateCount(); i++) {
- if (!getStopTimeUpdate(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.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getTrip());
- }
- for (int i = 0; i < stopTimeUpdate_.size(); i++) {
- output.writeMessage(2, stopTimeUpdate_.get(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(3, getVehicle());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeUInt64(4, timestamp_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeInt32(5, delay_);
- }
- extensionWriter.writeUntil(2000, 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, getTrip());
- }
- for (int i = 0; i < stopTimeUpdate_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, stopTimeUpdate_.get(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getVehicle());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(4, timestamp_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(5, delay_);
- }
- 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.TripUpdate)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.TripUpdate other = (com.google.transit.realtime.GtfsRealtime.TripUpdate) obj;
-
- if (hasTrip() != other.hasTrip()) return false;
- if (hasTrip()) {
- if (!getTrip()
- .equals(other.getTrip())) return false;
- }
- if (hasVehicle() != other.hasVehicle()) return false;
- if (hasVehicle()) {
- if (!getVehicle()
- .equals(other.getVehicle())) return false;
- }
- if (!getStopTimeUpdateList()
- .equals(other.getStopTimeUpdateList())) return false;
- if (hasTimestamp() != other.hasTimestamp()) return false;
- if (hasTimestamp()) {
- if (getTimestamp()
- != other.getTimestamp()) return false;
- }
- if (hasDelay() != other.hasDelay()) return false;
- if (hasDelay()) {
- if (getDelay()
- != other.getDelay()) 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 (hasTrip()) {
- hash = (37 * hash) + TRIP_FIELD_NUMBER;
- hash = (53 * hash) + getTrip().hashCode();
- }
- if (hasVehicle()) {
- hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
- hash = (53 * hash) + getVehicle().hashCode();
- }
- if (getStopTimeUpdateCount() > 0) {
- hash = (37 * hash) + STOP_TIME_UPDATE_FIELD_NUMBER;
- hash = (53 * hash) + getStopTimeUpdateList().hashCode();
- }
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- }
- if (hasDelay()) {
- hash = (37 * hash) + DELAY_FIELD_NUMBER;
- hash = (53 * hash) + getDelay();
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate 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.TripUpdate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate 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.TripUpdate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate 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.TripUpdate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .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.TripUpdate 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.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
+ /**
+ *
+ * The current schedule deviation for the trip. Delay should only be
+ * specified when the prediction is given relative to some existing schedule
+ * in GTFS.
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ * Delay information in StopTimeUpdates take precedent of trip-level delay
+ * information, such that trip-level delay is only propagated until the next
+ * stop along the trip with a StopTimeUpdate delay value specified.
+ * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
+ * value indicating when the delay value was last updated, in order to
+ * evaluate the freshness of the data.
+ * NOTE: This field is still experimental, and subject to change. It may be
+ * formally adopted in the future.
+ *
+ *
+ * optional int32 delay = 5;
+ * @return Whether the delay field is set.
+ */
+ boolean hasDelay();
+ /**
+ *
+ * The current schedule deviation for the trip. Delay should only be
+ * specified when the prediction is given relative to some existing schedule
+ * in GTFS.
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ * Delay information in StopTimeUpdates take precedent of trip-level delay
+ * information, such that trip-level delay is only propagated until the next
+ * stop along the trip with a StopTimeUpdate delay value specified.
+ * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
+ * value indicating when the delay value was last updated, in order to
+ * evaluate the freshness of the data.
+ * NOTE: This field is still experimental, and subject to change. It may be
+ * formally adopted in the future.
+ *
+ *
+ * optional int32 delay = 5;
+ * @return The delay.
+ */
+ int getDelay();
}
/**
*
@@ -8381,16833 +4089,20330 @@ protected Builder newBuilderForType(
*
* Protobuf type {@code transit_realtime.TripUpdate}
*/
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate)
- com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getTripFieldBuilder();
- getVehicleFieldBuilder();
- getStopTimeUpdateFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- trip_ = null;
- if (tripBuilder_ != null) {
- tripBuilder_.dispose();
- tripBuilder_ = null;
- }
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- if (stopTimeUpdateBuilder_ == null) {
- stopTimeUpdate_ = java.util.Collections.emptyList();
- } else {
- stopTimeUpdate_ = null;
- stopTimeUpdateBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000004);
- timestamp_ = 0L;
- delay_ = 0;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate build() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate buildPartial() {
- com.google.transit.realtime.GtfsRealtime.TripUpdate result = new com.google.transit.realtime.GtfsRealtime.TripUpdate(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TripUpdate result) {
- if (stopTimeUpdateBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)) {
- stopTimeUpdate_ = java.util.Collections.unmodifiableList(stopTimeUpdate_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.stopTimeUpdate_ = stopTimeUpdate_;
- } else {
- result.stopTimeUpdate_ = stopTimeUpdateBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.trip_ = tripBuilder_ == null
- ? trip_
- : tripBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.vehicle_ = vehicleBuilder_ == null
- ? vehicle_
- : vehicleBuilder_.build();
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.timestamp_ = timestamp_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.delay_ = delay_;
- to_bitField0_ |= 0x00000008;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.TripUpdate, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate other) {
- if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()) return this;
- if (other.hasTrip()) {
- mergeTrip(other.getTrip());
- }
- if (other.hasVehicle()) {
- mergeVehicle(other.getVehicle());
- }
- if (stopTimeUpdateBuilder_ == null) {
- if (!other.stopTimeUpdate_.isEmpty()) {
- if (stopTimeUpdate_.isEmpty()) {
- stopTimeUpdate_ = other.stopTimeUpdate_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.addAll(other.stopTimeUpdate_);
- }
- onChanged();
- }
- } else {
- if (!other.stopTimeUpdate_.isEmpty()) {
- if (stopTimeUpdateBuilder_.isEmpty()) {
- stopTimeUpdateBuilder_.dispose();
- stopTimeUpdateBuilder_ = null;
- stopTimeUpdate_ = other.stopTimeUpdate_;
- bitField0_ = (bitField0_ & ~0x00000004);
- stopTimeUpdateBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getStopTimeUpdateFieldBuilder() : null;
- } else {
- stopTimeUpdateBuilder_.addAllMessages(other.stopTimeUpdate_);
- }
- }
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- if (other.hasDelay()) {
- setDelay(other.getDelay());
- }
- this.mergeExtensionFields(other);
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- if (!hasTrip()) {
- return false;
- }
- if (!getTrip().isInitialized()) {
- return false;
- }
- if (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- return false;
- }
- }
- for (int i = 0; i < getStopTimeUpdateCount(); i++) {
- if (!getStopTimeUpdate(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(
- getTripFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate m =
- input.readMessage(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.PARSER,
- extensionRegistry);
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.add(m);
- } else {
- stopTimeUpdateBuilder_.addMessage(m);
- }
- break;
- } // case 18
- case 26: {
- input.readMessage(
- getVehicleFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 26
- case 32: {
- timestamp_ = input.readUInt64();
- bitField0_ |= 0x00000008;
- break;
- } // case 32
- case 40: {
- delay_ = input.readInt32();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- 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.TripDescriptor trip_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- public boolean hasTrip() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- * @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();
- }
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- 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_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder setTrip(
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
- if (tripBuilder_ == null) {
- trip_ = builderForValue.build();
- } else {
- tripBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
- if (tripBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- trip_ != null &&
- trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
- getTripBuilder().mergeFrom(value);
- } else {
- trip_ = value;
- }
- } else {
- tripBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder clearTrip() {
- bitField0_ = (bitField0_ & ~0x00000001);
- trip_ = null;
- if (tripBuilder_ != null) {
- tripBuilder_.dispose();
- tripBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getTripFieldBuilder().getBuilder();
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- 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_;
- }
- }
- /**
- *
- * The Trip that this message applies to. There can be at most one
- * TripUpdate entity for each actual trip instance.
- * If there is none, that means there is no prediction information available.
- * It does *not* mean that the trip is progressing according to schedule.
- *
- *
- * required .transit_realtime.TripDescriptor trip = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
- getTripFieldBuilder() {
- if (tripBuilder_ == null) {
- tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- 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 com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return Whether the vehicle field is set.
- */
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- * @return The vehicle.
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
- if (vehicleBuilder_ == null) {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- } else {
- return vehicleBuilder_.getMessage();
- }
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
- if (vehicleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- vehicle_ = value;
- } else {
- vehicleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public Builder setVehicle(
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
- if (vehicleBuilder_ == null) {
- vehicle_ = builderForValue.build();
- } else {
- vehicleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
- if (vehicleBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0) &&
- vehicle_ != null &&
- vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
- getVehicleBuilder().mergeFrom(value);
- } else {
- vehicle_ = value;
- }
- } else {
- vehicleBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public Builder clearVehicle() {
- bitField0_ = (bitField0_ & ~0x00000002);
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getVehicleFieldBuilder().getBuilder();
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
- if (vehicleBuilder_ != null) {
- return vehicleBuilder_.getMessageOrBuilder();
- } else {
- return vehicle_ == null ?
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
- getVehicleFieldBuilder() {
- if (vehicleBuilder_ == null) {
- vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
- getVehicle(),
- getParentForChildren(),
- isClean());
- vehicle_ = null;
- }
- return vehicleBuilder_;
- }
-
- private java.util.List stopTimeUpdate_ =
- java.util.Collections.emptyList();
- private void ensureStopTimeUpdateIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- stopTimeUpdate_ = new java.util.ArrayList(stopTimeUpdate_);
- bitField0_ |= 0x00000004;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> stopTimeUpdateBuilder_;
-
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public java.util.List getStopTimeUpdateList() {
- if (stopTimeUpdateBuilder_ == null) {
- return java.util.Collections.unmodifiableList(stopTimeUpdate_);
- } else {
- return stopTimeUpdateBuilder_.getMessageList();
- }
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public int getStopTimeUpdateCount() {
- if (stopTimeUpdateBuilder_ == null) {
- return stopTimeUpdate_.size();
- } else {
- return stopTimeUpdateBuilder_.getCount();
- }
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
- if (stopTimeUpdateBuilder_ == null) {
- return stopTimeUpdate_.get(index);
- } else {
- return stopTimeUpdateBuilder_.getMessage(index);
- }
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder setStopTimeUpdate(
- int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
- if (stopTimeUpdateBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.set(index, value);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder setStopTimeUpdate(
- int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.set(index, builderForValue.build());
- onChanged();
- } else {
- stopTimeUpdateBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder addStopTimeUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
- if (stopTimeUpdateBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.add(value);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder addStopTimeUpdate(
- int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
- if (stopTimeUpdateBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.add(index, value);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder addStopTimeUpdate(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.add(builderForValue.build());
- onChanged();
- } else {
- stopTimeUpdateBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder addStopTimeUpdate(
- int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.add(index, builderForValue.build());
- onChanged();
- } else {
- stopTimeUpdateBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder addAllStopTimeUpdate(
- java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate> values) {
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, stopTimeUpdate_);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder clearStopTimeUpdate() {
- if (stopTimeUpdateBuilder_ == null) {
- stopTimeUpdate_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.clear();
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public Builder removeStopTimeUpdate(int index) {
- if (stopTimeUpdateBuilder_ == null) {
- ensureStopTimeUpdateIsMutable();
- stopTimeUpdate_.remove(index);
- onChanged();
- } else {
- stopTimeUpdateBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder getStopTimeUpdateBuilder(
- int index) {
- return getStopTimeUpdateFieldBuilder().getBuilder(index);
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
- int index) {
- if (stopTimeUpdateBuilder_ == null) {
- return stopTimeUpdate_.get(index); } else {
- return stopTimeUpdateBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
- getStopTimeUpdateOrBuilderList() {
- if (stopTimeUpdateBuilder_ != null) {
- return stopTimeUpdateBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(stopTimeUpdate_);
- }
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder() {
- return getStopTimeUpdateFieldBuilder().addBuilder(
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder(
- int index) {
- return getStopTimeUpdateFieldBuilder().addBuilder(
- index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
- }
- /**
- *
- * Updates to StopTimes for the trip (both future, i.e., predictions, and in
- * some cases, past ones, i.e., those that already happened).
- * The updates must be sorted by stop_sequence, and apply for all the
- * following stops of the trip up to the next specified one.
- * Example 1:
- * For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- * delay of 0 for stop_sequence of the current stop means that the trip is
- * exactly on time.
- * Example 2:
- * For the same trip instance, 3 StopTimeUpdates are provided:
- * - delay of 5 min for stop_sequence 3
- * - delay of 1 min for stop_sequence 8
- * - delay of unspecified duration for stop_sequence 10
- * This will be interpreted as:
- * - stop_sequences 3,4,5,6,7 have delay of 5 min.
- * - stop_sequences 8,9 have delay of 1 min.
- * - stop_sequences 10,... have unknown delay.
- *
- *
- * repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
- */
- public java.util.List
- getStopTimeUpdateBuilderList() {
- return getStopTimeUpdateFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
- getStopTimeUpdateFieldBuilder() {
- if (stopTimeUpdateBuilder_ == null) {
- stopTimeUpdateBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>(
- stopTimeUpdate_,
- ((bitField0_ & 0x00000004) != 0),
- getParentForChildren(),
- isClean());
- stopTimeUpdate_ = null;
- }
- return stopTimeUpdateBuilder_;
- }
-
- private long timestamp_ ;
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * Moment at which the vehicle's real-time progress was measured. In POSIX
- * time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 4;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000008);
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private int delay_ ;
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return Whether the delay field is set.
- */
- @java.lang.Override
- public boolean hasDelay() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return The delay.
- */
- @java.lang.Override
- public int getDelay() {
- return delay_;
- }
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @param value The delay to set.
- * @return This builder for chaining.
- */
- public Builder setDelay(int value) {
-
- delay_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- * The current schedule deviation for the trip. Delay should only be
- * specified when the prediction is given relative to some existing schedule
- * in GTFS.
- * Delay (in seconds) can be positive (meaning that the vehicle is late) or
- * negative (meaning that the vehicle is ahead of schedule). Delay of 0
- * means that the vehicle is exactly on time.
- * Delay information in StopTimeUpdates take precedent of trip-level delay
- * information, such that trip-level delay is only propagated until the next
- * stop along the trip with a StopTimeUpdate delay value specified.
- * Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- * value indicating when the delay value was last updated, in order to
- * evaluate the freshness of the data.
- * NOTE: This field is still experimental, and subject to change. It may be
- * formally adopted in the future.
- *
- *
- * optional int32 delay = 5;
- * @return This builder for chaining.
- */
- public Builder clearDelay() {
- bitField0_ = (bitField0_ & ~0x00000010);
- delay_ = 0;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate)
- }
+ public static final class TripUpdate extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate)
+ TripUpdateOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use TripUpdate.newBuilder() to construct.
+ private TripUpdate(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private TripUpdate() {
+ stopTimeUpdate_ = java.util.Collections.emptyList();
+ }
- // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate)
- private static final com.google.transit.realtime.GtfsRealtime.TripUpdate DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate();
- }
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new TripUpdate();
+ }
- public static com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
+ }
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public TripUpdate 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
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(com.google.transit.realtime.GtfsRealtime.TripUpdate.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
+ }
+
+ public interface StopTimeEventOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeEvent)
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return Whether the delay field is set.
+ */
+ boolean hasDelay();
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return The delay.
+ */
+ int getDelay();
+
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return Whether the time field is set.
+ */
+ boolean hasTime();
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return The time.
+ */
+ long getTime();
+
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return Whether the uncertainty field is set.
+ */
+ boolean hasUncertainty();
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return The uncertainty.
+ */
+ int getUncertainty();
+ }
+ /**
+ *
+ * Timing information for a single predicted event (either arrival or
+ * departure).
+ * Timing consists of delay and/or estimated time, and uncertainty.
+ * - delay should be used when the prediction is given relative to some
+ * existing schedule in GTFS.
+ * - time should be given whether there is a predicted schedule or not. If
+ * both time and delay are specified, time will take precedence
+ * (although normally, time, if given for a scheduled trip, should be
+ * equal to scheduled time in GTFS + delay).
+ * Uncertainty applies equally to both time and delay.
+ * The uncertainty roughly specifies the expected error in true delay (but
+ * note, we don't yet define its precise statistical meaning). It's possible
+ * for the uncertainty to be 0, for example for trains that are driven under
+ * computer timing control.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
+ */
+ public static final class StopTimeEvent
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeEvent)
+ StopTimeEventOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StopTimeEvent.newBuilder() to construct.
+ private StopTimeEvent(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private StopTimeEvent() {
+ }
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StopTimeEvent();
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
+ }
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
+ }
- public interface VehiclePositionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.VehiclePosition)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
+ private int bitField0_;
+ public static final int DELAY_FIELD_NUMBER = 1;
+ private int delay_ = 0;
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return Whether the delay field is set.
+ */
+ @java.lang.Override
+ public boolean hasDelay() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return The delay.
+ */
+ @java.lang.Override
+ public int getDelay() {
+ return delay_;
+ }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- boolean hasTrip();
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @return The trip.
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
+ public static final int TIME_FIELD_NUMBER = 2;
+ private long time_ = 0L;
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return Whether the time field is set.
+ */
+ @java.lang.Override
+ public boolean hasTime() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return The time.
+ */
+ @java.lang.Override
+ public long getTime() {
+ return time_;
+ }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return Whether the vehicle field is set.
- */
- boolean hasVehicle();
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return The vehicle.
- */
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
+ public static final int UNCERTAINTY_FIELD_NUMBER = 3;
+ private int uncertainty_ = 0;
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return Whether the uncertainty field is set.
+ */
+ @java.lang.Override
+ public boolean hasUncertainty() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return The uncertainty.
+ */
+ @java.lang.Override
+ public int getUncertainty() {
+ return uncertainty_;
+ }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return Whether the position field is set.
- */
- boolean hasPosition();
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return The position.
- */
- com.google.transit.realtime.GtfsRealtime.Position getPosition();
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder();
+ 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;
+ }
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return Whether the currentStopSequence field is set.
- */
- boolean hasCurrentStopSequence();
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return The currentStopSequence.
- */
- int getCurrentStopSequence();
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeInt32(1, delay_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeInt64(2, time_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeInt32(3, uncertainty_);
+ }
+ extensionWriter.writeUntil(2000, output);
+ getUnknownFields().writeTo(output);
+ }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return Whether the stopId field is set.
- */
- boolean hasStopId();
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return The stopId.
- */
- java.lang.String getStopId();
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return The bytes for stopId.
- */
- com.google.protobuf.ByteString
- getStopIdBytes();
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1)
+ return size;
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return Whether the currentStatus field is set.
- */
- boolean hasCurrentStatus();
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return The currentStatus.
- */
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus();
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, delay_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, time_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, uncertainty_);
+ }
+ size += extensionsSerializedSize();
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return Whether the timestamp field is set.
- */
- boolean hasTimestamp();
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return The timestamp.
- */
- long getTimestamp();
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) obj;
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return Whether the congestionLevel field is set.
- */
- boolean hasCongestionLevel();
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return The congestionLevel.
- */
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel();
+ if (hasDelay() != other.hasDelay())
+ return false;
+ if (hasDelay()) {
+ if (getDelay() != other.getDelay())
+ return false;
+ }
+ if (hasTime() != other.hasTime())
+ return false;
+ if (hasTime()) {
+ if (getTime() != other.getTime())
+ return false;
+ }
+ if (hasUncertainty() != other.hasUncertainty())
+ return false;
+ if (hasUncertainty()) {
+ if (getUncertainty() != other.getUncertainty())
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields()))
+ return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return Whether the occupancyStatus field is set.
- */
- boolean hasOccupancyStatus();
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return The occupancyStatus.
- */
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus();
- }
- /**
- *
- * Realtime positioning information for a given vehicle.
- *
- *
- * Protobuf type {@code transit_realtime.VehiclePosition}
- */
- public static final class VehiclePosition extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- VehiclePosition> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.VehiclePosition)
- VehiclePositionOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use VehiclePosition.newBuilder() to construct.
- private VehiclePosition(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private VehiclePosition() {
- stopId_ = "";
- currentStatus_ = 2;
- congestionLevel_ = 0;
- occupancyStatus_ = 0;
- }
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasDelay()) {
+ hash = (37 * hash) + DELAY_FIELD_NUMBER;
+ hash = (53 * hash) + getDelay();
+ }
+ if (hasTime()) {
+ hash = (37 * hash) + TIME_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTime());
+ }
+ if (hasUncertainty()) {
+ hash = (37 * hash) + UNCERTAINTY_FIELD_NUMBER;
+ hash = (53 * hash) + getUncertainty();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new VehiclePosition();
- }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(
+ com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent 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.TripUpdate.StopTimeEvent parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
+ extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_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.TripUpdate.StopTimeEvent 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.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
- }
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Timing information for a single predicted event (either arrival or
+ * departure).
+ * Timing consists of delay and/or estimated time, and uncertainty.
+ * - delay should be used when the prediction is given relative to some
+ * existing schedule in GTFS.
+ * - time should be given whether there is a predicted schedule or not. If
+ * both time and delay are specified, time will take precedence
+ * (although normally, time, if given for a scheduled trip, should be
+ * equal to scheduled time in GTFS + delay).
+ * Uncertainty applies equally to both time and delay.
+ * The uncertainty roughly specifies the expected error in true delay (but
+ * note, we don't yet define its precise statistical meaning). It's possible
+ * for the uncertainty to be 0, for example for trains that are driven under
+ * computer timing control.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
+ */
+ public static final class Builder
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
+ implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeEvent)
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
+ }
- /**
- * Protobuf enum {@code transit_realtime.VehiclePosition.VehicleStopStatus}
- */
- public enum VehicleStopStatus
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- * The vehicle is just about to arrive at the stop (on a stop
- * display, the vehicle symbol typically flashes).
- *
- *
- * INCOMING_AT = 0;
- */
- INCOMING_AT(0),
- /**
- *
- * The vehicle is standing at the stop.
- *
- *
- * STOPPED_AT = 1;
- */
- STOPPED_AT(1),
- /**
- *
- * The vehicle has departed and is in transit to the next stop.
- *
- *
- * IN_TRANSIT_TO = 2;
- */
- IN_TRANSIT_TO(2),
- ;
-
- /**
- *
- * The vehicle is just about to arrive at the stop (on a stop
- * display, the vehicle symbol typically flashes).
- *
- *
- * INCOMING_AT = 0;
- */
- public static final int INCOMING_AT_VALUE = 0;
- /**
- *
- * The vehicle is standing at the stop.
- *
- *
- * STOPPED_AT = 1;
- */
- public static final int STOPPED_AT_VALUE = 1;
- /**
- *
- * The vehicle has departed and is in transit to the next stop.
- *
- *
- * IN_TRANSIT_TO = 2;
- */
- public static final int IN_TRANSIT_TO_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 VehicleStopStatus 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 VehicleStopStatus forNumber(int value) {
- switch (value) {
- case 0: return INCOMING_AT;
- case 1: return STOPPED_AT;
- case 2: return IN_TRANSIT_TO;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- VehicleStopStatus> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public VehicleStopStatus findValueByNumber(int number) {
- return VehicleStopStatus.forNumber(number);
- }
- };
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final VehicleStopStatus[] VALUES = values();
-
- public static VehicleStopStatus 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 VehicleStopStatus(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.VehiclePosition.VehicleStopStatus)
- }
+ // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.newBuilder()
+ private Builder() {
- /**
- *
- * Congestion level that is affecting this vehicle.
- *
- *
- * Protobuf enum {@code transit_realtime.VehiclePosition.CongestionLevel}
- */
- public enum CongestionLevel
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNKNOWN_CONGESTION_LEVEL = 0;
- */
- UNKNOWN_CONGESTION_LEVEL(0),
- /**
- * RUNNING_SMOOTHLY = 1;
- */
- RUNNING_SMOOTHLY(1),
- /**
- * STOP_AND_GO = 2;
- */
- STOP_AND_GO(2),
- /**
- * CONGESTION = 3;
- */
- CONGESTION(3),
- /**
- *
- * People leaving their cars.
- *
- *
- * SEVERE_CONGESTION = 4;
- */
- SEVERE_CONGESTION(4),
- ;
-
- /**
- * UNKNOWN_CONGESTION_LEVEL = 0;
- */
- public static final int UNKNOWN_CONGESTION_LEVEL_VALUE = 0;
- /**
- * RUNNING_SMOOTHLY = 1;
- */
- public static final int RUNNING_SMOOTHLY_VALUE = 1;
- /**
- * STOP_AND_GO = 2;
- */
- public static final int STOP_AND_GO_VALUE = 2;
- /**
- * CONGESTION = 3;
- */
- public static final int CONGESTION_VALUE = 3;
- /**
- *
- * People leaving their cars.
- *
- *
- * SEVERE_CONGESTION = 4;
- */
- public static final int SEVERE_CONGESTION_VALUE = 4;
-
-
- 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 CongestionLevel 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 CongestionLevel forNumber(int value) {
- switch (value) {
- case 0: return UNKNOWN_CONGESTION_LEVEL;
- case 1: return RUNNING_SMOOTHLY;
- case 2: return STOP_AND_GO;
- case 3: return CONGESTION;
- case 4: return SEVERE_CONGESTION;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- CongestionLevel> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public CongestionLevel findValueByNumber(int number) {
- return CongestionLevel.forNumber(number);
- }
- };
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDescriptor().getEnumTypes().get(1);
- }
-
- private static final CongestionLevel[] VALUES = values();
-
- public static CongestionLevel 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 CongestionLevel(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.VehiclePosition.CongestionLevel)
- }
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
- /**
- *
- * The degree of passenger occupancy of the vehicle. This field is still
- * experimental, and subject to change. It may be formally adopted in the
- * future.
- *
- *
- * Protobuf enum {@code transit_realtime.VehiclePosition.OccupancyStatus}
- */
- public enum OccupancyStatus
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- * The vehicle is considered empty by most measures, and has few or no
- * passengers onboard, but is still accepting passengers.
- *
- *
- * EMPTY = 0;
- */
- EMPTY(0),
- /**
- *
- * The vehicle has a relatively large percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
- * considered large enough to fall into this category is determined at the
- * discretion of the producer.
- *
- *
- * MANY_SEATS_AVAILABLE = 1;
- */
- MANY_SEATS_AVAILABLE(1),
- /**
- *
- * The vehicle has a relatively small percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
- * considered small enough to fall into this category is determined at the
- * discretion of the feed producer.
- *
- *
- * FEW_SEATS_AVAILABLE = 2;
- */
- FEW_SEATS_AVAILABLE(2),
- /**
- *
- * The vehicle can currently accommodate only standing passengers.
- *
- *
- * STANDING_ROOM_ONLY = 3;
- */
- STANDING_ROOM_ONLY(3),
- /**
- *
- * The vehicle can currently accommodate only standing passengers
- * and has limited space for them.
- *
- *
- * CRUSHED_STANDING_ROOM_ONLY = 4;
- */
- CRUSHED_STANDING_ROOM_ONLY(4),
- /**
- *
- * The vehicle is considered full by most measures, but may still be
- * allowing passengers to board.
- *
- *
- * FULL = 5;
- */
- FULL(5),
- /**
- *
- * The vehicle is not accepting additional passengers.
- *
- *
- * NOT_ACCEPTING_PASSENGERS = 6;
- */
- NOT_ACCEPTING_PASSENGERS(6),
- ;
-
- /**
- *
- * The vehicle is considered empty by most measures, and has few or no
- * passengers onboard, but is still accepting passengers.
- *
- *
- * EMPTY = 0;
- */
- public static final int EMPTY_VALUE = 0;
- /**
- *
- * The vehicle has a relatively large percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
- * considered large enough to fall into this category is determined at the
- * discretion of the producer.
- *
- *
- * MANY_SEATS_AVAILABLE = 1;
- */
- public static final int MANY_SEATS_AVAILABLE_VALUE = 1;
- /**
- *
- * The vehicle has a relatively small percentage of seats available.
- * What percentage of free seats out of the total seats available is to be
- * considered small enough to fall into this category is determined at the
- * discretion of the feed producer.
- *
- *
- * FEW_SEATS_AVAILABLE = 2;
- */
- public static final int FEW_SEATS_AVAILABLE_VALUE = 2;
- /**
- *
- * The vehicle can currently accommodate only standing passengers.
- *
- *
- * STANDING_ROOM_ONLY = 3;
- */
- public static final int STANDING_ROOM_ONLY_VALUE = 3;
- /**
- *
- * The vehicle can currently accommodate only standing passengers
- * and has limited space for them.
- *
- *
- * CRUSHED_STANDING_ROOM_ONLY = 4;
- */
- public static final int CRUSHED_STANDING_ROOM_ONLY_VALUE = 4;
- /**
- *
- * The vehicle is considered full by most measures, but may still be
- * allowing passengers to board.
- *
- *
- * FULL = 5;
- */
- public static final int FULL_VALUE = 5;
- /**
- *
- * The vehicle is not accepting additional passengers.
- *
- *
- * NOT_ACCEPTING_PASSENGERS = 6;
- */
- public static final int NOT_ACCEPTING_PASSENGERS_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 OccupancyStatus 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 OccupancyStatus forNumber(int value) {
- switch (value) {
- case 0: return EMPTY;
- case 1: return MANY_SEATS_AVAILABLE;
- case 2: return FEW_SEATS_AVAILABLE;
- case 3: return STANDING_ROOM_ONLY;
- case 4: return CRUSHED_STANDING_ROOM_ONLY;
- case 5: return FULL;
- case 6: return NOT_ACCEPTING_PASSENGERS;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- OccupancyStatus> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public OccupancyStatus findValueByNumber(int number) {
- return OccupancyStatus.forNumber(number);
- }
- };
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ delay_ = 0;
+ time_ = 0L;
+ uncertainty_ = 0;
+ return this;
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDescriptor().getEnumTypes().get(2);
- }
-
- private static final OccupancyStatus[] VALUES = values();
-
- public static OccupancyStatus 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 OccupancyStatus(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.VehiclePosition.OccupancyStatus)
- }
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
+ }
- private int bitField0_;
- public static final int TRIP_FIELD_NUMBER = 1;
- private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- @java.lang.Override
- public boolean hasTrip() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @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_;
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
- return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance();
+ }
- public static final int VEHICLE_FIELD_NUMBER = 8;
- private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return Whether the vehicle field is set.
- */
- @java.lang.Override
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return The vehicle.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent build() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
- public static final int POSITION_FIELD_NUMBER = 2;
- private com.google.transit.realtime.GtfsRealtime.Position position_;
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return Whether the position field is set.
- */
- @java.lang.Override
- public boolean hasPosition() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return The position.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
- return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
- return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
- public static final int CURRENT_STOP_SEQUENCE_FIELD_NUMBER = 3;
- private int currentStopSequence_ = 0;
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return Whether the currentStopSequence field is set.
- */
- @java.lang.Override
- public boolean hasCurrentStopSequence() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return The currentStopSequence.
- */
- @java.lang.Override
- public int getCurrentStopSequence() {
- return currentStopSequence_;
- }
+ private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.delay_ = delay_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.time_ = time_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.uncertainty_ = uncertainty_;
+ to_bitField0_ |= 0x00000004;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
- public static final int STOP_ID_FIELD_NUMBER = 7;
- @SuppressWarnings("serial")
- private volatile java.lang.Object stopId_ = "";
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return Whether the stopId field is set.
- */
- @java.lang.Override
- public boolean hasStopId() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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;
- }
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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;
- }
- }
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) {
+ return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
- public static final int CURRENT_STATUS_FIELD_NUMBER = 4;
- private int currentStatus_ = 2;
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return Whether the currentStatus field is set.
- */
- @java.lang.Override public boolean hasCurrentStatus() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return The currentStatus.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(currentStatus_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
- }
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance())
+ return this;
+ if (other.hasDelay()) {
+ setDelay(other.getDelay());
+ }
+ if (other.hasTime()) {
+ setTime(other.getTime());
+ }
+ if (other.hasUncertainty()) {
+ setUncertainty(other.getUncertainty());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
- public static final int TIMESTAMP_FIELD_NUMBER = 5;
- private long timestamp_ = 0L;
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000040) != 0);
- }
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ return true;
+ }
- public static final int CONGESTION_LEVEL_FIELD_NUMBER = 6;
- private int congestionLevel_ = 0;
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return Whether the congestionLevel field is set.
- */
- @java.lang.Override public boolean hasCongestionLevel() {
- return ((bitField0_ & 0x00000080) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return The congestionLevel.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(congestionLevel_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL : result;
- }
+ @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 8 : {
+ delay_ = input.readInt32();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16 : {
+ time_ = input.readInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24 : {
+ uncertainty_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ 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 int delay_;
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return Whether the delay field is set.
+ */
+ @java.lang.Override
+ public boolean hasDelay() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return The delay.
+ */
+ @java.lang.Override
+ public int getDelay() {
+ return delay_;
+ }
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @param value The delay to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDelay(int value) {
+
+ delay_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Delay (in seconds) can be positive (meaning that the vehicle is late) or
+ * negative (meaning that the vehicle is ahead of schedule). Delay of 0
+ * means that the vehicle is exactly on time.
+ *
+ *
+ * optional int32 delay = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearDelay() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ delay_ = 0;
+ onChanged();
+ return this;
+ }
- public static final int OCCUPANCY_STATUS_FIELD_NUMBER = 9;
- private int occupancyStatus_ = 0;
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return Whether the occupancyStatus field is set.
- */
- @java.lang.Override public boolean hasOccupancyStatus() {
- return ((bitField0_ & 0x00000100) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return The occupancyStatus.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
- }
+ private long time_;
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return Whether the time field is set.
+ */
+ @java.lang.Override
+ public boolean hasTime() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return The time.
+ */
+ @java.lang.Override
+ public long getTime() {
+ return time_;
+ }
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @param value The time to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTime(long value) {
+
+ time_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Event as absolute time.
+ * In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
+ * UTC).
+ *
+ *
+ * optional int64 time = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearTime() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ time_ = 0L;
+ onChanged();
+ return this;
+ }
- 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 (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasPosition()) {
- if (!getPosition().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
+ private int uncertainty_;
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return Whether the uncertainty field is set.
+ */
+ @java.lang.Override
+ public boolean hasUncertainty() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return The uncertainty.
+ */
+ @java.lang.Override
+ public int getUncertainty() {
+ return uncertainty_;
+ }
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @param value The uncertainty to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUncertainty(int value) {
+
+ uncertainty_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * If uncertainty is omitted, it is interpreted as unknown.
+ * If the prediction is unknown or too uncertain, the delay (or time) field
+ * should be empty. In such case, the uncertainty field is ignored.
+ * To specify a completely certain prediction, set its uncertainty to 0.
+ *
+ *
+ * optional int32 uncertainty = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearUncertainty() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ uncertainty_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getTrip());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(2, getPosition());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeUInt32(3, currentStopSequence_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeEnum(4, currentStatus_);
- }
- if (((bitField0_ & 0x00000040) != 0)) {
- output.writeUInt64(5, timestamp_);
- }
- if (((bitField0_ & 0x00000080) != 0)) {
- output.writeEnum(6, congestionLevel_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 7, stopId_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(8, getVehicle());
- }
- if (((bitField0_ & 0x00000100) != 0)) {
- output.writeEnum(9, occupancyStatus_);
- }
- extensionWriter.writeUntil(2000, output);
- getUnknownFields().writeTo(output);
- }
+ @java.lang.Override
+ public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
- @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, getTrip());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getPosition());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(3, currentStopSequence_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(4, currentStatus_);
- }
- if (((bitField0_ & 0x00000040) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(5, timestamp_);
- }
- if (((bitField0_ & 0x00000080) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(6, congestionLevel_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, stopId_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, getVehicle());
- }
- if (((bitField0_ & 0x00000100) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(9, occupancyStatus_);
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeEvent)
+ }
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.VehiclePosition other = (com.google.transit.realtime.GtfsRealtime.VehiclePosition) obj;
-
- if (hasTrip() != other.hasTrip()) return false;
- if (hasTrip()) {
- if (!getTrip()
- .equals(other.getTrip())) return false;
- }
- if (hasVehicle() != other.hasVehicle()) return false;
- if (hasVehicle()) {
- if (!getVehicle()
- .equals(other.getVehicle())) return false;
- }
- if (hasPosition() != other.hasPosition()) return false;
- if (hasPosition()) {
- if (!getPosition()
- .equals(other.getPosition())) return false;
- }
- if (hasCurrentStopSequence() != other.hasCurrentStopSequence()) return false;
- if (hasCurrentStopSequence()) {
- if (getCurrentStopSequence()
- != other.getCurrentStopSequence()) return false;
- }
- if (hasStopId() != other.hasStopId()) return false;
- if (hasStopId()) {
- if (!getStopId()
- .equals(other.getStopId())) return false;
- }
- if (hasCurrentStatus() != other.hasCurrentStatus()) return false;
- if (hasCurrentStatus()) {
- if (currentStatus_ != other.currentStatus_) return false;
- }
- if (hasTimestamp() != other.hasTimestamp()) return false;
- if (hasTimestamp()) {
- if (getTimestamp()
- != other.getTimestamp()) return false;
- }
- if (hasCongestionLevel() != other.hasCongestionLevel()) return false;
- if (hasCongestionLevel()) {
- if (congestionLevel_ != other.congestionLevel_) return false;
- }
- if (hasOccupancyStatus() != other.hasOccupancyStatus()) return false;
- if (hasOccupancyStatus()) {
- if (occupancyStatus_ != other.occupancyStatus_) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
- }
+ // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeEvent)
+ private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent();
+ }
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasTrip()) {
- hash = (37 * hash) + TRIP_FIELD_NUMBER;
- hash = (53 * hash) + getTrip().hashCode();
- }
- if (hasVehicle()) {
- hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
- hash = (53 * hash) + getVehicle().hashCode();
- }
- if (hasPosition()) {
- hash = (37 * hash) + POSITION_FIELD_NUMBER;
- hash = (53 * hash) + getPosition().hashCode();
- }
- if (hasCurrentStopSequence()) {
- hash = (37 * hash) + CURRENT_STOP_SEQUENCE_FIELD_NUMBER;
- hash = (53 * hash) + getCurrentStopSequence();
- }
- if (hasStopId()) {
- hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
- hash = (53 * hash) + getStopId().hashCode();
- }
- if (hasCurrentStatus()) {
- hash = (37 * hash) + CURRENT_STATUS_FIELD_NUMBER;
- hash = (53 * hash) + currentStatus_;
- }
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- }
- if (hasCongestionLevel()) {
- hash = (37 * hash) + CONGESTION_LEVEL_FIELD_NUMBER;
- hash = (53 * hash) + congestionLevel_;
- }
- if (hasOccupancyStatus()) {
- hash = (37 * hash) + OCCUPANCY_STATUS_FIELD_NUMBER;
- hash = (53 * hash) + occupancyStatus_;
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition 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.VehiclePosition parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition 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.VehiclePosition parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition 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.VehiclePosition parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
+ @java.lang.Deprecated
+ public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public StopTimeEvent 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();
+ }
+ };
- @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.VehiclePosition prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Realtime positioning information for a given vehicle.
- *
- *
- * Protobuf type {@code transit_realtime.VehiclePosition}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.VehiclePosition)
- com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.VehiclePosition.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getTripFieldBuilder();
- getVehicleFieldBuilder();
- getPositionFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- trip_ = null;
- if (tripBuilder_ != null) {
- tripBuilder_.dispose();
- tripBuilder_ = null;
- }
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- position_ = null;
- if (positionBuilder_ != null) {
- positionBuilder_.dispose();
- positionBuilder_ = null;
- }
- currentStopSequence_ = 0;
- stopId_ = "";
- currentStatus_ = 2;
- timestamp_ = 0L;
- congestionLevel_ = 0;
- occupancyStatus_ = 0;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition build() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition buildPartial() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition result = new com.google.transit.realtime.GtfsRealtime.VehiclePosition(this);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehiclePosition result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.trip_ = tripBuilder_ == null
- ? trip_
- : tripBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.vehicle_ = vehicleBuilder_ == null
- ? vehicle_
- : vehicleBuilder_.build();
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.position_ = positionBuilder_ == null
- ? position_
- : positionBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.currentStopSequence_ = currentStopSequence_;
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.stopId_ = stopId_;
- to_bitField0_ |= 0x00000010;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.currentStatus_ = currentStatus_;
- to_bitField0_ |= 0x00000020;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.timestamp_ = timestamp_;
- to_bitField0_ |= 0x00000040;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- result.congestionLevel_ = congestionLevel_;
- to_bitField0_ |= 0x00000080;
- }
- if (((from_bitField0_ & 0x00000100) != 0)) {
- result.occupancyStatus_ = occupancyStatus_;
- to_bitField0_ |= 0x00000100;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, java.util.List> extension,
- Type value) {
- return super.addExtension(extension, value);
- }
- @java.lang.Override
- public Builder clearExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.VehiclePosition, ?> extension) {
- return super.clearExtension(extension);
- }
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition) {
- return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehiclePosition)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehiclePosition other) {
- if (other == com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) return this;
- if (other.hasTrip()) {
- mergeTrip(other.getTrip());
- }
- if (other.hasVehicle()) {
- mergeVehicle(other.getVehicle());
- }
- if (other.hasPosition()) {
- mergePosition(other.getPosition());
- }
- if (other.hasCurrentStopSequence()) {
- setCurrentStopSequence(other.getCurrentStopSequence());
- }
- if (other.hasStopId()) {
- stopId_ = other.stopId_;
- bitField0_ |= 0x00000010;
- onChanged();
- }
- if (other.hasCurrentStatus()) {
- setCurrentStatus(other.getCurrentStatus());
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- if (other.hasCongestionLevel()) {
- setCongestionLevel(other.getCongestionLevel());
- }
- if (other.hasOccupancyStatus()) {
- setOccupancyStatus(other.getOccupancyStatus());
- }
- 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 (hasVehicle()) {
- if (!getVehicle().isInitialized()) {
- return false;
- }
- }
- if (hasPosition()) {
- if (!getPosition().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(
- getTripFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18: {
- input.readMessage(
- getPositionFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 18
- case 24: {
- currentStopSequence_ = input.readUInt32();
- bitField0_ |= 0x00000008;
- break;
- } // case 24
- case 32: {
- int tmpRaw = input.readEnum();
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus tmpValue =
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(tmpRaw);
- if (tmpValue == null) {
- mergeUnknownVarintField(4, tmpRaw);
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface StopTimePropertiesOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeProperties)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return Whether the assignedStopId field is set.
+ */
+ boolean hasAssignedStopId();
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The assignedStopId.
+ */
+ java.lang.String getAssignedStopId();
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The bytes for assignedStopId.
+ */
+ com.google.protobuf.ByteString getAssignedStopIdBytes();
+ }
+ /**
+ *
+ * Realtime update for certain properties defined within GTFS stop_times.txt.
+ * Caution: this message is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripUpdate.StopTimeProperties}
+ */
+ public static final class StopTimeProperties extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeProperties)
+ StopTimePropertiesOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StopTimeProperties.newBuilder() to construct.
+ private StopTimeProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private StopTimeProperties() {
+ assignedStopId_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StopTimeProperties();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int ASSIGNED_STOP_ID_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object assignedStopId_ = "";
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return Whether the assignedStopId field is set.
+ */
+ @java.lang.Override
+ public boolean hasAssignedStopId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The assignedStopId.
+ */
+ @java.lang.Override
+ public java.lang.String getAssignedStopId() {
+ java.lang.Object ref = assignedStopId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
} else {
- currentStatus_ = tmpRaw;
- bitField0_ |= 0x00000020;
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ assignedStopId_ = s;
+ }
+ return s;
}
- break;
- } // case 32
- case 40: {
- timestamp_ = input.readUInt64();
- bitField0_ |= 0x00000040;
- break;
- } // case 40
- case 48: {
- int tmpRaw = input.readEnum();
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel tmpValue =
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(tmpRaw);
- if (tmpValue == null) {
- mergeUnknownVarintField(6, tmpRaw);
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The bytes for assignedStopId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getAssignedStopIdBytes() {
+ java.lang.Object ref = assignedStopId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b = com.google.protobuf.ByteString
+ .copyFromUtf8((java.lang.String) ref);
+ assignedStopId_ = b;
+ return b;
} else {
- congestionLevel_ = tmpRaw;
- bitField0_ |= 0x00000080;
+ return (com.google.protobuf.ByteString) ref;
}
- break;
- } // case 48
- case 58: {
- stopId_ = input.readBytes();
- bitField0_ |= 0x00000010;
- break;
- } // case 58
- case 66: {
- input.readMessage(
- getVehicleFieldBuilder().getBuilder(),
- extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 66
- case 72: {
- 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(9, tmpRaw);
- } else {
- occupancyStatus_ = tmpRaw;
- bitField0_ |= 0x00000100;
- }
- break;
- } // case 72
- 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.TripDescriptor trip_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @return Whether the trip field is set.
- */
- public boolean hasTrip() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- * @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();
- }
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- 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_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder setTrip(
- com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
- if (tripBuilder_ == null) {
- trip_ = builderForValue.build();
- } else {
- tripBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
- if (tripBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- trip_ != null &&
- trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
- getTripBuilder().mergeFrom(value);
- } else {
- trip_ = value;
- }
- } else {
- tripBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- public Builder clearTrip() {
- bitField0_ = (bitField0_ & ~0x00000001);
- trip_ = null;
- if (tripBuilder_ != null) {
- tripBuilder_.dispose();
- tripBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getTripFieldBuilder().getBuilder();
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- 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_;
- }
- }
- /**
- *
- * The Trip that this vehicle is serving.
- * Can be empty or partial if the vehicle can not be identified with a given
- * trip instance.
- *
- *
- * optional .transit_realtime.TripDescriptor trip = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
- getTripFieldBuilder() {
- if (tripBuilder_ == null) {
- tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- 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 com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return Whether the vehicle field is set.
- */
- public boolean hasVehicle() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- * @return The vehicle.
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
- if (vehicleBuilder_ == null) {
- return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- } else {
- return vehicleBuilder_.getMessage();
- }
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
- if (vehicleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- vehicle_ = value;
- } else {
- vehicleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public Builder setVehicle(
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
- if (vehicleBuilder_ == null) {
- vehicle_ = builderForValue.build();
- } else {
- vehicleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
- if (vehicleBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0) &&
- vehicle_ != null &&
- vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
- getVehicleBuilder().mergeFrom(value);
- } else {
- vehicle_ = value;
- }
- } else {
- vehicleBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public Builder clearVehicle() {
- bitField0_ = (bitField0_ & ~0x00000002);
- vehicle_ = null;
- if (vehicleBuilder_ != null) {
- vehicleBuilder_.dispose();
- vehicleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getVehicleFieldBuilder().getBuilder();
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
- if (vehicleBuilder_ != null) {
- return vehicleBuilder_.getMessageOrBuilder();
- } else {
- return vehicle_ == null ?
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
- }
- }
- /**
- *
- * Additional information on the vehicle that is serving this trip.
- *
- *
- * optional .transit_realtime.VehicleDescriptor vehicle = 8;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
- getVehicleFieldBuilder() {
- if (vehicleBuilder_ == null) {
- vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
- getVehicle(),
- getParentForChildren(),
- isClean());
- vehicle_ = null;
- }
- return vehicleBuilder_;
- }
-
- private com.google.transit.realtime.GtfsRealtime.Position position_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder> positionBuilder_;
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return Whether the position field is set.
- */
- public boolean hasPosition() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- * @return The position.
- */
- public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
- if (positionBuilder_ == null) {
- return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
- } else {
- return positionBuilder_.getMessage();
- }
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public Builder setPosition(com.google.transit.realtime.GtfsRealtime.Position value) {
- if (positionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- position_ = value;
- } else {
- positionBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public Builder setPosition(
- com.google.transit.realtime.GtfsRealtime.Position.Builder builderForValue) {
- if (positionBuilder_ == null) {
- position_ = builderForValue.build();
- } else {
- positionBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public Builder mergePosition(com.google.transit.realtime.GtfsRealtime.Position value) {
- if (positionBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0) &&
- position_ != null &&
- position_ != com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) {
- getPositionBuilder().mergeFrom(value);
- } else {
- position_ = value;
- }
- } else {
- positionBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public Builder clearPosition() {
- bitField0_ = (bitField0_ & ~0x00000004);
- position_ = null;
- if (positionBuilder_ != null) {
- positionBuilder_.dispose();
- positionBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.Position.Builder getPositionBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getPositionFieldBuilder().getBuilder();
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
- if (positionBuilder_ != null) {
- return positionBuilder_.getMessageOrBuilder();
- } else {
- return position_ == null ?
- com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
- }
- }
- /**
- *
- * Current position of this vehicle.
- *
- *
- * optional .transit_realtime.Position position = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>
- getPositionFieldBuilder() {
- if (positionBuilder_ == null) {
- positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>(
- getPosition(),
- getParentForChildren(),
- isClean());
- position_ = null;
- }
- return positionBuilder_;
- }
-
- private int currentStopSequence_ ;
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return Whether the currentStopSequence field is set.
- */
- @java.lang.Override
- public boolean hasCurrentStopSequence() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return The currentStopSequence.
- */
- @java.lang.Override
- public int getCurrentStopSequence() {
- return currentStopSequence_;
- }
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @param value The currentStopSequence to set.
- * @return This builder for chaining.
- */
- public Builder setCurrentStopSequence(int value) {
-
- currentStopSequence_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- * The stop sequence index of the current stop. The meaning of
- * current_stop_sequence (i.e., the stop that it refers to) is determined by
- * current_status.
- * If current_status is missing IN_TRANSIT_TO is assumed.
- *
- *
- * optional uint32 current_stop_sequence = 3;
- * @return This builder for chaining.
- */
- public Builder clearCurrentStopSequence() {
- bitField0_ = (bitField0_ & ~0x00000008);
- currentStopSequence_ = 0;
- onChanged();
- return this;
- }
-
- private java.lang.Object stopId_ = "";
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return Whether the stopId field is set.
- */
- public boolean hasStopId() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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;
- }
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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;
- }
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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;
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @return This builder for chaining.
- */
- public Builder clearStopId() {
- stopId_ = getDefaultInstance().getStopId();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- /**
- *
- * Identifies the current stop. The value must be the same as in stops.txt in
- * the corresponding GTFS feed.
- *
- *
- * optional string stop_id = 7;
- * @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 currentStatus_ = 2;
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return Whether the currentStatus field is set.
- */
- @java.lang.Override public boolean hasCurrentStatus() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return The currentStatus.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(currentStatus_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
- }
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @param value The currentStatus to set.
- * @return This builder for chaining.
- */
- public Builder setCurrentStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000020;
- currentStatus_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- * The exact status of the vehicle with respect to the current stop.
- * Ignored if current_stop_sequence is missing.
- *
- *
- * optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
- * @return This builder for chaining.
- */
- public Builder clearCurrentStatus() {
- bitField0_ = (bitField0_ & ~0x00000020);
- currentStatus_ = 2;
- onChanged();
- return this;
- }
-
- private long timestamp_ ;
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return Whether the timestamp field is set.
- */
- @java.lang.Override
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000040) != 0);
- }
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return The timestamp.
- */
- @java.lang.Override
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- * Moment at which the vehicle's position was measured. In POSIX time
- * (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- *
- *
- * optional uint64 timestamp = 5;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000040);
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private int congestionLevel_ = 0;
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return Whether the congestionLevel field is set.
- */
- @java.lang.Override public boolean hasCongestionLevel() {
- return ((bitField0_ & 0x00000080) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return The congestionLevel.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(congestionLevel_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL : result;
- }
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @param value The congestionLevel to set.
- * @return This builder for chaining.
- */
- public Builder setCongestionLevel(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000080;
- congestionLevel_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
- * @return This builder for chaining.
- */
- public Builder clearCongestionLevel() {
- bitField0_ = (bitField0_ & ~0x00000080);
- congestionLevel_ = 0;
- onChanged();
- return this;
- }
-
- private int occupancyStatus_ = 0;
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return Whether the occupancyStatus field is set.
- */
- @java.lang.Override public boolean hasOccupancyStatus() {
- return ((bitField0_ & 0x00000100) != 0);
- }
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return The occupancyStatus.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
- com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
- }
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @param value The occupancyStatus to set.
- * @return This builder for chaining.
- */
- public Builder setOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000100;
- occupancyStatus_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
- * @return This builder for chaining.
- */
- public Builder clearOccupancyStatus() {
- bitField0_ = (bitField0_ & ~0x00000100);
- occupancyStatus_ = 0;
- onChanged();
- return this;
- }
- @java.lang.Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:transit_realtime.VehiclePosition)
- }
+ }
- // @@protoc_insertion_point(class_scope:transit_realtime.VehiclePosition)
- private static final com.google.transit.realtime.GtfsRealtime.VehiclePosition DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehiclePosition();
- }
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1)
+ return true;
+ if (isInitialized == 0)
+ return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
- public static com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assignedStopId_);
+ }
+ getUnknownFields().writeTo(output);
+ }
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public VehiclePosition 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 int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1)
+ return size;
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assignedStopId_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties)) {
+ return super.equals(obj);
+ }
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties) obj;
- }
+ if (hasAssignedStopId() != other.hasAssignedStopId())
+ return false;
+ if (hasAssignedStopId()) {
+ if (!getAssignedStopId().equals(other.getAssignedStopId()))
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields()))
+ return false;
+ return true;
+ }
- public interface AlertOrBuilder extends
- // @@protoc_insertion_point(interface_extends:transit_realtime.Alert)
- com.google.protobuf.GeneratedMessageV3.
- ExtendableMessageOrBuilder {
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasAssignedStopId()) {
+ hash = (37 * hash) + ASSIGNED_STOP_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getAssignedStopId().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- java.util.List
- getActivePeriodList();
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index);
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- int getActivePeriodCount();
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
- getActivePeriodOrBuilderList();
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
- int index);
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(
+ com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties 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.TripUpdate.StopTimeProperties parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
+ extensionRegistry);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+ }
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- java.util.List
- getInformedEntityList();
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index);
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- int getInformedEntityCount();
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
- getInformedEntityOrBuilderList();
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
- int index);
+ @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.TripUpdate.StopTimeProperties prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
- /**
- * optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
- * @return Whether the cause field is set.
- */
- boolean hasCause();
- /**
- * optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
- * @return The cause.
- */
- com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause();
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Realtime update for certain properties defined within GTFS stop_times.txt.
+ * Caution: this message is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripUpdate.StopTimeProperties}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeProperties)
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
+ }
- /**
- * optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
- * @return Whether the effect field is set.
- */
- boolean hasEffect();
- /**
- * optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
- * @return The effect.
- */
- com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect();
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.Builder.class);
+ }
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- * @return Whether the url field is set.
- */
- boolean hasUrl();
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- * @return The url.
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl();
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder();
+ // Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.newBuilder()
+ private Builder() {
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- * @return Whether the headerText field is set.
- */
- boolean hasHeaderText();
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- * @return The headerText.
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText();
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder();
+ }
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- * @return Whether the descriptionText field is set.
- */
- boolean hasDescriptionText();
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- * @return The descriptionText.
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText();
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder();
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- * @return Whether the ttsHeaderText field is set.
- */
- boolean hasTtsHeaderText();
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- * @return The ttsHeaderText.
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsHeaderText();
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsHeaderTextOrBuilder();
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ assignedStopId_ = "";
+ return this;
+ }
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- * @return Whether the ttsDescriptionText field is set.
- */
- boolean hasTtsDescriptionText();
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- * @return The ttsDescriptionText.
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsDescriptionText();
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- */
- com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsDescriptionTextOrBuilder();
-
- /**
- * optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
- * @return Whether the severityLevel field is set.
- */
- boolean hasSeverityLevel();
- /**
- * optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
- * @return The severityLevel.
- */
- com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel();
- }
- /**
- *
- * An alert, indicating some sort of incident in the public transit network.
- *
- *
- * Protobuf type {@code transit_realtime.Alert}
- */
- public static final class Alert extends
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
- Alert> implements
- // @@protoc_insertion_point(message_implements:transit_realtime.Alert)
- AlertOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Alert.newBuilder() to construct.
- private Alert(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
- super(builder);
- }
- private Alert() {
- activePeriod_ = java.util.Collections.emptyList();
- informedEntity_ = java.util.Collections.emptyList();
- cause_ = 1;
- effect_ = 8;
- severityLevel_ = 1;
- }
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeProperties_descriptor;
+ }
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(
- UnusedPrivateParameter unused) {
- return new Alert();
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstanceForType() {
+ return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties.getDefaultInstance();
+ }
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties build() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties buildPartial() {
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
- /**
- *
- * Cause of this alert.
- *
- *
- * Protobuf enum {@code transit_realtime.Alert.Cause}
- */
- public enum Cause
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNKNOWN_CAUSE = 1;
- */
- UNKNOWN_CAUSE(1),
- /**
- *
- * Not machine-representable.
- *
- *
- * OTHER_CAUSE = 2;
- */
- OTHER_CAUSE(2),
- /**
- * TECHNICAL_PROBLEM = 3;
- */
- TECHNICAL_PROBLEM(3),
- /**
- *
- * Public transit agency employees stopped working.
- *
- *
- * STRIKE = 4;
- */
- STRIKE(4),
- /**
- *
- * People are blocking the streets.
- *
- *
- * DEMONSTRATION = 5;
- */
- DEMONSTRATION(5),
- /**
- * ACCIDENT = 6;
- */
- ACCIDENT(6),
- /**
- * HOLIDAY = 7;
- */
- HOLIDAY(7),
- /**
- * WEATHER = 8;
- */
- WEATHER(8),
- /**
- * MAINTENANCE = 9;
- */
- MAINTENANCE(9),
- /**
- * CONSTRUCTION = 10;
- */
- CONSTRUCTION(10),
- /**
- * POLICE_ACTIVITY = 11;
- */
- POLICE_ACTIVITY(11),
- /**
- * MEDICAL_EMERGENCY = 12;
- */
- MEDICAL_EMERGENCY(12),
- ;
-
- /**
- * UNKNOWN_CAUSE = 1;
- */
- public static final int UNKNOWN_CAUSE_VALUE = 1;
- /**
- *
- * Not machine-representable.
- *
- *
- * OTHER_CAUSE = 2;
- */
- public static final int OTHER_CAUSE_VALUE = 2;
- /**
- * TECHNICAL_PROBLEM = 3;
- */
- public static final int TECHNICAL_PROBLEM_VALUE = 3;
- /**
- *
- * Public transit agency employees stopped working.
- *
- *
- * STRIKE = 4;
- */
- public static final int STRIKE_VALUE = 4;
- /**
- *
- * People are blocking the streets.
- *
- *
- * DEMONSTRATION = 5;
- */
- public static final int DEMONSTRATION_VALUE = 5;
- /**
- * ACCIDENT = 6;
- */
- public static final int ACCIDENT_VALUE = 6;
- /**
- * HOLIDAY = 7;
- */
- public static final int HOLIDAY_VALUE = 7;
- /**
- * WEATHER = 8;
- */
- public static final int WEATHER_VALUE = 8;
- /**
- * MAINTENANCE = 9;
- */
- public static final int MAINTENANCE_VALUE = 9;
- /**
- * CONSTRUCTION = 10;
- */
- public static final int CONSTRUCTION_VALUE = 10;
- /**
- * POLICE_ACTIVITY = 11;
- */
- public static final int POLICE_ACTIVITY_VALUE = 11;
- /**
- * MEDICAL_EMERGENCY = 12;
- */
- public static final int MEDICAL_EMERGENCY_VALUE = 12;
-
-
- 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 Cause 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 Cause forNumber(int value) {
- switch (value) {
- case 1: return UNKNOWN_CAUSE;
- case 2: return OTHER_CAUSE;
- case 3: return TECHNICAL_PROBLEM;
- case 4: return STRIKE;
- case 5: return DEMONSTRATION;
- case 6: return ACCIDENT;
- case 7: return HOLIDAY;
- case 8: return WEATHER;
- case 9: return MAINTENANCE;
- case 10: return CONSTRUCTION;
- case 11: return POLICE_ACTIVITY;
- case 12: return MEDICAL_EMERGENCY;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Cause> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Cause findValueByNumber(int number) {
- return Cause.forNumber(number);
- }
- };
+ private void buildPartial0(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.assignedStopId_ = assignedStopId_;
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Cause[] VALUES = values();
-
- public static Cause 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 Cause(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.Alert.Cause)
- }
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties) {
+ return mergeFrom(
+ (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
- /**
- *
- * What is the effect of this problem on the affected entity.
- *
- *
- * Protobuf enum {@code transit_realtime.Alert.Effect}
- */
- public enum Effect
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * NO_SERVICE = 1;
- */
- NO_SERVICE(1),
- /**
- * REDUCED_SERVICE = 2;
- */
- REDUCED_SERVICE(2),
- /**
- *
- * We don't care about INsignificant delays: they are hard to detect, have
- * little impact on the user, and would clutter the results as they are too
- * frequent.
- *
- *
- * SIGNIFICANT_DELAYS = 3;
- */
- SIGNIFICANT_DELAYS(3),
- /**
- * DETOUR = 4;
- */
- DETOUR(4),
- /**
- * ADDITIONAL_SERVICE = 5;
- */
- ADDITIONAL_SERVICE(5),
- /**
- * MODIFIED_SERVICE = 6;
- */
- MODIFIED_SERVICE(6),
- /**
- * OTHER_EFFECT = 7;
- */
- OTHER_EFFECT(7),
- /**
- * UNKNOWN_EFFECT = 8;
- */
- UNKNOWN_EFFECT(8),
- /**
- * STOP_MOVED = 9;
- */
- STOP_MOVED(9),
- /**
- * NO_EFFECT = 10;
- */
- NO_EFFECT(10),
- ;
-
- /**
- * NO_SERVICE = 1;
- */
- public static final int NO_SERVICE_VALUE = 1;
- /**
- * REDUCED_SERVICE = 2;
- */
- public static final int REDUCED_SERVICE_VALUE = 2;
- /**
- *
- * We don't care about INsignificant delays: they are hard to detect, have
- * little impact on the user, and would clutter the results as they are too
- * frequent.
- *
- *
- * SIGNIFICANT_DELAYS = 3;
- */
- public static final int SIGNIFICANT_DELAYS_VALUE = 3;
- /**
- * DETOUR = 4;
- */
- public static final int DETOUR_VALUE = 4;
- /**
- * ADDITIONAL_SERVICE = 5;
- */
- public static final int ADDITIONAL_SERVICE_VALUE = 5;
- /**
- * MODIFIED_SERVICE = 6;
- */
- public static final int MODIFIED_SERVICE_VALUE = 6;
- /**
- * OTHER_EFFECT = 7;
- */
- public static final int OTHER_EFFECT_VALUE = 7;
- /**
- * UNKNOWN_EFFECT = 8;
- */
- public static final int UNKNOWN_EFFECT_VALUE = 8;
- /**
- * STOP_MOVED = 9;
- */
- public static final int STOP_MOVED_VALUE = 9;
- /**
- * NO_EFFECT = 10;
- */
- public static final int NO_EFFECT_VALUE = 10;
-
-
- 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 Effect 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 Effect forNumber(int value) {
- switch (value) {
- case 1: return NO_SERVICE;
- case 2: return REDUCED_SERVICE;
- case 3: return SIGNIFICANT_DELAYS;
- case 4: return DETOUR;
- case 5: return ADDITIONAL_SERVICE;
- case 6: return MODIFIED_SERVICE;
- case 7: return OTHER_EFFECT;
- case 8: return UNKNOWN_EFFECT;
- case 9: return STOP_MOVED;
- case 10: return NO_EFFECT;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- Effect> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public Effect findValueByNumber(int number) {
- return Effect.forNumber(number);
- }
- };
+ public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties other) {
+ if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties
+ .getDefaultInstance())
+ return this;
+ if (other.hasAssignedStopId()) {
+ assignedStopId_ = other.assignedStopId_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(1);
- }
-
- private static final Effect[] VALUES = values();
-
- public static Effect 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 Effect(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.Alert.Effect)
- }
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
- /**
- *
- * Severity of this alert.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * Protobuf enum {@code transit_realtime.Alert.SeverityLevel}
- */
- public enum SeverityLevel
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNKNOWN_SEVERITY = 1;
- */
- UNKNOWN_SEVERITY(1),
- /**
- * INFO = 2;
- */
- INFO(2),
- /**
- * WARNING = 3;
- */
- WARNING(3),
- /**
- * SEVERE = 4;
- */
- SEVERE(4),
- ;
-
- /**
- * UNKNOWN_SEVERITY = 1;
- */
- public static final int UNKNOWN_SEVERITY_VALUE = 1;
- /**
- * INFO = 2;
- */
- public static final int INFO_VALUE = 2;
- /**
- * WARNING = 3;
- */
- public static final int WARNING_VALUE = 3;
- /**
- * SEVERE = 4;
- */
- public static final int SEVERE_VALUE = 4;
-
-
- 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 SeverityLevel 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 SeverityLevel forNumber(int value) {
- switch (value) {
- case 1: return UNKNOWN_SEVERITY;
- case 2: return INFO;
- case 3: return WARNING;
- case 4: return SEVERE;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- SeverityLevel> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public SeverityLevel findValueByNumber(int number) {
- return SeverityLevel.forNumber(number);
- }
- };
+ @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 : {
+ assignedStopId_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ 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.lang.Object assignedStopId_ = "";
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return Whether the assignedStopId field is set.
+ */
+ public boolean hasAssignedStopId() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The assignedStopId.
+ */
+ public java.lang.String getAssignedStopId() {
+ java.lang.Object ref = assignedStopId_;
+ 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()) {
+ assignedStopId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return The bytes for assignedStopId.
+ */
+ public com.google.protobuf.ByteString getAssignedStopIdBytes() {
+ java.lang.Object ref = assignedStopId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b = com.google.protobuf.ByteString
+ .copyFromUtf8((java.lang.String) ref);
+ assignedStopId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @param value The assignedStopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssignedStopId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ assignedStopId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearAssignedStopId() {
+ assignedStopId_ = getDefaultInstance().getAssignedStopId();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Supports real-time stop assignments. Refers to a stop_id defined in the
+ * GTFS stops.txt.
+ * The new assigned_stop_id should not result in a significantly different
+ * trip experience for the end user than the stop_id defined in GTFS
+ * stop_times.txt. In other words, the end user should not view this new
+ * stop_id as an "unusual change" if the new stop was presented within an
+ * app without any additional context. For example, this field is intended
+ * to be used for platform assignments by using a stop_id that belongs to
+ * the same station as the stop originally defined in GTFS stop_times.txt.
+ * To assign a stop without providing any real-time arrival or departure
+ * predictions, populate this field and set
+ * StopTimeUpdate.schedule_relationship = NO_DATA.
+ * If this field is populated, StopTimeUpdate.stop_sequence must be
+ * populated and StopTimeUpdate.stop_id should not be populated. Stop
+ * assignments should be reflected in other GTFS-realtime fields as well
+ * (e.g., VehiclePosition.stop_id).
+ * Caution: this field is still experimental, and subject to change. It
+ * may be formally adopted in the future.
+ *
+ *
+ * optional string assigned_stop_id = 1;
+ * @param value The bytes for assignedStopId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssignedStopIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ assignedStopId_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(2);
- }
-
- private static final SeverityLevel[] VALUES = values();
-
- public static SeverityLevel 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 SeverityLevel(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:transit_realtime.Alert.SeverityLevel)
- }
+ @java.lang.Override
+ public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
- private int bitField0_;
- public static final int ACTIVE_PERIOD_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private java.util.List activePeriod_;
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- @java.lang.Override
- public java.util.List getActivePeriodList() {
- return activePeriod_;
- }
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
- getActivePeriodOrBuilderList() {
- return activePeriod_;
- }
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- @java.lang.Override
- public int getActivePeriodCount() {
- return activePeriod_.size();
- }
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index) {
- return activePeriod_.get(index);
- }
- /**
- *
- * Time when the alert should be shown to the user. If missing, the
- * alert will be shown as long as it appears in the feed.
- * If multiple ranges are given, the alert will be shown during all of them.
- *
- *
- * repeated .transit_realtime.TimeRange active_period = 1;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
- int index) {
- return activePeriod_.get(index);
- }
+ // @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeProperties)
+ }
- public static final int INFORMED_ENTITY_FIELD_NUMBER = 5;
- @SuppressWarnings("serial")
- private java.util.List informedEntity_;
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- @java.lang.Override
- public java.util.List getInformedEntityList() {
- return informedEntity_;
- }
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- @java.lang.Override
- public java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
- getInformedEntityOrBuilderList() {
- return informedEntity_;
- }
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- @java.lang.Override
- public int getInformedEntityCount() {
- return informedEntity_.size();
- }
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index) {
- return informedEntity_.get(index);
- }
- /**
- *
- * Entities whose users we should notify of this alert.
- *
- *
- * repeated .transit_realtime.EntitySelector informed_entity = 5;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
- int index) {
- return informedEntity_.get(index);
- }
+ // @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeProperties)
+ private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties();
+ }
- public static final int CAUSE_FIELD_NUMBER = 6;
- private int cause_ = 1;
- /**
- * optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
- * @return Whether the cause field is set.
- */
- @java.lang.Override public boolean hasCause() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
- * @return The cause.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause() {
- com.google.transit.realtime.GtfsRealtime.Alert.Cause result = com.google.transit.realtime.GtfsRealtime.Alert.Cause.forNumber(cause_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Cause.UNKNOWN_CAUSE : result;
- }
+ public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
- public static final int EFFECT_FIELD_NUMBER = 7;
- private int effect_ = 8;
- /**
- * optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
- * @return Whether the effect field is set.
- */
- @java.lang.Override public boolean hasEffect() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
- * @return The effect.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect() {
- com.google.transit.realtime.GtfsRealtime.Alert.Effect result = com.google.transit.realtime.GtfsRealtime.Alert.Effect.forNumber(effect_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Effect.UNKNOWN_EFFECT : result;
- }
+ @java.lang.Deprecated
+ public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public StopTimeProperties 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 final int URL_FIELD_NUMBER = 8;
- private com.google.transit.realtime.GtfsRealtime.TranslatedString url_;
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- * @return Whether the url field is set.
- */
- @java.lang.Override
- public boolean hasUrl() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- * @return The url.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl() {
- return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
- }
- /**
- *
- * The URL which provides additional information about the alert.
- *
- *
- * optional .transit_realtime.TranslatedString url = 8;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder() {
- return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
- }
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
- public static final int HEADER_TEXT_FIELD_NUMBER = 10;
- private com.google.transit.realtime.GtfsRealtime.TranslatedString headerText_;
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- * @return Whether the headerText field is set.
- */
- @java.lang.Override
- public boolean hasHeaderText() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- * @return The headerText.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText() {
- return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
- }
- /**
- *
- * Alert header. Contains a short summary of the alert text as plain-text.
- *
- *
- * optional .transit_realtime.TranslatedString header_text = 10;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder() {
- return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
- }
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
- public static final int DESCRIPTION_TEXT_FIELD_NUMBER = 11;
- private com.google.transit.realtime.GtfsRealtime.TranslatedString descriptionText_;
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- * @return Whether the descriptionText field is set.
- */
- @java.lang.Override
- public boolean hasDescriptionText() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- * @return The descriptionText.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText() {
- return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
- }
- /**
- *
- * Full description for the alert as plain-text. The information in the
- * description should add to the information of the header.
- *
- *
- * optional .transit_realtime.TranslatedString description_text = 11;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder() {
- return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
- }
+ @java.lang.Override
+ public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
- public static final int TTS_HEADER_TEXT_FIELD_NUMBER = 12;
- private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsHeaderText_;
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- * @return Whether the ttsHeaderText field is set.
- */
- @java.lang.Override
- public boolean hasTtsHeaderText() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- * @return The ttsHeaderText.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsHeaderText() {
- return ttsHeaderText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
- }
- /**
- *
- * Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_header_text = 12;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsHeaderTextOrBuilder() {
- return ttsHeaderText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
- }
+ }
- public static final int TTS_DESCRIPTION_TEXT_FIELD_NUMBER = 13;
- private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsDescriptionText_;
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- * @return Whether the ttsDescriptionText field is set.
- */
- @java.lang.Override
- public boolean hasTtsDescriptionText() {
- return ((bitField0_ & 0x00000040) != 0);
- }
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- * @return The ttsDescriptionText.
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsDescriptionText() {
- return ttsDescriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
- }
- /**
- *
- * Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- * This field is still experimental, and subject to change. It may be formally adopted in the future.
- *
- *
- * optional .transit_realtime.TranslatedString tts_description_text = 13;
- */
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsDescriptionTextOrBuilder() {
- return ttsDescriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
- }
+ public interface StopTimeUpdateOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeUpdate)
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder {
+
+ /**
+ *
+ * Must be the same as in stop_times.txt in the corresponding GTFS feed.
+ *
+ *
+ * optional uint32 stop_sequence = 1;
+ * @return Whether the stopSequence field is set.
+ */
+ boolean hasStopSequence();
+ /**
+ *
+ * Must be the same as in stop_times.txt in the corresponding GTFS feed.
+ *
+ *
+ * optional uint32 stop_sequence = 1;
+ * @return The stopSequence.
+ */
+ int getStopSequence();
+
+ /**
+ *
+ * Must be the same as in stops.txt in the corresponding GTFS feed.
+ *
+ *
+ * optional string stop_id = 4;
+ * @return Whether the stopId field is set.
+ */
+ boolean hasStopId();
+ /**
+ *
+ * Must be the same as in stops.txt in the corresponding GTFS feed.
+ *
+ *
+ * optional string stop_id = 4;
+ * @return The stopId.
+ */
+ java.lang.String getStopId();
+ /**
+ *
+ * Must be the same as in stops.txt in the corresponding GTFS feed.
+ *
+ *
+ * optional string stop_id = 4;
+ * @return The bytes for stopId.
+ */
+ com.google.protobuf.ByteString getStopIdBytes();
+
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * @return Whether the arrival field is set.
+ */
+ boolean hasArrival();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ * @return The arrival.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder();
+
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
+ * @return Whether the departure field is set.
+ */
+ boolean hasDeparture();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
+ * @return The departure.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder();
+
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
+ * @return Whether the scheduleRelationship field is set.
+ */
+ boolean hasScheduleRelationship();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
+ * @return The scheduleRelationship.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship();
+
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ * @return Whether the stopTimeProperties field is set.
+ */
+ boolean hasStopTimeProperties();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ * @return The stopTimeProperties.
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeProperties getStopTimeProperties();
+ /**
+ * optional .transit_realtime.TripUpdate.StopTimeProperties stop_time_properties = 6;
+ */
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder();
+ }
+ /**
+ *
+ * Realtime update for arrival and/or departure events for a given stop on a
+ * trip. Updates can be supplied for both past and future events.
+ * The producer is allowed, although not required, to drop past events.
+ *
+ *
+ * Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate}
+ */
+ public static final class StopTimeUpdate
+ extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage
+ implements
+ // @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeUpdate)
+ StopTimeUpdateOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StopTimeUpdate.newBuilder() to construct.
+ private StopTimeUpdate(
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private StopTimeUpdate() {
+ stopId_ = "";
+ scheduleRelationship_ = 0;
+ }
- public static final int SEVERITY_LEVEL_FIELD_NUMBER = 14;
- private int severityLevel_ = 1;
- /**
- * optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
- * @return Whether the severityLevel field is set.
- */
- @java.lang.Override public boolean hasSeverityLevel() {
- return ((bitField0_ & 0x00000080) != 0);
- }
- /**
- * optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
- * @return The severityLevel.
- */
- @java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel() {
- com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel result = com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.forNumber(severityLevel_);
- return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.UNKNOWN_SEVERITY : result;
- }
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StopTimeUpdate();
+ }
- 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 < getActivePeriodCount(); i++) {
- if (!getActivePeriod(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getInformedEntityCount(); i++) {
- if (!getInformedEntity(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasUrl()) {
- if (!getUrl().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasHeaderText()) {
- if (!getHeaderText().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasDescriptionText()) {
- if (!getDescriptionText().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasTtsHeaderText()) {
- if (!getTtsHeaderText().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (hasTtsDescriptionText()) {
- if (!getTtsDescriptionText().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- if (!extensionsAreInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
+ }
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- com.google.protobuf.GeneratedMessageV3
- .ExtendableMessage.ExtensionWriter
- extensionWriter = newExtensionWriter();
- for (int i = 0; i < activePeriod_.size(); i++) {
- output.writeMessage(1, activePeriod_.get(i));
- }
- for (int i = 0; i < informedEntity_.size(); i++) {
- output.writeMessage(5, informedEntity_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeEnum(6, cause_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeEnum(7, effect_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(8, getUrl());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeMessage(10, getHeaderText());
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeMessage(11, getDescriptionText());
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeMessage(12, getTtsHeaderText());
- }
- if (((bitField0_ & 0x00000040) != 0)) {
- output.writeMessage(13, getTtsDescriptionText());
- }
- if (((bitField0_ & 0x00000080) != 0)) {
- output.writeEnum(14, severityLevel_);
- }
- extensionWriter.writeUntil(2000, output);
- getUnknownFields().writeTo(output);
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+ return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.class,
+ com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder.class);
+ }
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < activePeriod_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, activePeriod_.get(i));
- }
- for (int i = 0; i < informedEntity_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, informedEntity_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(6, cause_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(7, effect_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, getUrl());
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(10, getHeaderText());
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(11, getDescriptionText());
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(12, getTtsHeaderText());
- }
- if (((bitField0_ & 0x00000040) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(13, getTtsDescriptionText());
- }
- if (((bitField0_ & 0x00000080) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(14, severityLevel_);
- }
- size += extensionsSerializedSize();
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
+ /**
+ *
+ * The relation between this StopTime and the static schedule.
+ *
+ *
+ * Protobuf enum {@code transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
+ */
+ public enum ScheduleRelationship implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * The vehicle is proceeding in accordance with its static schedule of
+ * stops, although not necessarily according to the times of the schedule.
+ * At least one of arrival and departure must be provided. If the schedule
+ * for this stop contains both arrival and departure times then so must
+ * this update.
+ *
+ *
+ * SCHEDULED = 0;
+ */
+ SCHEDULED(0),
+ /**
+ *
+ * The stop is skipped, i.e., the vehicle will not stop at this stop.
+ * Arrival and departure are optional.
+ *
+ *
+ * SKIPPED = 1;
+ */
+ 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.
+ * Neither arrival nor departure should be supplied.
+ *
+ *
+ * NO_DATA = 2;
+ */
+ NO_DATA(2),;
+
+ /**
+ *
+ * The vehicle is proceeding in accordance with its static schedule of
+ * stops, although not necessarily according to the times of the schedule.
+ * At least one of arrival and departure must be provided. If the schedule
+ * for this stop contains both arrival and departure times then so must
+ * this update.
+ *
+ *
+ * SCHEDULED = 0;
+ */
+ public static final int SCHEDULED_VALUE = 0;
+ /**
+ *
+ * The stop is skipped, i.e., the vehicle will not stop at this stop.
+ * Arrival and departure are optional.
+ *
+ *
+ * SKIPPED = 1;
+ */
+ 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.
+ * Neither arrival nor departure should be supplied.
+ *
+ *
+ * NO_DATA = 2;
+ */
+ public static final int NO_DATA_VALUE = 2;
+
+ public final int getNumber() {
+ return value;
+ }
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Alert)) {
- return super.equals(obj);
- }
- com.google.transit.realtime.GtfsRealtime.Alert other = (com.google.transit.realtime.GtfsRealtime.Alert) obj;
-
- if (!getActivePeriodList()
- .equals(other.getActivePeriodList())) return false;
- if (!getInformedEntityList()
- .equals(other.getInformedEntityList())) return false;
- if (hasCause() != other.hasCause()) return false;
- if (hasCause()) {
- if (cause_ != other.cause_) return false;
- }
- if (hasEffect() != other.hasEffect()) return false;
- if (hasEffect()) {
- if (effect_ != other.effect_) return false;
- }
- if (hasUrl() != other.hasUrl()) return false;
- if (hasUrl()) {
- if (!getUrl()
- .equals(other.getUrl())) return false;
- }
- if (hasHeaderText() != other.hasHeaderText()) return false;
- if (hasHeaderText()) {
- if (!getHeaderText()
- .equals(other.getHeaderText())) return false;
- }
- if (hasDescriptionText() != other.hasDescriptionText()) return false;
- if (hasDescriptionText()) {
- if (!getDescriptionText()
- .equals(other.getDescriptionText())) return false;
- }
- if (hasTtsHeaderText() != other.hasTtsHeaderText()) return false;
- if (hasTtsHeaderText()) {
- if (!getTtsHeaderText()
- .equals(other.getTtsHeaderText())) return false;
- }
- if (hasTtsDescriptionText() != other.hasTtsDescriptionText()) return false;
- if (hasTtsDescriptionText()) {
- if (!getTtsDescriptionText()
- .equals(other.getTtsDescriptionText())) return false;
- }
- if (hasSeverityLevel() != other.hasSeverityLevel()) return false;
- if (hasSeverityLevel()) {
- if (severityLevel_ != other.severityLevel_) return false;
- }
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- if (!getExtensionFields().equals(other.getExtensionFields()))
- return false;
- return true;
- }
+ /**
+ * @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);
+ }
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getActivePeriodCount() > 0) {
- hash = (37 * hash) + ACTIVE_PERIOD_FIELD_NUMBER;
- hash = (53 * hash) + getActivePeriodList().hashCode();
- }
- if (getInformedEntityCount() > 0) {
- hash = (37 * hash) + INFORMED_ENTITY_FIELD_NUMBER;
- hash = (53 * hash) + getInformedEntityList().hashCode();
- }
- if (hasCause()) {
- hash = (37 * hash) + CAUSE_FIELD_NUMBER;
- hash = (53 * hash) + cause_;
- }
- if (hasEffect()) {
- hash = (37 * hash) + EFFECT_FIELD_NUMBER;
- hash = (53 * hash) + effect_;
- }
- if (hasUrl()) {
- hash = (37 * hash) + URL_FIELD_NUMBER;
- hash = (53 * hash) + getUrl().hashCode();
- }
- if (hasHeaderText()) {
- hash = (37 * hash) + HEADER_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getHeaderText().hashCode();
- }
- if (hasDescriptionText()) {
- hash = (37 * hash) + DESCRIPTION_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getDescriptionText().hashCode();
- }
- if (hasTtsHeaderText()) {
- hash = (37 * hash) + TTS_HEADER_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getTtsHeaderText().hashCode();
- }
- if (hasTtsDescriptionText()) {
- hash = (37 * hash) + TTS_DESCRIPTION_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getTtsDescriptionText().hashCode();
- }
- if (hasSeverityLevel()) {
- hash = (37 * hash) + SEVERITY_LEVEL_FIELD_NUMBER;
- hash = (53 * hash) + severityLevel_;
- }
- hash = hashFields(hash, getExtensionFields());
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
+ /**
+ * @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 SKIPPED;
+ case 2 :
+ return NO_DATA;
+ default :
+ return null;
+ }
+ }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert 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.Alert parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert 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.Alert parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert 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.Alert parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
+ public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap 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().getValues().get(ordinal());
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDescriptor()
+ .getEnumTypes().get(0);
+ }
- @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.Alert prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
+ private static final ScheduleRelationship[] VALUES = values();
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * An alert, indicating some sort of incident in the public transit network.
- *
- *
- * Protobuf type {@code transit_realtime.Alert}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
- com.google.transit.realtime.GtfsRealtime.Alert, Builder> implements
- // @@protoc_insertion_point(builder_implements:transit_realtime.Alert)
- com.google.transit.realtime.GtfsRealtime.AlertOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
- }
-
- // Construct using com.google.transit.realtime.GtfsRealtime.Alert.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getActivePeriodFieldBuilder();
- getInformedEntityFieldBuilder();
- getUrlFieldBuilder();
- getHeaderTextFieldBuilder();
- getDescriptionTextFieldBuilder();
- getTtsHeaderTextFieldBuilder();
- getTtsDescriptionTextFieldBuilder();
- }
- }
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (activePeriodBuilder_ == null) {
- activePeriod_ = java.util.Collections.emptyList();
- } else {
- activePeriod_ = null;
- activePeriodBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- if (informedEntityBuilder_ == null) {
- informedEntity_ = java.util.Collections.emptyList();
- } else {
- informedEntity_ = null;
- informedEntityBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- cause_ = 1;
- effect_ = 8;
- url_ = null;
- if (urlBuilder_ != null) {
- urlBuilder_.dispose();
- urlBuilder_ = null;
- }
- headerText_ = null;
- if (headerTextBuilder_ != null) {
- headerTextBuilder_.dispose();
- headerTextBuilder_ = null;
- }
- descriptionText_ = null;
- if (descriptionTextBuilder_ != null) {
- descriptionTextBuilder_.dispose();
- descriptionTextBuilder_ = null;
- }
- ttsHeaderText_ = null;
- if (ttsHeaderTextBuilder_ != null) {
- ttsHeaderTextBuilder_.dispose();
- ttsHeaderTextBuilder_ = null;
- }
- ttsDescriptionText_ = null;
- if (ttsDescriptionTextBuilder_ != null) {
- ttsDescriptionTextBuilder_.dispose();
- ttsDescriptionTextBuilder_ = null;
- }
- severityLevel_ = 1;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
- return com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Alert build() {
- com.google.transit.realtime.GtfsRealtime.Alert result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.transit.realtime.GtfsRealtime.Alert buildPartial() {
- com.google.transit.realtime.GtfsRealtime.Alert result = new com.google.transit.realtime.GtfsRealtime.Alert(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) { buildPartial0(result); }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.Alert result) {
- if (activePeriodBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- activePeriod_ = java.util.Collections.unmodifiableList(activePeriod_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.activePeriod_ = activePeriod_;
- } else {
- result.activePeriod_ = activePeriodBuilder_.build();
- }
- if (informedEntityBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- informedEntity_ = java.util.Collections.unmodifiableList(informedEntity_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.informedEntity_ = informedEntity_;
- } else {
- result.informedEntity_ = informedEntityBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Alert result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.cause_ = cause_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.effect_ = effect_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.url_ = urlBuilder_ == null
- ? url_
- : urlBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.headerText_ = headerTextBuilder_ == null
- ? headerText_
- : headerTextBuilder_.build();
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.descriptionText_ = descriptionTextBuilder_ == null
- ? descriptionText_
- : descriptionTextBuilder_.build();
- to_bitField0_ |= 0x00000010;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- result.ttsHeaderText_ = ttsHeaderTextBuilder_ == null
- ? ttsHeaderText_
- : ttsHeaderTextBuilder_.build();
- to_bitField0_ |= 0x00000020;
- }
- if (((from_bitField0_ & 0x00000100) != 0)) {
- result.ttsDescriptionText_ = ttsDescriptionTextBuilder_ == null
- ? ttsDescriptionText_
- : ttsDescriptionTextBuilder_.build();
- to_bitField0_ |= 0x00000040;
- }
- if (((from_bitField0_ & 0x00000200) != 0)) {
- result.severityLevel_ = severityLevel_;
- to_bitField0_ |= 0x00000080;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.setField(field, value);
- }
- @java.lang.Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @java.lang.Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Alert, Type> extension,
- Type value) {
- return super.setExtension(extension, value);
- }
- @java.lang.Override
- public Builder setExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Alert, java.util.List> extension,
- int index, Type value) {
- return super.setExtension(extension, index, value);
- }
- @java.lang.Override
- public Builder addExtension(
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.transit.realtime.GtfsRealtime.Alert, java.util.List