Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* 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 FeedMessage extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedMessage> 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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FeedMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.FeedHeader.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
entity_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
entity_.add(
input.readMessage(com.google.transit.realtime.GtfsRealtime.FeedEntity.PARSER, extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
entity_ = java.util.Collections.unmodifiableList(entity_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 1;
private com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
/**
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
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;
}
@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) == 0x00000001)) {
output.writeMessage(1, getHeader());
}
for (int i = 0; i < entity_.size(); i++) {
output.writeMessage(2, entity_.get(i));
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
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 += unknownFields.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.FeedMessage)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.FeedMessage other = (com.google.transit.realtime.GtfsRealtime.FeedMessage) obj;
boolean result = true;
result = result && (hasHeader() == other.hasHeader());
if (hasHeader()) {
result = result && getHeader()
.equals(other.getHeader());
}
result = result && getEntityList()
.equals(other.getEntityList());
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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) + unknownFields.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 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 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<
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();
if (headerBuilder_ == null) {
header_ = null;
} else {
headerBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (entityBuilder_ == null) {
entity_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
entityBuilder_.clear();
}
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (headerBuilder_ == null) {
result.header_ = header_;
} else {
result.header_ = headerBuilder_.build();
}
if (entityBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
entity_ = java.util.Collections.unmodifiableList(entity_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.entity_ = entity_;
} else {
result.entity_ = entityBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) 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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedMessage, ?> extension) {
return (Builder) 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.unknownFields);
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 {
com.google.transit.realtime.GtfsRealtime.FeedMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.FeedMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.transit.realtime.GtfsRealtime.FeedHeader header_ = null;
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_;
/**
*
* 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).
*
* 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).
*
* 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;
timestamp_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FeedHeader(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
gtfsRealtimeVersion_ = bs;
break;
}
case 16: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality value = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(2, rawValue);
} else {
bitField0_ |= 0x00000002;
incrementality_ = rawValue;
}
break;
}
case 24: {
bitField0_ |= 0x00000004;
timestamp_ = input.readUInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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);
}
/**
*
* 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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Incrementality valueOf(int value) {
return forNumber(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);
}
};
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)
}
private int bitField0_;
public static final int GTFS_REALTIME_VERSION_FIELD_NUMBER = 1;
private volatile java.lang.Object gtfsRealtimeVersion_;
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.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;
*/
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;
}
}
public static final int INCREMENTALITY_FIELD_NUMBER = 2;
private int incrementality_;
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
public boolean hasIncrementality() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.valueOf(incrementality_);
return result == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET : result;
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
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).
*
* 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;
*/
public long getTimestamp() {
return timestamp_;
}
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 void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gtfsRealtimeVersion_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeEnum(2, incrementality_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt64(3, timestamp_);
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gtfsRealtimeVersion_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, incrementality_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, timestamp_);
}
size += extensionsSerializedSize();
size += unknownFields.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.FeedHeader)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.FeedHeader other = (com.google.transit.realtime.GtfsRealtime.FeedHeader) obj;
boolean result = true;
result = result && (hasGtfsRealtimeVersion() == other.hasGtfsRealtimeVersion());
if (hasGtfsRealtimeVersion()) {
result = result && getGtfsRealtimeVersion()
.equals(other.getGtfsRealtimeVersion());
}
result = result && (hasIncrementality() == other.hasIncrementality());
if (hasIncrementality()) {
result = result && incrementality_ == other.incrementality_;
}
result = result && (hasTimestamp() == other.hasTimestamp());
if (hasTimestamp()) {
result = result && (getTimestamp()
== other.getTimestamp());
}
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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) + unknownFields.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);
}
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);
}
@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
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() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
gtfsRealtimeVersion_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
incrementality_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000004);
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.gtfsRealtimeVersion_ = gtfsRealtimeVersion_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.incrementality_ = incrementality_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.timestamp_ = timestamp_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) 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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedHeader, ?> extension) {
return (Builder) 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()) {
bitField0_ |= 0x00000001;
gtfsRealtimeVersion_ = other.gtfsRealtimeVersion_;
onChanged();
}
if (other.hasIncrementality()) {
setIncrementality(other.getIncrementality());
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.transit.realtime.GtfsRealtime.FeedHeader parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.FeedHeader) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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".
*
* 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).
*
* 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;
*/
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).
*
* 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;
*/
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 {
return new FeedHeader(input, extensionRegistry);
}
};
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 {
/**
*
* 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).
*
* 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).
*
* 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).
*
* 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_ = "";
isDeleted_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FeedEntity(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
id_ = bs;
break;
}
case 16: {
bitField0_ |= 0x00000002;
isDeleted_ = input.readBool();
break;
}
case 26: {
com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = tripUpdate_.toBuilder();
}
tripUpdate_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TripUpdate.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tripUpdate_);
tripUpdate_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34: {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = vehicle_.toBuilder();
}
vehicle_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.VehiclePosition.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vehicle_);
vehicle_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42: {
com.google.transit.realtime.GtfsRealtime.Alert.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = alert_.toBuilder();
}
alert_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.Alert.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(alert_);
alert_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
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).
*
* 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;
*/
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;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_DELETED_FIELD_NUMBER = 2;
private boolean isDeleted_;
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
* 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() {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
public static final int VEHICLE_FIELD_NUMBER = 4;
private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
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;
*/
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.Alert alert = 5;
*/
public boolean hasAlert() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
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;
*/
public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
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;
}
@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) == 0x00000001)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBool(2, isDeleted_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, getTripUpdate());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, getVehicle());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(5, getAlert());
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, isDeleted_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTripUpdate());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getVehicle());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getAlert());
}
size += extensionsSerializedSize();
size += unknownFields.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.FeedEntity)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.FeedEntity other = (com.google.transit.realtime.GtfsRealtime.FeedEntity) obj;
boolean result = true;
result = result && (hasId() == other.hasId());
if (hasId()) {
result = result && getId()
.equals(other.getId());
}
result = result && (hasIsDeleted() == other.hasIsDeleted());
if (hasIsDeleted()) {
result = result && (getIsDeleted()
== other.getIsDeleted());
}
result = result && (hasTripUpdate() == other.hasTripUpdate());
if (hasTripUpdate()) {
result = result && getTripUpdate()
.equals(other.getTripUpdate());
}
result = result && (hasVehicle() == other.hasVehicle());
if (hasVehicle()) {
result = result && getVehicle()
.equals(other.getVehicle());
}
result = result && (hasAlert() == other.hasAlert());
if (hasAlert()) {
result = result && getAlert()
.equals(other.getAlert());
}
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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) + unknownFields.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);
}
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);
}
@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);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* 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<
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();
id_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
isDeleted_ = false;
bitField0_ = (bitField0_ & ~0x00000002);
if (tripUpdateBuilder_ == null) {
tripUpdate_ = null;
} else {
tripUpdateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (vehicleBuilder_ == null) {
vehicle_ = null;
} else {
vehicleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (alertBuilder_ == null) {
alert_ = null;
} else {
alertBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.id_ = id_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.isDeleted_ = isDeleted_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (tripUpdateBuilder_ == null) {
result.tripUpdate_ = tripUpdate_;
} else {
result.tripUpdate_ = tripUpdateBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (vehicleBuilder_ == null) {
result.vehicle_ = vehicle_;
} else {
result.vehicle_ = vehicleBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
if (alertBuilder_ == null) {
result.alert_ = alert_;
} else {
result.alert_ = alertBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) 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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedEntity, ?> extension) {
return (Builder) 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()) {
bitField0_ |= 0x00000001;
id_ = other.id_;
onChanged();
}
if (other.hasIsDeleted()) {
setIsDeleted(other.getIsDeleted());
}
if (other.hasTripUpdate()) {
mergeTripUpdate(other.getTripUpdate());
}
if (other.hasVehicle()) {
mergeVehicle(other.getVehicle());
}
if (other.hasAlert()) {
mergeAlert(other.getAlert());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.transit.realtime.GtfsRealtime.FeedEntity parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.FeedEntity) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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).
*
* 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;
*/
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).
*
* 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;
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
id_ = value;
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).
*
* 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;
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
private boolean isDeleted_ ;
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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();
timestamp_ = 0L;
delay_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TripUpdate(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = trip_.toBuilder();
}
trip_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TripDescriptor.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trip_);
trip_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
stopTimeUpdate_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
stopTimeUpdate_.add(
input.readMessage(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.PARSER, extensionRegistry));
break;
}
case 26: {
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = vehicle_.toBuilder();
}
vehicle_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vehicle_);
vehicle_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 32: {
bitField0_ |= 0x00000004;
timestamp_ = input.readUInt64();
break;
}
case 40: {
bitField0_ |= 0x00000008;
delay_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
stopTimeUpdate_ = java.util.Collections.unmodifiableList(stopTimeUpdate_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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.
*
* 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.
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
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.
*
* 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.
*
* 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() {
delay_ = 0;
time_ = 0L;
uncertainty_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StopTimeEvent(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
bitField0_ |= 0x00000001;
delay_ = input.readInt32();
break;
}
case 16: {
bitField0_ |= 0x00000002;
time_ = input.readInt64();
break;
}
case 24: {
bitField0_ |= 0x00000004;
uncertainty_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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_;
/**
*
* 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 (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;
*/
public int getDelay() {
return delay_;
}
public static final int TIME_FIELD_NUMBER = 2;
private long time_;
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
public long getTime() {
return time_;
}
public static final int UNCERTAINTY_FIELD_NUMBER = 3;
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.
*
* 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;
*/
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) == 0x00000001)) {
output.writeInt32(1, delay_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt64(2, time_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, uncertainty_);
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, delay_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, time_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, uncertainty_);
}
size += extensionsSerializedSize();
size += unknownFields.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;
boolean result = true;
result = result && (hasDelay() == other.hasDelay());
if (hasDelay()) {
result = result && (getDelay()
== other.getDelay());
}
result = result && (hasTime() == other.hasTime());
if (hasTime()) {
result = result && (getTime()
== other.getTime());
}
result = result && (hasUncertainty() == other.hasUncertainty());
if (hasUncertainty()) {
result = result && (getUncertainty()
== other.getUncertainty());
}
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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) + unknownFields.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() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
delay_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
time_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
uncertainty_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
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;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance();
}
@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;
}
@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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.delay_ = delay_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.time_ = time_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.uncertainty_ = uncertainty_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) 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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, ?> extension) {
return (Builder) 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 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.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.
*
* 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;
*/
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.
*
* 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.
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
public Builder clearTime() {
bitField0_ = (bitField0_ & ~0x00000002);
time_ = 0L;
onChanged();
return this;
}
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.
*
* 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;
*/
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.
*
* 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;
*/
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);
}
// @@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() {
@java.lang.Override
public StopTimeEvent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StopTimeEvent(input, extensionRegistry);
}
};
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 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.
*
* 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() {
stopSequence_ = 0;
stopId_ = "";
scheduleRelationship_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StopTimeUpdate(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
bitField0_ |= 0x00000001;
stopSequence_ = input.readUInt32();
break;
}
case 18: {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = arrival_.toBuilder();
}
arrival_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(arrival_);
arrival_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 26: {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = departure_.toBuilder();
}
departure_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(departure_);
departure_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
stopId_ = bs;
break;
}
case 40: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship value = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(5, rawValue);
} else {
bitField0_ |= 0x00000010;
scheduleRelationship_ = rawValue;
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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);
}
/**
*
* The relation between this StopTime and the static schedule.
*
* 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. Frequency-based trips (GTFS frequencies.txt with exact_times = 0)
* should not have a SCHEDULED value and should use UNSCHEDULED instead.
*
*
* 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 operating a trip defined in GTFS frequencies.txt with exact_times = 0.
* This value should not be used for trips that are not defined in GTFS frequencies.txt,
* or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
* with ScheduleRelationship=UNSCHEDULED must also set TripDescriptor.ScheduleRelationship=UNSCHEDULED.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* UNSCHEDULED = 3;
*/
UNSCHEDULED(3),
;
/**
*
* 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. Frequency-based trips (GTFS frequencies.txt with exact_times = 0)
* should not have a SCHEDULED value and should use UNSCHEDULED instead.
*
*
* 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;
/**
*
* The vehicle is operating a trip defined in GTFS frequencies.txt with exact_times = 0.
* This value should not be used for trips that are not defined in GTFS frequencies.txt,
* or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
* with ScheduleRelationship=UNSCHEDULED must also set TripDescriptor.ScheduleRelationship=UNSCHEDULED.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* UNSCHEDULED = 3;
*/
public static final int UNSCHEDULED_VALUE = 3;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ScheduleRelationship valueOf(int value) {
return forNumber(value);
}
public static ScheduleRelationship forNumber(int value) {
switch (value) {
case 0: return SCHEDULED;
case 1: return SKIPPED;
case 2: return NO_DATA;
case 3: return UNSCHEDULED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ScheduleRelationship> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ScheduleRelationship findValueByNumber(int number) {
return ScheduleRelationship.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().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_;
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
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;
*/
public boolean hasArrival() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
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;
*/
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;
*/
public boolean hasDeparture() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
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;
*/
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_;
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship() {
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.valueOf(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.SCHEDULED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (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) == 0x00000001)) {
output.writeUInt32(1, stopSequence_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(2, getArrival());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(3, getDeparture());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stopId_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeEnum(5, scheduleRelationship_);
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, stopSequence_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getArrival());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDeparture());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stopId_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, scheduleRelationship_);
}
size += extensionsSerializedSize();
size += unknownFields.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;
boolean result = true;
result = result && (hasStopSequence() == other.hasStopSequence());
if (hasStopSequence()) {
result = result && (getStopSequence()
== other.getStopSequence());
}
result = result && (hasStopId() == other.hasStopId());
if (hasStopId()) {
result = result && getStopId()
.equals(other.getStopId());
}
result = result && (hasArrival() == other.hasArrival());
if (hasArrival()) {
result = result && getArrival()
.equals(other.getArrival());
}
result = result && (hasDeparture() == other.hasDeparture());
if (hasDeparture()) {
result = result && getDeparture()
.equals(other.getDeparture());
}
result = result && (hasScheduleRelationship() == other.hasScheduleRelationship());
if (hasScheduleRelationship()) {
result = result && scheduleRelationship_ == other.scheduleRelationship_;
}
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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_;
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.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();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
stopSequence_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
stopId_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (arrivalBuilder_ == null) {
arrival_ = null;
} else {
arrivalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (departureBuilder_ == null) {
departure_ = null;
} else {
departureBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
scheduleRelationship_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.stopSequence_ = stopSequence_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.stopId_ = stopId_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (arrivalBuilder_ == null) {
result.arrival_ = arrival_;
} else {
result.arrival_ = arrivalBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (departureBuilder_ == null) {
result.departure_ = departure_;
} else {
result.departure_ = departureBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.scheduleRelationship_ = scheduleRelationship_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) super.setExtension(extension, value);
}
@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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, ?> extension) {
return (Builder) 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()) {
bitField0_ |= 0x00000002;
stopId_ = other.stopId_;
onChanged();
}
if (other.hasArrival()) {
mergeArrival(other.getArrival());
}
if (other.hasDeparture()) {
mergeDeparture(other.getDeparture());
}
if (other.hasScheduleRelationship()) {
setScheduleRelationship(other.getScheduleRelationship());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@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 {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int stopSequence_ ;
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
* 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.
*
* 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.
*
* 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() {
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.
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
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;
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.
*
* 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.
*
* 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() {
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.
*
* 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) {
return stopTimeUpdate_.get(index);
}
public static final int TIMESTAMP_FIELD_NUMBER = 4;
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).
*
* 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;
*/
public long getTimestamp() {
return timestamp_;
}
public static final int DELAY_FIELD_NUMBER = 5;
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.
*
* 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;
*/
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) == 0x00000001)) {
output.writeMessage(1, getTrip());
}
for (int i = 0; i < stopTimeUpdate_.size(); i++) {
output.writeMessage(2, stopTimeUpdate_.get(i));
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(3, getVehicle());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt64(4, timestamp_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(5, delay_);
}
extensionWriter.writeUntil(2000, output);
extensionWriter.writeUntil(10000, output);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
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) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getVehicle());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, timestamp_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, delay_);
}
size += extensionsSerializedSize();
size += unknownFields.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;
boolean result = true;
result = result && (hasTrip() == other.hasTrip());
if (hasTrip()) {
result = result && getTrip()
.equals(other.getTrip());
}
result = result && (hasVehicle() == other.hasVehicle());
if (hasVehicle()) {
result = result && getVehicle()
.equals(other.getVehicle());
}
result = result && getStopTimeUpdateList()
.equals(other.getStopTimeUpdateList());
result = result && (hasTimestamp() == other.hasTimestamp());
if (hasTimestamp()) {
result = result && (getTimestamp()
== other.getTimestamp());
}
result = result && (hasDelay() == other.hasDelay());
if (hasDelay()) {
result = result && (getDelay()
== other.getDelay());
}
result = result && unknownFields.equals(other.unknownFields);
result = result &&
getExtensionFields().equals(other.getExtensionFields());
return result;
}
@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) + unknownFields.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;
}
/**
*
* 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 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();
if (tripBuilder_ == null) {
trip_ = null;
} else {
tripBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (vehicleBuilder_ == null) {
vehicle_ = null;
} else {
vehicleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdate_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
stopTimeUpdateBuilder_.clear();
}
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000008);
delay_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
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);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (tripBuilder_ == null) {
result.trip_ = trip_;
} else {
result.trip_ = tripBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (vehicleBuilder_ == null) {
result.vehicle_ = vehicle_;
} else {
result.vehicle_ = vehicleBuilder_.build();
}
if (stopTimeUpdateBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
stopTimeUpdate_ = java.util.Collections.unmodifiableList(stopTimeUpdate_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.stopTimeUpdate_ = stopTimeUpdate_;
} else {
result.stopTimeUpdate_ = stopTimeUpdateBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
result.timestamp_ = timestamp_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
result.delay_ = delay_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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 (Builder) 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 (Builder) 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 (Builder) super.addExtension(extension, value);
}
@java.lang.Override
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate, ?> extension) {
return (Builder) 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.unknownFields);
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 {
com.google.transit.realtime.GtfsRealtime.TripUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.TripUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_ = null;
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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;
*/
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.
*
* 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;
*/
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)
}
// @@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();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@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 {
return new TripUpdate(input, extensionRegistry);
}
};
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 getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VehiclePositionOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.VehiclePosition)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
* 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.
*
* 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.
*
*
* 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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CongestionLevel valueOf(int value) {
return forNumber(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)
}
/**
*
* 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.
*
* 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.
*
* 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.
*
* 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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OccupancyStatus valueOf(int value) {
return forNumber(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);
}
};
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)
}
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.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
public static final int CURRENT_STOP_SEQUENCE_FIELD_NUMBER = 3;
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.
*
* 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;
*/
public int getCurrentStopSequence() {
return currentStopSequence_;
}
public static final int STOP_ID_FIELD_NUMBER = 7;
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.
*
* 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.
*
* 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;
*/
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.
*
* 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.
*
* 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;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000040);
timestamp_ = 0L;
onChanged();
return this;
}
private int congestionLevel_ = 0;
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
*/
public boolean hasCongestionLevel() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel() {
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.valueOf(congestionLevel_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL : result;
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
*/
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;
*/
public Builder clearCongestionLevel() {
bitField0_ = (bitField0_ & ~0x00000080);
congestionLevel_ = 0;
onChanged();
return this;
}
private int occupancyStatus_ = 0;
/**
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
*/
public boolean hasOccupancyStatus() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
@SuppressWarnings("deprecation")
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.valueOf(occupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
}
/**
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
*/
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;
*/
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();
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@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 {
return new VehiclePosition(input, extensionRegistry);
}
};
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.VehiclePosition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AlertOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.Alert)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*