com.google.transit.realtime.GtfsRealtime Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: gtfs-realtime.proto
package com.google.transit.realtime;
public final class GtfsRealtime {
private GtfsRealtime() {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface FeedMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.FeedMessage)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
boolean hasHeader();
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader();
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder();
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
java.util.List
getEntityList();
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index);
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
int getEntityCount();
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityOrBuilderList();
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
int index);
}
/**
*
* 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.
* A feed depends on some external configuration:
* - The corresponding GTFS feed.
* - Feed application (updates, positions or alerts). A feed should contain only
* items of one specified application; all the other entities will be ignored.
* - Polling frequency
*
*
* 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 {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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;
}
}
}
} 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;
}
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_;
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
public static final int ENTITY_FIELD_NUMBER = 2;
private java.util.List entity_;
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List getEntityList() {
return entity_;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityOrBuilderList() {
return entity_;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public int getEntityCount() {
return entity_.size();
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
return entity_.get(index);
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
int index) {
return entity_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasHeader()) {
memoizedIsInitialized = 0;
return false;
}
if (!getHeader().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
for (int i = 0; i < getEntityCount(); i++) {
if (!getEntity(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public 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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
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);
}
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);
}
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.
* A feed depends on some external configuration:
* - The corresponding GTFS feed.
* - Feed application (updates, positions or alerts). A feed should contain only
* items of one specified application; all the other entities will be ignored.
* - Polling frequency
*
*
* 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;
}
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();
}
}
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;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.FeedMessage build() {
com.google.transit.realtime.GtfsRealtime.FeedMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedMessage, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedMessage, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
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;
}
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_;
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder setHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
} else {
headerBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder setHeader(
com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
onChanged();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder mergeHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
if (headerBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
header_ != null &&
header_ != com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) {
header_ =
com.google.transit.realtime.GtfsRealtime.FeedHeader.newBuilder(header_).mergeFrom(value).buildPartial();
} else {
header_ = value;
}
onChanged();
} else {
headerBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder clearHeader() {
if (headerBuilder_ == null) {
header_ = null;
onChanged();
} else {
headerBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder getHeaderBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
private java.util.List entity_ =
java.util.Collections.emptyList();
private void ensureEntityIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
entity_ = new java.util.ArrayList(entity_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> entityBuilder_;
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List getEntityList() {
if (entityBuilder_ == null) {
return java.util.Collections.unmodifiableList(entity_);
} else {
return entityBuilder_.getMessageList();
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public int getEntityCount() {
if (entityBuilder_ == null) {
return entity_.size();
} else {
return entityBuilder_.getCount();
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
if (entityBuilder_ == null) {
return entity_.get(index);
} else {
return entityBuilder_.getMessage(index);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder setEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.set(index, value);
onChanged();
} else {
entityBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder setEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.set(index, builderForValue.build());
onChanged();
} else {
entityBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.add(value);
onChanged();
} else {
entityBuilder_.addMessage(value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.add(index, value);
onChanged();
} else {
entityBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.add(builderForValue.build());
onChanged();
} else {
entityBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.add(index, builderForValue.build());
onChanged();
} else {
entityBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addAllEntity(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.FeedEntity> values) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entity_);
onChanged();
} else {
entityBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder clearEntity() {
if (entityBuilder_ == null) {
entity_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
entityBuilder_.clear();
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder removeEntity(int index) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.remove(index);
onChanged();
} else {
entityBuilder_.remove(index);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder getEntityBuilder(
int index) {
return getEntityFieldBuilder().getBuilder(index);
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
int index) {
if (entityBuilder_ == null) {
return entity_.get(index);
} else {
return entityBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityOrBuilderList() {
if (entityBuilder_ != null) {
return entityBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entity_);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder() {
return getEntityFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder(
int index) {
return getEntityFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List
getEntityBuilderList() {
return getEntityFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityFieldBuilder() {
if (entityBuilder_ == null) {
entityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>(
entity_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
entity_ = null;
}
return entityBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedMessage)
}
// @@protoc_insertion_point(class_scope:transit_realtime.FeedMessage)
private static final com.google.transit.realtime.GtfsRealtime.FeedMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedMessage();
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public FeedMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FeedMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FeedHeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.FeedHeader)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
boolean hasGtfsRealtimeVersion();
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
java.lang.String getGtfsRealtimeVersion();
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
com.google.protobuf.ByteString
getGtfsRealtimeVersionBytes();
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
boolean hasIncrementality();
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality();
/**
*
* 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;
*/
boolean hasTimestamp();
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
*/
long getTimestamp();
}
/**
*
* Metadata about a feed, included in feed messages.
*
*
* Protobuf type {@code transit_realtime.FeedHeader}
*/
public static final class FeedHeader extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedHeader> implements
// @@protoc_insertion_point(message_implements:transit_realtime.FeedHeader)
FeedHeaderOrBuilder {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
gtfsRealtimeVersion_ = bs;
break;
}
case 16: {
int rawValue = input.readEnum();
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;
}
}
}
} 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;
}
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 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public boolean hasGtfsRealtimeVersion() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public java.lang.String getGtfsRealtimeVersion() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
gtfsRealtimeVersion_ = s;
}
return s;
}
}
/**
*
* Version of the feed specification.
* The current version is 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() {
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).
*
*
* optional uint64 timestamp = 3;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* 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;
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;
}
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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder 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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
gtfsRealtimeVersion_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
incrementality_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.FeedHeader build() {
com.google.transit.realtime.GtfsRealtime.FeedHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedHeader, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedHeader, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
public final boolean isInitialized() {
if (!hasGtfsRealtimeVersion()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
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 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public boolean hasGtfsRealtimeVersion() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public java.lang.String getGtfsRealtimeVersion() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
gtfsRealtimeVersion_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public com.google.protobuf.ByteString
getGtfsRealtimeVersionBytes() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gtfsRealtimeVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public Builder setGtfsRealtimeVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
gtfsRealtimeVersion_ = value;
onChanged();
return this;
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public Builder clearGtfsRealtimeVersion() {
bitField0_ = (bitField0_ & ~0x00000001);
gtfsRealtimeVersion_ = getDefaultInstance().getGtfsRealtimeVersion();
onChanged();
return this;
}
/**
*
* Version of the feed specification.
* The current version is 1.0.
*
*
* required string gtfs_realtime_version = 1;
*/
public Builder setGtfsRealtimeVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
gtfsRealtimeVersion_ = value;
onChanged();
return this;
}
private int incrementality_ = 0;
/**
* 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() {
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;
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
public Builder setIncrementality(com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
incrementality_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
*/
public Builder clearIncrementality() {
bitField0_ = (bitField0_ & ~0x00000002);
incrementality_ = 0;
onChanged();
return this;
}
private long timestamp_;
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* 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).
*
*
* optional uint64 timestamp = 3;
*/
public Builder setTimestamp(long value) {
bitField0_ |= 0x00000004;
timestamp_ = value;
onChanged();
return this;
}
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000004);
timestamp_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
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() {
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;
}
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).
*
*
* required string id = 1;
*/
boolean hasId();
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
*/
java.lang.String getId();
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
boolean hasIsDeleted();
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
boolean getIsDeleted();
/**
*
* 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;
*/
boolean hasTripUpdate();
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate();
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
boolean hasVehicle();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder();
/**
* optional .transit_realtime.Alert alert = 5;
*/
boolean hasAlert();
/**
* optional .transit_realtime.Alert alert = 5;
*/
com.google.transit.realtime.GtfsRealtime.Alert getAlert();
/**
* optional .transit_realtime.Alert alert = 5;
*/
com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder();
}
/**
*
* A definition (or update) of an entity in the transit feed.
*
*
* Protobuf type {@code transit_realtime.FeedEntity}
*/
public static final class FeedEntity extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedEntity> implements
// @@protoc_insertion_point(message_implements:transit_realtime.FeedEntity)
FeedEntityOrBuilder {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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;
}
}
}
} 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;
}
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).
*
*
* required string id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* 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.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public boolean hasIsDeleted() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public boolean getIsDeleted() {
return isDeleted_;
}
public static final int TRIP_UPDATE_FIELD_NUMBER = 3;
private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public boolean hasTripUpdate() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
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;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasId()) {
memoizedIsInitialized = 0;
return false;
}
if (hasTripUpdate()) {
if (!getTripUpdate().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasAlert()) {
if (!getAlert().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public 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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
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);
}
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);
}
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;
}
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();
}
}
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;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.FeedEntity build() {
com.google.transit.realtime.GtfsRealtime.FeedEntity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedEntity, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.FeedEntity, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
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;
}
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).
*
*
* required string id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* 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).
*
*
* required string id = 1;
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
*/
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).
*
*
* required string id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
*/
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.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public boolean hasIsDeleted() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public boolean getIsDeleted() {
return isDeleted_;
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public Builder setIsDeleted(boolean value) {
bitField0_ |= 0x00000002;
isDeleted_ = value;
onChanged();
return this;
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
*/
public Builder clearIsDeleted() {
bitField0_ = (bitField0_ & ~0x00000002);
isDeleted_ = false;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder> tripUpdateBuilder_;
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public boolean hasTripUpdate() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
if (tripUpdateBuilder_ == null) {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
} else {
return tripUpdateBuilder_.getMessage();
}
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
if (tripUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tripUpdate_ = value;
onChanged();
} else {
tripUpdateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder setTripUpdate(
com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder builderForValue) {
if (tripUpdateBuilder_ == null) {
tripUpdate_ = builderForValue.build();
onChanged();
} else {
tripUpdateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder mergeTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
if (tripUpdateBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
tripUpdate_ != null &&
tripUpdate_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()) {
tripUpdate_ =
com.google.transit.realtime.GtfsRealtime.TripUpdate.newBuilder(tripUpdate_).mergeFrom(value).buildPartial();
} else {
tripUpdate_ = value;
}
onChanged();
} else {
tripUpdateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder clearTripUpdate() {
if (tripUpdateBuilder_ == null) {
tripUpdate_ = null;
onChanged();
} else {
tripUpdateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder getTripUpdateBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTripUpdateFieldBuilder().getBuilder();
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
if (tripUpdateBuilder_ != null) {
return tripUpdateBuilder_.getMessageOrBuilder();
} else {
return tripUpdate_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>
getTripUpdateFieldBuilder() {
if (tripUpdateBuilder_ == null) {
tripUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>(
getTripUpdate(),
getParentForChildren(),
isClean());
tripUpdate_ = null;
}
return tripUpdateBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder> vehicleBuilder_;
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
onChanged();
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
onChanged();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) {
vehicle_ =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.newBuilder(vehicle_).mergeFrom(value).buildPartial();
} else {
vehicle_ = value;
}
onChanged();
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder clearVehicle() {
if (vehicleBuilder_ == null) {
vehicle_ = null;
onChanged();
} else {
vehicleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder getVehicleBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
}
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.Alert alert_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder> alertBuilder_;
/**
* optional .transit_realtime.Alert alert = 5;
*/
public boolean hasAlert() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
if (alertBuilder_ == null) {
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
} else {
return alertBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
if (alertBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
alert_ = value;
onChanged();
} else {
alertBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder setAlert(
com.google.transit.realtime.GtfsRealtime.Alert.Builder builderForValue) {
if (alertBuilder_ == null) {
alert_ = builderForValue.build();
onChanged();
} else {
alertBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder mergeAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
if (alertBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
alert_ != null &&
alert_ != com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) {
alert_ =
com.google.transit.realtime.GtfsRealtime.Alert.newBuilder(alert_).mergeFrom(value).buildPartial();
} else {
alert_ = value;
}
onChanged();
} else {
alertBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder clearAlert() {
if (alertBuilder_ == null) {
alert_ = null;
onChanged();
} else {
alertBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Builder getAlertBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAlertFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
if (alertBuilder_ != null) {
return alertBuilder_.getMessageOrBuilder();
} else {
return alert_ == null ?
com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>
getAlertFieldBuilder() {
if (alertBuilder_ == null) {
alertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>(
getAlert(),
getParentForChildren(),
isClean());
alert_ = null;
}
return alertBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedEntity)
}
// @@protoc_insertion_point(class_scope:transit_realtime.FeedEntity)
private static final com.google.transit.realtime.GtfsRealtime.FeedEntity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedEntity();
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public FeedEntity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FeedEntity(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TripUpdateOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* 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;
*/
boolean hasTrip();
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
boolean hasVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
java.util.List
getStopTimeUpdateList();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index);
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
int getStopTimeUpdateCount();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
int index);
/**
*
* Moment at which the vehicle's real-time progress was measured. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
*/
boolean hasTimestamp();
/**
*
* Moment at which the vehicle's real-time progress was measured. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
*/
long getTimestamp();
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
*/
boolean hasDelay();
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
*/
int getDelay();
}
/**
*
* Realtime update of the progress of a vehicle along a trip.
* Depending on the value of ScheduleRelationship, a TripUpdate can specify:
* - A trip that proceeds along the schedule.
* - A trip that proceeds along a route but has no fixed schedule.
* - A trip that have been added or removed with regard to schedule.
* The updates can be for future, predicted arrival/departure events, or for
* past events that already occurred.
* Normally, updates should get more precise and more certain (see
* uncertainty below) as the events gets closer to current time.
* Even if that is not possible, the information for past events should be
* precise and certain. In particular, if an update points to time in the past
* but its update's uncertainty is not 0, the client should conclude that the
* update is a (wrong) prediction and that the trip has not completed yet.
* Note that the update can describe a trip that is already completed.
* To this end, it is enough to provide an update for the last stop of the trip.
* If the time of that is in the past, the client will conclude from that that
* the whole trip is in the past (it is possible, although inconsequential, to
* also provide updates for preceding stops).
* This option is most relevant for a trip that has completed ahead of schedule,
* but according to the schedule, the trip is still proceeding at the current
* time. Removing the updates for this trip could make the client assume
* that the trip is still proceeding.
* Note that the feed provider is allowed, but not required, to purge past
* updates - this is one case where this would be practically useful.
*
*
* Protobuf type {@code transit_realtime.TripUpdate}
*/
public static final class TripUpdate extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TripUpdate> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate)
TripUpdateOrBuilder {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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;
}
}
}
} 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;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
}
public interface StopTimeEventOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeEvent)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
*/
boolean hasDelay();
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
*/
int getDelay();
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
boolean hasTime();
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
long getTime();
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
*/
boolean hasUncertainty();
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
*/
int getUncertainty();
}
/**
*
* Timing information for a single predicted event (either arrival or
* departure).
* Timing consists of delay and/or estimated time, and uncertainty.
* - delay should be used when the prediction is given relative to some
* existing schedule in GTFS.
* - time should be given whether there is a predicted schedule or not. If
* both time and delay are specified, time will take precedence
* (although normally, time, if given for a scheduled trip, should be
* equal to scheduled time in GTFS + delay).
* Uncertainty applies equally to both time and delay.
* The uncertainty roughly specifies the expected error in true delay (but
* note, we don't yet define its precise statistical meaning). It's possible
* for the uncertainty to be 0, for example for trains that are driven under
* computer timing control.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
*/
public static final class StopTimeEvent extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
StopTimeEvent> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeEvent)
StopTimeEventOrBuilder {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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;
}
}
}
} 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;
}
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.
*
*
* optional int32 delay = 1;
*/
public boolean hasDelay() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* 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).
*
*
* optional int64 time = 2;
*/
public boolean hasTime() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* 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.
*
*
* optional int32 uncertainty = 3;
*/
public boolean hasUncertainty() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* 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;
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;
}
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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
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);
}
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);
}
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;
}
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) {
}
}
public Builder clear() {
super.clear();
delay_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
time_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
uncertainty_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public 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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
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.
*
*
* optional int32 delay = 1;
*/
public boolean hasDelay() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* 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.
*
*
* optional int32 delay = 1;
*/
public Builder setDelay(int value) {
bitField0_ |= 0x00000001;
delay_ = value;
onChanged();
return this;
}
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
*/
public Builder clearDelay() {
bitField0_ = (bitField0_ & ~0x00000001);
delay_ = 0;
onChanged();
return this;
}
private long time_;
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
public boolean hasTime() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* 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_;
}
/**
*
* 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 setTime(long value) {
bitField0_ |= 0x00000002;
time_ = value;
onChanged();
return this;
}
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
*/
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.
*
*
* optional int32 uncertainty = 3;
*/
public boolean hasUncertainty() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* 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.
*
*
* optional int32 uncertainty = 3;
*/
public Builder setUncertainty(int value) {
bitField0_ |= 0x00000004;
uncertainty_ = value;
onChanged();
return this;
}
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
*/
public Builder clearUncertainty() {
bitField0_ = (bitField0_ & ~0x00000004);
uncertainty_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
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() {
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;
}
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.
*
*
* optional uint32 stop_sequence = 1;
*/
boolean hasStopSequence();
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
*/
int getStopSequence();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
boolean hasStopId();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
java.lang.String getStopId();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
com.google.protobuf.ByteString
getStopIdBytes();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
boolean hasArrival();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
boolean hasDeparture();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder();
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
boolean hasScheduleRelationship();
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship();
}
/**
*
* 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 {
// 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();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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();
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;
}
}
}
} 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;
}
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.
*
*
* Protobuf enum {@code transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
*/
public enum ScheduleRelationship
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The vehicle is proceeding in accordance with its static schedule of
* stops, although not necessarily according to the times of the schedule.
* At least one of arrival and departure must be provided. If the schedule
* for this stop contains both arrival and departure times then so must
* this update.
*
*
* SCHEDULED = 0;
*/
SCHEDULED(0),
/**
*
* The stop is skipped, i.e., the vehicle will not stop at this stop.
* Arrival and departure are optional.
*
*
* SKIPPED = 1;
*/
SKIPPED(1),
/**
*
* No data is given for this stop. The main intention for this value is to
* give the predictions only for part of a trip, i.e., if the last update
* for a trip has a NO_DATA specifier, then StopTimes for the rest of the
* stops in the trip are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
* NO_DATA = 2;
*/
NO_DATA(2),;
/**
*
* The vehicle is proceeding in accordance with its static schedule of
* stops, although not necessarily according to the times of the schedule.
* At least one of arrival and departure must be provided. If the schedule
* for this stop contains both arrival and departure times then so must
* this update.
*
*
* SCHEDULED = 0;
*/
public static final int SCHEDULED_VALUE = 0;
/**
*
* The stop is skipped, i.e., the vehicle will not stop at this stop.
* Arrival and departure are optional.
*
*
* SKIPPED = 1;
*/
public static final int SKIPPED_VALUE = 1;
/**
*
* No data is given for this stop. The main intention for this value is to
* give the predictions only for part of a trip, i.e., if the last update
* for a trip has a NO_DATA specifier, then StopTimes for the rest of the
* stops in the trip are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
* NO_DATA = 2;
*/
public static final int NO_DATA_VALUE = 2;
public final int getNumber() {
return value;
}
/**
* @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;
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.
*
*
* optional uint32 stop_sequence = 1;
*/
public boolean hasStopSequence() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
*/
public int getStopSequence() {
return stopSequence_;
}
public static final int STOP_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object stopId_;
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
}
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
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() {
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;
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;
}
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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
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);
}
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);
}
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;
}
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();
}
}
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;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance();
}
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;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
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);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
public final boolean isInitialized() {
if (hasArrival()) {
if (!getArrival().isInitialized()) {
return false;
}
}
if (hasDeparture()) {
if (!getDeparture().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
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.
*
*
* optional uint32 stop_sequence = 1;
*/
public boolean hasStopSequence() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
*/
public int getStopSequence() {
return stopSequence_;
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
*/
public Builder setStopSequence(int value) {
bitField0_ |= 0x00000001;
stopSequence_ = value;
onChanged();
return this;
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
*/
public Builder clearStopSequence() {
bitField0_ = (bitField0_ & ~0x00000001);
stopSequence_ = 0;
onChanged();
return this;
}
private java.lang.Object stopId_ = "";
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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 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;
}
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public Builder setStopId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
stopId_ = value;
onChanged();
return this;
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public Builder clearStopId() {
bitField0_ = (bitField0_ & ~0x00000002);
stopId_ = getDefaultInstance().getStopId();
onChanged();
return this;
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
*/
public Builder setStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
stopId_ = value;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent arrival_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> arrivalBuilder_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public boolean hasArrival() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival() {
if (arrivalBuilder_ == null) {
return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
} else {
return arrivalBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder setArrival(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
if (arrivalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
arrival_ = value;
onChanged();
} else {
arrivalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder setArrival(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder builderForValue) {
if (arrivalBuilder_ == null) {
arrival_ = builderForValue.build();
onChanged();
} else {
arrivalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder mergeArrival(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
if (arrivalBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
arrival_ != null &&
arrival_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
arrival_ =
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.newBuilder(arrival_).mergeFrom(value).buildPartial();
} else {
arrival_ = value;
}
onChanged();
} else {
arrivalBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder clearArrival() {
if (arrivalBuilder_ == null) {
arrival_ = null;
onChanged();
} else {
arrivalBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder getArrivalBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getArrivalFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder() {
if (arrivalBuilder_ != null) {
return arrivalBuilder_.getMessageOrBuilder();
} else {
return arrival_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
}
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>
getArrivalFieldBuilder() {
if (arrivalBuilder_ == null) {
arrivalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>(
getArrival(),
getParentForChildren(),
isClean());
arrival_ = null;
}
return arrivalBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent departure_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> departureBuilder_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public boolean hasDeparture() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture() {
if (departureBuilder_ == null) {
return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
} else {
return departureBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public Builder setDeparture(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
if (departureBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
departure_ = value;
onChanged();
} else {
departureBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public Builder setDeparture(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder builderForValue) {
if (departureBuilder_ == null) {
departure_ = builderForValue.build();
onChanged();
} else {
departureBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public Builder mergeDeparture(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
if (departureBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
departure_ != null &&
departure_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
departure_ =
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.newBuilder(departure_).mergeFrom(value).buildPartial();
} else {
departure_ = value;
}
onChanged();
} else {
departureBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public Builder clearDeparture() {
if (departureBuilder_ == null) {
departure_ = null;
onChanged();
} else {
departureBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder getDepartureBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getDepartureFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder() {
if (departureBuilder_ != null) {
return departureBuilder_.getMessageOrBuilder();
} else {
return departure_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
}
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>
getDepartureFieldBuilder() {
if (departureBuilder_ == null) {
departureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder>(
getDeparture(),
getParentForChildren(),
isClean());
departure_ = null;
}
return departureBuilder_;
}
private int scheduleRelationship_ = 0;
/**
* 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() {
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;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
scheduleRelationship_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
*/
public Builder clearScheduleRelationship() {
bitField0_ = (bitField0_ & ~0x00000010);
scheduleRelationship_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeUpdate)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeUpdate)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public StopTimeUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StopTimeUpdate(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TRIP_FIELD_NUMBER = 1;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
public static final int VEHICLE_FIELD_NUMBER = 3;
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
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.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List getStopTimeUpdateList() {
return stopTimeUpdate_;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList() {
return stopTimeUpdate_;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public int getStopTimeUpdateCount() {
return stopTimeUpdate_.size();
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
return stopTimeUpdate_.get(index);
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
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).
*
*
* optional uint64 timestamp = 4;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* 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.
*
*
* optional int32 delay = 5;
*/
public boolean hasDelay() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* 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;
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;
}
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);
unknownFields.writeTo(output);
}
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;
}
private static final long serialVersionUID = 0L;
@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(
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);
}
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);
}
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;
}
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();
}
}
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;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.TripUpdate build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
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;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
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);
}
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);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TripUpdate, ?> extension) {
return (Builder) super.clearExtension(extension);
}
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;
}
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;
}
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.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
if (tripBuilder_ == null) {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
} else {
return tripBuilder_.getMessage();
}
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trip_ = value;
onChanged();
} else {
tripBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
if (tripBuilder_ == null) {
trip_ = builderForValue.build();
onChanged();
} else {
tripBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
trip_ != null &&
trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
trip_ =
com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder(trip_).mergeFrom(value).buildPartial();
} else {
trip_ = value;
}
onChanged();
} else {
tripBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder clearTrip() {
if (tripBuilder_ == null) {
trip_ = null;
onChanged();
} else {
tripBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTripFieldBuilder().getBuilder();
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
if (tripBuilder_ != null) {
return tripBuilder_.getMessageOrBuilder();
} else {
return trip_ == null ?
com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
getTripFieldBuilder() {
if (tripBuilder_ == null) {
tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>(
getTrip(),
getParentForChildren(),
isClean());
trip_ = null;
}
return tripBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
onChanged();
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
onChanged();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
vehicle_ =
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder(vehicle_).mergeFrom(value).buildPartial();
} else {
vehicle_ = value;
}
onChanged();
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder clearVehicle() {
if (vehicleBuilder_ == null) {
vehicle_ = null;
onChanged();
} else {
vehicleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private java.util.List stopTimeUpdate_ =
java.util.Collections.emptyList();
private void ensureStopTimeUpdateIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
stopTimeUpdate_ = new java.util.ArrayList(stopTimeUpdate_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> stopTimeUpdateBuilder_;
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List getStopTimeUpdateList() {
if (stopTimeUpdateBuilder_ == null) {
return java.util.Collections.unmodifiableList(stopTimeUpdate_);
} else {
return stopTimeUpdateBuilder_.getMessageList();
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public int getStopTimeUpdateCount() {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.size();
} else {
return stopTimeUpdateBuilder_.getCount();
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.get(index);
} else {
return stopTimeUpdateBuilder_.getMessage(index);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder setStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.set(index, value);
onChanged();
} else {
stopTimeUpdateBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder setStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.set(index, builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(value);
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(index, value);
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(index, builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addAllStopTimeUpdate(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate> values) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, stopTimeUpdate_);
onChanged();
} else {
stopTimeUpdateBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder clearStopTimeUpdate() {
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdate_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
stopTimeUpdateBuilder_.clear();
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder removeStopTimeUpdate(int index) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.remove(index);
onChanged();
} else {
stopTimeUpdateBuilder_.remove(index);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder getStopTimeUpdateBuilder(
int index) {
return getStopTimeUpdateFieldBuilder().getBuilder(index);
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
int index) {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.get(index);
} else {
return stopTimeUpdateBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList() {
if (stopTimeUpdateBuilder_ != null) {
return stopTimeUpdateBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(stopTimeUpdate_);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder() {
return getStopTimeUpdateFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder(
int index) {
return getStopTimeUpdateFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List
getStopTimeUpdateBuilderList() {
return getStopTimeUpdateFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateFieldBuilder() {
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdateBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>(
stopTimeUpdate_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
stopTimeUpdate_ = null;
}
return stopTimeUpdateBuilder_;
}
private long timestamp_;
/**
*
* Moment at which the vehicle's real-time progress was measured. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* 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_;
}
/**
*
* 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 Builder setTimestamp(long value) {
bitField0_ |= 0x00000008;
timestamp_ = value;
onChanged();
return this;
}
/**
*
* Moment at which the vehicle's real-time progress was measured. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000008);
timestamp_ = 0L;
onChanged();
return this;
}
private int delay_;
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
*/
public boolean hasDelay() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* 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.
*
*
* optional int32 delay = 5;
*/
public Builder setDelay(int value) {
bitField0_ |= 0x00000010;
delay_ = value;
onChanged();
return this;
}
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
*/
public Builder clearDelay() {
bitField0_ = (bitField0_ & ~0x00000010);
delay_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
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() {
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;
}
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.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
boolean hasTrip();
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
boolean hasVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
boolean hasPosition();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
com.google.transit.realtime.GtfsRealtime.Position getPosition();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder();
/**
*
* 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;
*/
boolean hasCurrentStopSequence();
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
*/
int getCurrentStopSequence();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
boolean hasStopId();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
java.lang.String getStopId();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
com.google.protobuf.ByteString
getStopIdBytes();
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
boolean hasCurrentStatus();
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus();
/**
*
* 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;
*/
boolean hasTimestamp();
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
*/
long getTimestamp();
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
*/
boolean hasCongestionLevel();
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel();
/**
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
*/
boolean hasOccupancyStatus();
/**
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus();
}
/**
*
* Realtime positioning information for a given vehicle.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition}
*/
public static final class VehiclePosition extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
VehiclePosition> implements
// @@protoc_insertion_point(message_implements:transit_realtime.VehiclePosition)
VehiclePositionOrBuilder {
// Use VehiclePosition.newBuilder() to construct.
private VehiclePosition(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private VehiclePosition() {
currentStopSequence_ = 0;
stopId_ = "";
currentStatus_ = 2;
timestamp_ = 0L;
congestionLevel_ = 0;
occupancyStatus_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private VehiclePosition(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
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: {
com.google.transit.realtime.GtfsRealtime.Position.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = position_.toBuilder();
}
position_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.Position.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(position_);
position_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 24: {
bitField0_ |= 0x00000008;
currentStopSequence_ = input.readUInt32();
break;
}
case 32: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus value = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(4, rawValue);
} else {
bitField0_ |= 0x00000020;
currentStatus_ = rawValue;
}
break;
}
case 40: {
bitField0_ |= 0x00000040;
timestamp_ = input.readUInt64();
break;
}
case 48: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel value = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(6, rawValue);
} else {
bitField0_ |= 0x00000080;
congestionLevel_ = rawValue;
}
break;
}
case 58: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
stopId_ = bs;
break;
}
case 66: {
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 72: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(9, rawValue);
} else {
bitField0_ |= 0x00000100;
occupancyStatus_ = rawValue;
}
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_VehiclePosition_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
}
/**
* Protobuf enum {@code transit_realtime.VehiclePosition.VehicleStopStatus}
*/
public enum VehicleStopStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The vehicle is just about to arrive at the stop (on a stop
* display, the vehicle symbol typically flashes).
*
*
* INCOMING_AT = 0;
*/
INCOMING_AT(0),
/**
*
* The vehicle is standing at the stop.
*
*
* STOPPED_AT = 1;
*/
STOPPED_AT(1),
/**
*
* The vehicle has departed and is in transit to the next stop.
*
*
* IN_TRANSIT_TO = 2;
*/
IN_TRANSIT_TO(2),;
/**
*
* The vehicle is just about to arrive at the stop (on a stop
* display, the vehicle symbol typically flashes).
*
*
* INCOMING_AT = 0;
*/
public static final int INCOMING_AT_VALUE = 0;
/**
*
* The vehicle is standing at the stop.
*
*
* STOPPED_AT = 1;
*/
public static final int STOPPED_AT_VALUE = 1;
/**
*
* The vehicle has departed and is in transit to the next stop.
*
*
* IN_TRANSIT_TO = 2;
*/
public static final int IN_TRANSIT_TO_VALUE = 2;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static VehicleStopStatus valueOf(int value) {
return forNumber(value);
}
public static VehicleStopStatus forNumber(int value) {
switch (value) {
case 0:
return INCOMING_AT;
case 1:
return STOPPED_AT;
case 2:
return IN_TRANSIT_TO;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
VehicleStopStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public VehicleStopStatus findValueByNumber(int number) {
return VehicleStopStatus.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDescriptor().getEnumTypes().get(0);
}
private static final VehicleStopStatus[] VALUES = values();
public static VehicleStopStatus valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private VehicleStopStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.VehiclePosition.VehicleStopStatus)
}
/**
*
* Congestion level that is affecting this vehicle.
*
*
* Protobuf enum {@code transit_realtime.VehiclePosition.CongestionLevel}
*/
public enum CongestionLevel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN_CONGESTION_LEVEL = 0;
*/
UNKNOWN_CONGESTION_LEVEL(0),
/**
* RUNNING_SMOOTHLY = 1;
*/
RUNNING_SMOOTHLY(1),
/**
* STOP_AND_GO = 2;
*/
STOP_AND_GO(2),
/**
* CONGESTION = 3;
*/
CONGESTION(3),
/**
*
* People leaving their cars.
*
*
* SEVERE_CONGESTION = 4;
*/
SEVERE_CONGESTION(4),;
/**
* UNKNOWN_CONGESTION_LEVEL = 0;
*/
public static final int UNKNOWN_CONGESTION_LEVEL_VALUE = 0;
/**
* RUNNING_SMOOTHLY = 1;
*/
public static final int RUNNING_SMOOTHLY_VALUE = 1;
/**
* STOP_AND_GO = 2;
*/
public static final int STOP_AND_GO_VALUE = 2;
/**
* CONGESTION = 3;
*/
public static final int CONGESTION_VALUE = 3;
/**
*
* People leaving their cars.
*
*
* SEVERE_CONGESTION = 4;
*/
public static final int SEVERE_CONGESTION_VALUE = 4;
public final int getNumber() {
return value;
}
/**
* @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.
*
*
* Protobuf enum {@code transit_realtime.VehiclePosition.OccupancyStatus}
*/
public enum OccupancyStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The vehicle is considered empty by most measures, and has few or no
* passengers onboard, but is still accepting passengers.
*
*
* EMPTY = 0;
*/
EMPTY(0),
/**
*
* The vehicle has a relatively large percentage of seats available.
* What percentage of free seats out of the total seats available is to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
*
* MANY_SEATS_AVAILABLE = 1;
*/
MANY_SEATS_AVAILABLE(1),
/**
*
* The vehicle has a relatively small percentage of seats available.
* What percentage of free seats out of the total seats available is to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
*
* FEW_SEATS_AVAILABLE = 2;
*/
FEW_SEATS_AVAILABLE(2),
/**
*
* The vehicle can currently accommodate only standing passengers.
*
*
* STANDING_ROOM_ONLY = 3;
*/
STANDING_ROOM_ONLY(3),
/**
*
* The vehicle can currently accommodate only standing passengers
* and has limited space for them.
*
*
* CRUSHED_STANDING_ROOM_ONLY = 4;
*/
CRUSHED_STANDING_ROOM_ONLY(4),
/**
*
* The vehicle is considered full by most measures, but may still be
* allowing passengers to board.
*
*
* FULL = 5;
*/
FULL(5),
/**
*
* The vehicle is not accepting additional passengers.
*
*
* NOT_ACCEPTING_PASSENGERS = 6;
*/
NOT_ACCEPTING_PASSENGERS(6),;
/**
*
* The vehicle is considered empty by most measures, and has few or no
* passengers onboard, but is still accepting passengers.
*
*
* EMPTY = 0;
*/
public static final int EMPTY_VALUE = 0;
/**
*
* The vehicle has a relatively large percentage of seats available.
* What percentage of free seats out of the total seats available is to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
*
* MANY_SEATS_AVAILABLE = 1;
*/
public static final int MANY_SEATS_AVAILABLE_VALUE = 1;
/**
*
* The vehicle has a relatively small percentage of seats available.
* What percentage of free seats out of the total seats available is to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
*
* FEW_SEATS_AVAILABLE = 2;
*/
public static final int FEW_SEATS_AVAILABLE_VALUE = 2;
/**
*
* The vehicle can currently accommodate only standing passengers.
*
*
* STANDING_ROOM_ONLY = 3;
*/
public static final int STANDING_ROOM_ONLY_VALUE = 3;
/**
*
* The vehicle can currently accommodate only standing passengers
* and has limited space for them.
*
*
* CRUSHED_STANDING_ROOM_ONLY = 4;
*/
public static final int CRUSHED_STANDING_ROOM_ONLY_VALUE = 4;
/**
*
* The vehicle is considered full by most measures, but may still be
* allowing passengers to board.
*
*
* FULL = 5;
*/
public static final int FULL_VALUE = 5;
/**
*
* The vehicle is not accepting additional passengers.
*
*
* NOT_ACCEPTING_PASSENGERS = 6;
*/
public static final int NOT_ACCEPTING_PASSENGERS_VALUE = 6;
public final int getNumber() {
return value;
}
/**
* @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.TripDescriptor trip = 1;
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
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 = 8;
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
public static final int POSITION_FIELD_NUMBER = 2;
private com.google.transit.realtime.GtfsRealtime.Position position_;
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public boolean hasPosition() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
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.
*
*
* optional uint32 current_stop_sequence = 3;
*/
public boolean hasCurrentStopSequence() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* 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.
*
*
* optional string stop_id = 7;
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
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 CURRENT_STATUS_FIELD_NUMBER = 4;
private int currentStatus_;
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public boolean hasCurrentStatus() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.valueOf(currentStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
}
public static final int TIMESTAMP_FIELD_NUMBER = 5;
private long timestamp_;
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
*
* 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 long getTimestamp() {
return timestamp_;
}
public static final int CONGESTION_LEVEL_FIELD_NUMBER = 6;
private int congestionLevel_;
/**
* 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() {
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;
}
public static final int OCCUPANCY_STATUS_FIELD_NUMBER = 9;
private int occupancyStatus_;
/**
* 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() {
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;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (hasTrip()) {
if (!getTrip().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasPosition()) {
if (!getPosition().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
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());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(2, getPosition());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeUInt32(3, currentStopSequence_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeEnum(4, currentStatus_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeUInt64(5, timestamp_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeEnum(6, congestionLevel_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, stopId_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(8, getVehicle());
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeEnum(9, occupancyStatus_);
}
extensionWriter.writeUntil(2000, output);
unknownFields.writeTo(output);
}
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());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getPosition());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, currentStopSequence_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, currentStatus_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, timestamp_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, congestionLevel_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, stopId_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getVehicle());
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, occupancyStatus_);
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.VehiclePosition other = (com.google.transit.realtime.GtfsRealtime.VehiclePosition) obj;
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 && (hasPosition() == other.hasPosition());
if (hasPosition()) {
result = result && getPosition()
.equals(other.getPosition());
}
result = result && (hasCurrentStopSequence() == other.hasCurrentStopSequence());
if (hasCurrentStopSequence()) {
result = result && (getCurrentStopSequence()
== other.getCurrentStopSequence());
}
result = result && (hasStopId() == other.hasStopId());
if (hasStopId()) {
result = result && getStopId()
.equals(other.getStopId());
}
result = result && (hasCurrentStatus() == other.hasCurrentStatus());
if (hasCurrentStatus()) {
result = result && currentStatus_ == other.currentStatus_;
}
result = result && (hasTimestamp() == other.hasTimestamp());
if (hasTimestamp()) {
result = result && (getTimestamp()
== other.getTimestamp());
}
result = result && (hasCongestionLevel() == other.hasCongestionLevel());
if (hasCongestionLevel()) {
result = result && congestionLevel_ == other.congestionLevel_;
}
result = result && (hasOccupancyStatus() == other.hasOccupancyStatus());
if (hasOccupancyStatus()) {
result = result && occupancyStatus_ == other.occupancyStatus_;
}
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 (hasPosition()) {
hash = (37 * hash) + POSITION_FIELD_NUMBER;
hash = (53 * hash) + getPosition().hashCode();
}
if (hasCurrentStopSequence()) {
hash = (37 * hash) + CURRENT_STOP_SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentStopSequence();
}
if (hasStopId()) {
hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
hash = (53 * hash) + getStopId().hashCode();
}
if (hasCurrentStatus()) {
hash = (37 * hash) + CURRENT_STATUS_FIELD_NUMBER;
hash = (53 * hash) + currentStatus_;
}
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
}
if (hasCongestionLevel()) {
hash = (37 * hash) + CONGESTION_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + congestionLevel_;
}
if (hasOccupancyStatus()) {
hash = (37 * hash) + OCCUPANCY_STATUS_FIELD_NUMBER;
hash = (53 * hash) + occupancyStatus_;
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehiclePosition prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 positioning information for a given vehicle.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.VehiclePosition)
com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.VehiclePosition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTripFieldBuilder();
getVehicleFieldBuilder();
getPositionFieldBuilder();
}
}
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 (positionBuilder_ == null) {
position_ = null;
} else {
positionBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
currentStopSequence_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
stopId_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
currentStatus_ = 2;
bitField0_ = (bitField0_ & ~0x00000020);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000040);
congestionLevel_ = 0;
bitField0_ = (bitField0_ & ~0x00000080);
occupancyStatus_ = 0;
bitField0_ = (bitField0_ & ~0x00000100);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.VehiclePosition build() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.transit.realtime.GtfsRealtime.VehiclePosition buildPartial() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition result = new com.google.transit.realtime.GtfsRealtime.VehiclePosition(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 (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (positionBuilder_ == null) {
result.position_ = position_;
} else {
result.position_ = positionBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.currentStopSequence_ = currentStopSequence_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.stopId_ = stopId_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.currentStatus_ = currentStatus_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040;
}
result.timestamp_ = timestamp_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000080;
}
result.congestionLevel_ = congestionLevel_;
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000100;
}
result.occupancyStatus_ = occupancyStatus_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, java.util.List> extension,
int index, Type value) {
return (Builder) super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, java.util.List> extension,
Type value) {
return (Builder) super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, ?> extension) {
return (Builder) super.clearExtension(extension);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehiclePosition) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehiclePosition other) {
if (other == com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) return this;
if (other.hasTrip()) {
mergeTrip(other.getTrip());
}
if (other.hasVehicle()) {
mergeVehicle(other.getVehicle());
}
if (other.hasPosition()) {
mergePosition(other.getPosition());
}
if (other.hasCurrentStopSequence()) {
setCurrentStopSequence(other.getCurrentStopSequence());
}
if (other.hasStopId()) {
bitField0_ |= 0x00000010;
stopId_ = other.stopId_;
onChanged();
}
if (other.hasCurrentStatus()) {
setCurrentStatus(other.getCurrentStatus());
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasCongestionLevel()) {
setCongestionLevel(other.getCongestionLevel());
}
if (other.hasOccupancyStatus()) {
setOccupancyStatus(other.getOccupancyStatus());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
if (hasTrip()) {
if (!getTrip().isInitialized()) {
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
return false;
}
}
if (hasPosition()) {
if (!getPosition().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.transit.realtime.GtfsRealtime.VehiclePosition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.VehiclePosition) 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 vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
if (tripBuilder_ == null) {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
} else {
return tripBuilder_.getMessage();
}
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trip_ = value;
onChanged();
} else {
tripBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
if (tripBuilder_ == null) {
trip_ = builderForValue.build();
onChanged();
} else {
tripBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
trip_ != null &&
trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
trip_ =
com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder(trip_).mergeFrom(value).buildPartial();
} else {
trip_ = value;
}
onChanged();
} else {
tripBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder clearTrip() {
if (tripBuilder_ == null) {
trip_ = null;
onChanged();
} else {
tripBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTripFieldBuilder().getBuilder();
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
if (tripBuilder_ != null) {
return tripBuilder_.getMessageOrBuilder();
} else {
return trip_ == null ?
com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
getTripFieldBuilder() {
if (tripBuilder_ == null) {
tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>(
getTrip(),
getParentForChildren(),
isClean());
trip_ = null;
}
return tripBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
onChanged();
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
onChanged();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
vehicle_ =
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder(vehicle_).mergeFrom(value).buildPartial();
} else {
vehicle_ = value;
}
onChanged();
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder clearVehicle() {
if (vehicleBuilder_ == null) {
vehicle_ = null;
onChanged();
} else {
vehicleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.Position position_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder> positionBuilder_;
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public boolean hasPosition() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
if (positionBuilder_ == null) {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
} else {
return positionBuilder_.getMessage();
}
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder setPosition(com.google.transit.realtime.GtfsRealtime.Position value) {
if (positionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
position_ = value;
onChanged();
} else {
positionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder setPosition(
com.google.transit.realtime.GtfsRealtime.Position.Builder builderForValue) {
if (positionBuilder_ == null) {
position_ = builderForValue.build();
onChanged();
} else {
positionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder mergePosition(com.google.transit.realtime.GtfsRealtime.Position value) {
if (positionBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
position_ != null &&
position_ != com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) {
position_ =
com.google.transit.realtime.GtfsRealtime.Position.newBuilder(position_).mergeFrom(value).buildPartial();
} else {
position_ = value;
}
onChanged();
} else {
positionBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder clearPosition() {
if (positionBuilder_ == null) {
position_ = null;
onChanged();
} else {
positionBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.Position.Builder getPositionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPositionFieldBuilder().getBuilder();
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
if (positionBuilder_ != null) {
return positionBuilder_.getMessageOrBuilder();
} else {
return position_ == null ?
com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>
getPositionFieldBuilder() {
if (positionBuilder_ == null) {
positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>(
getPosition(),
getParentForChildren(),
isClean());
position_ = null;
}
return positionBuilder_;
}
private int currentStopSequence_;
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
*/
public boolean hasCurrentStopSequence() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* 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.
*
*
* optional uint32 current_stop_sequence = 3;
*/
public Builder setCurrentStopSequence(int value) {
bitField0_ |= 0x00000008;
currentStopSequence_ = value;
onChanged();
return this;
}
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
*/
public Builder clearCurrentStopSequence() {
bitField0_ = (bitField0_ & ~0x00000008);
currentStopSequence_ = 0;
onChanged();
return this;
}
private java.lang.Object stopId_ = "";
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public Builder setStopId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
stopId_ = value;
onChanged();
return this;
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public Builder clearStopId() {
bitField0_ = (bitField0_ & ~0x00000010);
stopId_ = getDefaultInstance().getStopId();
onChanged();
return this;
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
*/
public Builder setStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
stopId_ = value;
onChanged();
return this;
}
private int currentStatus_ = 2;
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public boolean hasCurrentStatus() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.valueOf(currentStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public Builder setCurrentStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
currentStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
*/
public Builder clearCurrentStatus() {
bitField0_ = (bitField0_ & ~0x00000020);
currentStatus_ = 2;
onChanged();
return this;
}
private long timestamp_;
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
*
* 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 long getTimestamp() {
return timestamp_;
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
*/
public Builder setTimestamp(long value) {
bitField0_ |= 0x00000040;
timestamp_ = value;
onChanged();
return this;
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
*/
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() {
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() {
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;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
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() {
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;
}
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.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
java.util.List
getActivePeriodList();
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index);
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
int getActivePeriodCount();
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
getActivePeriodOrBuilderList();
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
int index);
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
java.util.List
getInformedEntityList();
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index);
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
int getInformedEntityCount();
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
getInformedEntityOrBuilderList();
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
int index);
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
boolean hasCause();
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause();
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
boolean hasEffect();
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
boolean hasUrl();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
boolean hasHeaderText();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
boolean hasDescriptionText();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder();
}
/**
*
* An alert, indicating some sort of incident in the public transit network.
*
*
* Protobuf type {@code transit_realtime.Alert}
*/
public static final class Alert extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Alert> implements
// @@protoc_insertion_point(message_implements:transit_realtime.Alert)
AlertOrBuilder {
// Use Alert.newBuilder() to construct.
private Alert(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Alert() {
activePeriod_ = java.util.Collections.emptyList();
informedEntity_ = java.util.Collections.emptyList();
cause_ = 1;
effect_ = 8;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Alert(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
activePeriod_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
activePeriod_.add(
input.readMessage(com.google.transit.realtime.GtfsRealtime.TimeRange.PARSER, extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
informedEntity_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
informedEntity_.add(
input.readMessage(com.google.transit.realtime.GtfsRealtime.EntitySelector.PARSER, extensionRegistry));
break;
}
case 48: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.Alert.Cause value = com.google.transit.realtime.GtfsRealtime.Alert.Cause.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(6, rawValue);
} else {
bitField0_ |= 0x00000001;
cause_ = rawValue;
}
break;
}
case 56: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.Alert.Effect value = com.google.transit.realtime.GtfsRealtime.Alert.Effect.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(7, rawValue);
} else {
bitField0_ |= 0x00000002;
effect_ = rawValue;
}
break;
}
case 66: {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = url_.toBuilder();
}
url_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TranslatedString.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(url_);
url_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 82: {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = headerText_.toBuilder();
}
headerText_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TranslatedString.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(headerText_);
headerText_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 90: {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = descriptionText_.toBuilder();
}
descriptionText_ = input.readMessage(com.google.transit.realtime.GtfsRealtime.TranslatedString.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(descriptionText_);
descriptionText_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
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_ & 0x00000001) == 0x00000001)) {
activePeriod_ = java.util.Collections.unmodifiableList(activePeriod_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
informedEntity_ = java.util.Collections.unmodifiableList(informedEntity_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
}
/**
*
* Cause of this alert.
*
*
* Protobuf enum {@code transit_realtime.Alert.Cause}
*/
public enum Cause
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN_CAUSE = 1;
*/
UNKNOWN_CAUSE(1),
/**
*
* Not machine-representable.
*
*
* OTHER_CAUSE = 2;
*/
OTHER_CAUSE(2),
/**
* TECHNICAL_PROBLEM = 3;
*/
TECHNICAL_PROBLEM(3),
/**
*
* Public transit agency employees stopped working.
*
*
* STRIKE = 4;
*/
STRIKE(4),
/**
*
* People are blocking the streets.
*
*
* DEMONSTRATION = 5;
*/
DEMONSTRATION(5),
/**
* ACCIDENT = 6;
*/
ACCIDENT(6),
/**
* HOLIDAY = 7;
*/
HOLIDAY(7),
/**
* WEATHER = 8;
*/
WEATHER(8),
/**
* MAINTENANCE = 9;
*/
MAINTENANCE(9),
/**
* CONSTRUCTION = 10;
*/
CONSTRUCTION(10),
/**
* POLICE_ACTIVITY = 11;
*/
POLICE_ACTIVITY(11),
/**
* MEDICAL_EMERGENCY = 12;
*/
MEDICAL_EMERGENCY(12),;
/**
* UNKNOWN_CAUSE = 1;
*/
public static final int UNKNOWN_CAUSE_VALUE = 1;
/**
*
* Not machine-representable.
*
*
* OTHER_CAUSE = 2;
*/
public static final int OTHER_CAUSE_VALUE = 2;
/**
* TECHNICAL_PROBLEM = 3;
*/
public static final int TECHNICAL_PROBLEM_VALUE = 3;
/**
*
* Public transit agency employees stopped working.
*
*
* STRIKE = 4;
*/
public static final int STRIKE_VALUE = 4;
/**
*
* People are blocking the streets.
*
*
* DEMONSTRATION = 5;
*/
public static final int DEMONSTRATION_VALUE = 5;
/**
* ACCIDENT = 6;
*/
public static final int ACCIDENT_VALUE = 6;
/**
* HOLIDAY = 7;
*/
public static final int HOLIDAY_VALUE = 7;
/**
* WEATHER = 8;
*/
public static final int WEATHER_VALUE = 8;
/**
* MAINTENANCE = 9;
*/
public static final int MAINTENANCE_VALUE = 9;
/**
* CONSTRUCTION = 10;
*/
public static final int CONSTRUCTION_VALUE = 10;
/**
* POLICE_ACTIVITY = 11;
*/
public static final int POLICE_ACTIVITY_VALUE = 11;
/**
* MEDICAL_EMERGENCY = 12;
*/
public static final int MEDICAL_EMERGENCY_VALUE = 12;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Cause valueOf(int value) {
return forNumber(value);
}
public static Cause forNumber(int value) {
switch (value) {
case 1:
return UNKNOWN_CAUSE;
case 2:
return OTHER_CAUSE;
case 3:
return TECHNICAL_PROBLEM;
case 4:
return STRIKE;
case 5:
return DEMONSTRATION;
case 6:
return ACCIDENT;
case 7:
return HOLIDAY;
case 8:
return WEATHER;
case 9:
return MAINTENANCE;
case 10:
return CONSTRUCTION;
case 11:
return POLICE_ACTIVITY;
case 12:
return MEDICAL_EMERGENCY;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Cause> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Cause findValueByNumber(int number) {
return Cause.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(0);
}
private static final Cause[] VALUES = values();
public static Cause valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Cause(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.Alert.Cause)
}
/**
*
* What is the effect of this problem on the affected entity.
*
*
* Protobuf enum {@code transit_realtime.Alert.Effect}
*/
public enum Effect
implements com.google.protobuf.ProtocolMessageEnum {
/**
* NO_SERVICE = 1;
*/
NO_SERVICE(1),
/**
* REDUCED_SERVICE = 2;
*/
REDUCED_SERVICE(2),
/**
*
* We don't care about INsignificant delays: they are hard to detect, have
* little impact on the user, and would clutter the results as they are too
* frequent.
*
*
* SIGNIFICANT_DELAYS = 3;
*/
SIGNIFICANT_DELAYS(3),
/**
* DETOUR = 4;
*/
DETOUR(4),
/**
* ADDITIONAL_SERVICE = 5;
*/
ADDITIONAL_SERVICE(5),
/**
* MODIFIED_SERVICE = 6;
*/
MODIFIED_SERVICE(6),
/**
* OTHER_EFFECT = 7;
*/
OTHER_EFFECT(7),
/**
* UNKNOWN_EFFECT = 8;
*/
UNKNOWN_EFFECT(8),
/**
* STOP_MOVED = 9;
*/
STOP_MOVED(9),;
/**
* NO_SERVICE = 1;
*/
public static final int NO_SERVICE_VALUE = 1;
/**
* REDUCED_SERVICE = 2;
*/
public static final int REDUCED_SERVICE_VALUE = 2;
/**
*
* We don't care about INsignificant delays: they are hard to detect, have
* little impact on the user, and would clutter the results as they are too
* frequent.
*
*
* SIGNIFICANT_DELAYS = 3;
*/
public static final int SIGNIFICANT_DELAYS_VALUE = 3;
/**
* DETOUR = 4;
*/
public static final int DETOUR_VALUE = 4;
/**
* ADDITIONAL_SERVICE = 5;
*/
public static final int ADDITIONAL_SERVICE_VALUE = 5;
/**
* MODIFIED_SERVICE = 6;
*/
public static final int MODIFIED_SERVICE_VALUE = 6;
/**
* OTHER_EFFECT = 7;
*/
public static final int OTHER_EFFECT_VALUE = 7;
/**
* UNKNOWN_EFFECT = 8;
*/
public static final int UNKNOWN_EFFECT_VALUE = 8;
/**
* STOP_MOVED = 9;
*/
public static final int STOP_MOVED_VALUE = 9;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Effect valueOf(int value) {
return forNumber(value);
}
public static Effect forNumber(int value) {
switch (value) {
case 1:
return NO_SERVICE;
case 2:
return REDUCED_SERVICE;
case 3:
return SIGNIFICANT_DELAYS;
case 4:
return DETOUR;
case 5:
return ADDITIONAL_SERVICE;
case 6:
return MODIFIED_SERVICE;
case 7:
return OTHER_EFFECT;
case 8:
return UNKNOWN_EFFECT;
case 9:
return STOP_MOVED;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Effect> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Effect findValueByNumber(int number) {
return Effect.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(1);
}
private static final Effect[] VALUES = values();
public static Effect valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Effect(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.Alert.Effect)
}
private int bitField0_;
public static final int ACTIVE_PERIOD_FIELD_NUMBER = 1;
private java.util.List activePeriod_;
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public java.util.List getActivePeriodList() {
return activePeriod_;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
getActivePeriodOrBuilderList() {
return activePeriod_;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public int getActivePeriodCount() {
return activePeriod_.size();
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index) {
return activePeriod_.get(index);
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
int index) {
return activePeriod_.get(index);
}
public static final int INFORMED_ENTITY_FIELD_NUMBER = 5;
private java.util.List informedEntity_;
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public java.util.List getInformedEntityList() {
return informedEntity_;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
getInformedEntityOrBuilderList() {
return informedEntity_;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public int getInformedEntityCount() {
return informedEntity_.size();
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index) {
return informedEntity_.get(index);
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
int index) {
return informedEntity_.get(index);
}
public static final int CAUSE_FIELD_NUMBER = 6;
private int cause_;
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public boolean hasCause() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause() {
com.google.transit.realtime.GtfsRealtime.Alert.Cause result = com.google.transit.realtime.GtfsRealtime.Alert.Cause.valueOf(cause_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Cause.UNKNOWN_CAUSE : result;
}
public static final int EFFECT_FIELD_NUMBER = 7;
private int effect_;
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public boolean hasEffect() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect() {
com.google.transit.realtime.GtfsRealtime.Alert.Effect result = com.google.transit.realtime.GtfsRealtime.Alert.Effect.valueOf(effect_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Effect.UNKNOWN_EFFECT : result;
}
public static final int URL_FIELD_NUMBER = 8;
private com.google.transit.realtime.GtfsRealtime.TranslatedString url_;
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public boolean hasUrl() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl() {
return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder() {
return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
}
public static final int HEADER_TEXT_FIELD_NUMBER = 10;
private com.google.transit.realtime.GtfsRealtime.TranslatedString headerText_;
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public boolean hasHeaderText() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText() {
return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder() {
return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
}
public static final int DESCRIPTION_TEXT_FIELD_NUMBER = 11;
private com.google.transit.realtime.GtfsRealtime.TranslatedString descriptionText_;
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public boolean hasDescriptionText() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText() {
return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder() {
return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
for (int i = 0; i < getActivePeriodCount(); i++) {
if (!getActivePeriod(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getInformedEntityCount(); i++) {
if (!getInformedEntity(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasUrl()) {
if (!getUrl().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasHeaderText()) {
if (!getHeaderText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasDescriptionText()) {
if (!getDescriptionText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
for (int i = 0; i < activePeriod_.size(); i++) {
output.writeMessage(1, activePeriod_.get(i));
}
for (int i = 0; i < informedEntity_.size(); i++) {
output.writeMessage(5, informedEntity_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(6, cause_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeEnum(7, effect_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(8, getUrl());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(10, getHeaderText());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(11, getDescriptionText());
}
extensionWriter.writeUntil(2000, output);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < activePeriod_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, activePeriod_.get(i));
}
for (int i = 0; i < informedEntity_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, informedEntity_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, cause_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, effect_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getUrl());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getHeaderText());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getDescriptionText());
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Alert)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.Alert other = (com.google.transit.realtime.GtfsRealtime.Alert) obj;
boolean result = true;
result = result && getActivePeriodList()
.equals(other.getActivePeriodList());
result = result && getInformedEntityList()
.equals(other.getInformedEntityList());
result = result && (hasCause() == other.hasCause());
if (hasCause()) {
result = result && cause_ == other.cause_;
}
result = result && (hasEffect() == other.hasEffect());
if (hasEffect()) {
result = result && effect_ == other.effect_;
}
result = result && (hasUrl() == other.hasUrl());
if (hasUrl()) {
result = result && getUrl()
.equals(other.getUrl());
}
result = result && (hasHeaderText() == other.hasHeaderText());
if (hasHeaderText()) {
result = result && getHeaderText()
.equals(other.getHeaderText());
}
result = result && (hasDescriptionText() == other.hasDescriptionText());
if (hasDescriptionText()) {
result = result && getDescriptionText()
.equals(other.getDescriptionText());
}
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 (getActivePeriodCount() > 0) {
hash = (37 * hash) + ACTIVE_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getActivePeriodList().hashCode();
}
if (getInformedEntityCount() > 0) {
hash = (37 * hash) + INFORMED_ENTITY_FIELD_NUMBER;
hash = (53 * hash) + getInformedEntityList().hashCode();
}
if (hasCause()) {
hash = (37 * hash) + CAUSE_FIELD_NUMBER;
hash = (53 * hash) + cause_;
}
if (hasEffect()) {
hash = (37 * hash) + EFFECT_FIELD_NUMBER;
hash = (53 * hash) + effect_;
}
if (hasUrl()) {
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
}
if (hasHeaderText()) {
hash = (37 * hash) + HEADER_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getHeaderText().hashCode();
}
if (hasDescriptionText()) {
hash = (37 * hash) + DESCRIPTION_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getDescriptionText().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Alert prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* An alert, indicating some sort of incident in the public transit network.
*
*
* Protobuf type {@code transit_realtime.Alert}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.Alert, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.Alert)
com.google.transit.realtime.GtfsRealtime.AlertOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.Alert.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getActivePeriodFieldBuilder();
getInformedEntityFieldBuilder();
getUrlFieldBuilder();
getHeaderTextFieldBuilder();
getDescriptionTextFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (activePeriodBuilder_ == null) {
activePeriod_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
activePeriodBuilder_.clear();
}
if (informedEntityBuilder_ == null) {
informedEntity_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
informedEntityBuilder_.clear();
}
cause_ = 1;
bitField0_ = (bitField0_ & ~0x00000004);
effect_ = 8;
bitField0_ = (bitField0_ & ~0x00000008);
if (urlBuilder_ == null) {
url_ = null;
} else {
urlBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (headerTextBuilder_ == null) {
headerText_ = null;
} else {
headerTextBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
if (descriptionTextBuilder_ == null) {
descriptionText_ = null;
} else {
descriptionTextBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.Alert build() {
com.google.transit.realtime.GtfsRealtime.Alert result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.transit.realtime.GtfsRealtime.Alert buildPartial() {
com.google.transit.realtime.GtfsRealtime.Alert result = new com.google.transit.realtime.GtfsRealtime.Alert(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (activePeriodBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
activePeriod_ = java.util.Collections.unmodifiableList(activePeriod_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.activePeriod_ = activePeriod_;
} else {
result.activePeriod_ = activePeriodBuilder_.build();
}
if (informedEntityBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
informedEntity_ = java.util.Collections.unmodifiableList(informedEntity_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.informedEntity_ = informedEntity_;
} else {
result.informedEntity_ = informedEntityBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000001;
}
result.cause_ = cause_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000002;
}
result.effect_ = effect_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000004;
}
if (urlBuilder_ == null) {
result.url_ = url_;
} else {
result.url_ = urlBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000008;
}
if (headerTextBuilder_ == null) {
result.headerText_ = headerText_;
} else {
result.headerText_ = headerTextBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000010;
}
if (descriptionTextBuilder_ == null) {
result.descriptionText_ = descriptionText_;
} else {
result.descriptionText_ = descriptionTextBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Alert, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Alert, java.util.List> extension,
int index, Type value) {
return (Builder) super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Alert, java.util.List> extension,
Type value) {
return (Builder) super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Alert, ?> extension) {
return (Builder) super.clearExtension(extension);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.Alert) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.Alert) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Alert other) {
if (other == com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) return this;
if (activePeriodBuilder_ == null) {
if (!other.activePeriod_.isEmpty()) {
if (activePeriod_.isEmpty()) {
activePeriod_ = other.activePeriod_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureActivePeriodIsMutable();
activePeriod_.addAll(other.activePeriod_);
}
onChanged();
}
} else {
if (!other.activePeriod_.isEmpty()) {
if (activePeriodBuilder_.isEmpty()) {
activePeriodBuilder_.dispose();
activePeriodBuilder_ = null;
activePeriod_ = other.activePeriod_;
bitField0_ = (bitField0_ & ~0x00000001);
activePeriodBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getActivePeriodFieldBuilder() : null;
} else {
activePeriodBuilder_.addAllMessages(other.activePeriod_);
}
}
}
if (informedEntityBuilder_ == null) {
if (!other.informedEntity_.isEmpty()) {
if (informedEntity_.isEmpty()) {
informedEntity_ = other.informedEntity_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureInformedEntityIsMutable();
informedEntity_.addAll(other.informedEntity_);
}
onChanged();
}
} else {
if (!other.informedEntity_.isEmpty()) {
if (informedEntityBuilder_.isEmpty()) {
informedEntityBuilder_.dispose();
informedEntityBuilder_ = null;
informedEntity_ = other.informedEntity_;
bitField0_ = (bitField0_ & ~0x00000002);
informedEntityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getInformedEntityFieldBuilder() : null;
} else {
informedEntityBuilder_.addAllMessages(other.informedEntity_);
}
}
}
if (other.hasCause()) {
setCause(other.getCause());
}
if (other.hasEffect()) {
setEffect(other.getEffect());
}
if (other.hasUrl()) {
mergeUrl(other.getUrl());
}
if (other.hasHeaderText()) {
mergeHeaderText(other.getHeaderText());
}
if (other.hasDescriptionText()) {
mergeDescriptionText(other.getDescriptionText());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
for (int i = 0; i < getActivePeriodCount(); i++) {
if (!getActivePeriod(i).isInitialized()) {
return false;
}
}
for (int i = 0; i < getInformedEntityCount(); i++) {
if (!getInformedEntity(i).isInitialized()) {
return false;
}
}
if (hasUrl()) {
if (!getUrl().isInitialized()) {
return false;
}
}
if (hasHeaderText()) {
if (!getHeaderText().isInitialized()) {
return false;
}
}
if (hasDescriptionText()) {
if (!getDescriptionText().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.transit.realtime.GtfsRealtime.Alert parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.Alert) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List activePeriod_ =
java.util.Collections.emptyList();
private void ensureActivePeriodIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
activePeriod_ = new java.util.ArrayList(activePeriod_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TimeRange, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder, com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder> activePeriodBuilder_;
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public java.util.List getActivePeriodList() {
if (activePeriodBuilder_ == null) {
return java.util.Collections.unmodifiableList(activePeriod_);
} else {
return activePeriodBuilder_.getMessageList();
}
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public int getActivePeriodCount() {
if (activePeriodBuilder_ == null) {
return activePeriod_.size();
} else {
return activePeriodBuilder_.getCount();
}
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index) {
if (activePeriodBuilder_ == null) {
return activePeriod_.get(index);
} else {
return activePeriodBuilder_.getMessage(index);
}
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder setActivePeriod(
int index, com.google.transit.realtime.GtfsRealtime.TimeRange value) {
if (activePeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActivePeriodIsMutable();
activePeriod_.set(index, value);
onChanged();
} else {
activePeriodBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder setActivePeriod(
int index, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder builderForValue) {
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
activePeriod_.set(index, builderForValue.build());
onChanged();
} else {
activePeriodBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder addActivePeriod(com.google.transit.realtime.GtfsRealtime.TimeRange value) {
if (activePeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActivePeriodIsMutable();
activePeriod_.add(value);
onChanged();
} else {
activePeriodBuilder_.addMessage(value);
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder addActivePeriod(
int index, com.google.transit.realtime.GtfsRealtime.TimeRange value) {
if (activePeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureActivePeriodIsMutable();
activePeriod_.add(index, value);
onChanged();
} else {
activePeriodBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder addActivePeriod(
com.google.transit.realtime.GtfsRealtime.TimeRange.Builder builderForValue) {
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
activePeriod_.add(builderForValue.build());
onChanged();
} else {
activePeriodBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder addActivePeriod(
int index, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder builderForValue) {
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
activePeriod_.add(index, builderForValue.build());
onChanged();
} else {
activePeriodBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder addAllActivePeriod(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TimeRange> values) {
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, activePeriod_);
onChanged();
} else {
activePeriodBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder clearActivePeriod() {
if (activePeriodBuilder_ == null) {
activePeriod_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
activePeriodBuilder_.clear();
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public Builder removeActivePeriod(int index) {
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
activePeriod_.remove(index);
onChanged();
} else {
activePeriodBuilder_.remove(index);
}
return this;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRange.Builder getActivePeriodBuilder(
int index) {
return getActivePeriodFieldBuilder().getBuilder(index);
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
int index) {
if (activePeriodBuilder_ == null) {
return activePeriod_.get(index);
} else {
return activePeriodBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
getActivePeriodOrBuilderList() {
if (activePeriodBuilder_ != null) {
return activePeriodBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(activePeriod_);
}
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRange.Builder addActivePeriodBuilder() {
return getActivePeriodFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance());
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TimeRange.Builder addActivePeriodBuilder(
int index) {
return getActivePeriodFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance());
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
public java.util.List
getActivePeriodBuilderList() {
return getActivePeriodFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TimeRange, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder, com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
getActivePeriodFieldBuilder() {
if (activePeriodBuilder_ == null) {
activePeriodBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TimeRange, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder, com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>(
activePeriod_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
activePeriod_ = null;
}
return activePeriodBuilder_;
}
private java.util.List informedEntity_ =
java.util.Collections.emptyList();
private void ensureInformedEntityIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
informedEntity_ = new java.util.ArrayList(informedEntity_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.EntitySelector, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder, com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder> informedEntityBuilder_;
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public java.util.List getInformedEntityList() {
if (informedEntityBuilder_ == null) {
return java.util.Collections.unmodifiableList(informedEntity_);
} else {
return informedEntityBuilder_.getMessageList();
}
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public int getInformedEntityCount() {
if (informedEntityBuilder_ == null) {
return informedEntity_.size();
} else {
return informedEntityBuilder_.getCount();
}
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index) {
if (informedEntityBuilder_ == null) {
return informedEntity_.get(index);
} else {
return informedEntityBuilder_.getMessage(index);
}
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder setInformedEntity(
int index, com.google.transit.realtime.GtfsRealtime.EntitySelector value) {
if (informedEntityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInformedEntityIsMutable();
informedEntity_.set(index, value);
onChanged();
} else {
informedEntityBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder setInformedEntity(
int index, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder builderForValue) {
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
informedEntity_.set(index, builderForValue.build());
onChanged();
} else {
informedEntityBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder addInformedEntity(com.google.transit.realtime.GtfsRealtime.EntitySelector value) {
if (informedEntityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInformedEntityIsMutable();
informedEntity_.add(value);
onChanged();
} else {
informedEntityBuilder_.addMessage(value);
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder addInformedEntity(
int index, com.google.transit.realtime.GtfsRealtime.EntitySelector value) {
if (informedEntityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInformedEntityIsMutable();
informedEntity_.add(index, value);
onChanged();
} else {
informedEntityBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder addInformedEntity(
com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder builderForValue) {
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
informedEntity_.add(builderForValue.build());
onChanged();
} else {
informedEntityBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder addInformedEntity(
int index, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder builderForValue) {
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
informedEntity_.add(index, builderForValue.build());
onChanged();
} else {
informedEntityBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder addAllInformedEntity(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.EntitySelector> values) {
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, informedEntity_);
onChanged();
} else {
informedEntityBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder clearInformedEntity() {
if (informedEntityBuilder_ == null) {
informedEntity_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
informedEntityBuilder_.clear();
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public Builder removeInformedEntity(int index) {
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
informedEntity_.remove(index);
onChanged();
} else {
informedEntityBuilder_.remove(index);
}
return this;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder getInformedEntityBuilder(
int index) {
return getInformedEntityFieldBuilder().getBuilder(index);
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
int index) {
if (informedEntityBuilder_ == null) {
return informedEntity_.get(index);
} else {
return informedEntityBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
getInformedEntityOrBuilderList() {
if (informedEntityBuilder_ != null) {
return informedEntityBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(informedEntity_);
}
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder addInformedEntityBuilder() {
return getInformedEntityFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance());
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder addInformedEntityBuilder(
int index) {
return getInformedEntityFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance());
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
public java.util.List
getInformedEntityBuilderList() {
return getInformedEntityFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.EntitySelector, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder, com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
getInformedEntityFieldBuilder() {
if (informedEntityBuilder_ == null) {
informedEntityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.EntitySelector, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder, com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>(
informedEntity_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
informedEntity_ = null;
}
return informedEntityBuilder_;
}
private int cause_ = 1;
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public boolean hasCause() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause() {
com.google.transit.realtime.GtfsRealtime.Alert.Cause result = com.google.transit.realtime.GtfsRealtime.Alert.Cause.valueOf(cause_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Cause.UNKNOWN_CAUSE : result;
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public Builder setCause(com.google.transit.realtime.GtfsRealtime.Alert.Cause value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
cause_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
*/
public Builder clearCause() {
bitField0_ = (bitField0_ & ~0x00000004);
cause_ = 1;
onChanged();
return this;
}
private int effect_ = 8;
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public boolean hasEffect() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect() {
com.google.transit.realtime.GtfsRealtime.Alert.Effect result = com.google.transit.realtime.GtfsRealtime.Alert.Effect.valueOf(effect_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Effect.UNKNOWN_EFFECT : result;
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public Builder setEffect(com.google.transit.realtime.GtfsRealtime.Alert.Effect value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
effect_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
*/
public Builder clearEffect() {
bitField0_ = (bitField0_ & ~0x00000008);
effect_ = 8;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString url_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> urlBuilder_;
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public boolean hasUrl() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl() {
if (urlBuilder_ == null) {
return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
} else {
return urlBuilder_.getMessage();
}
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public Builder setUrl(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (urlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
} else {
urlBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public Builder setUrl(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (urlBuilder_ == null) {
url_ = builderForValue.build();
onChanged();
} else {
urlBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public Builder mergeUrl(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (urlBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
url_ != null &&
url_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
url_ =
com.google.transit.realtime.GtfsRealtime.TranslatedString.newBuilder(url_).mergeFrom(value).buildPartial();
} else {
url_ = value;
}
onChanged();
} else {
urlBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public Builder clearUrl() {
if (urlBuilder_ == null) {
url_ = null;
onChanged();
} else {
urlBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getUrlBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getUrlFieldBuilder().getBuilder();
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder() {
if (urlBuilder_ != null) {
return urlBuilder_.getMessageOrBuilder();
} else {
return url_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
}
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getUrlFieldBuilder() {
if (urlBuilder_ == null) {
urlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getUrl(),
getParentForChildren(),
isClean());
url_ = null;
}
return urlBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString headerText_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> headerTextBuilder_;
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public boolean hasHeaderText() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText() {
if (headerTextBuilder_ == null) {
return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
} else {
return headerTextBuilder_.getMessage();
}
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public Builder setHeaderText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (headerTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
headerText_ = value;
onChanged();
} else {
headerTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public Builder setHeaderText(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (headerTextBuilder_ == null) {
headerText_ = builderForValue.build();
onChanged();
} else {
headerTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public Builder mergeHeaderText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (headerTextBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020) &&
headerText_ != null &&
headerText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
headerText_ =
com.google.transit.realtime.GtfsRealtime.TranslatedString.newBuilder(headerText_).mergeFrom(value).buildPartial();
} else {
headerText_ = value;
}
onChanged();
} else {
headerTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public Builder clearHeaderText() {
if (headerTextBuilder_ == null) {
headerText_ = null;
onChanged();
} else {
headerTextBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getHeaderTextBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getHeaderTextFieldBuilder().getBuilder();
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder() {
if (headerTextBuilder_ != null) {
return headerTextBuilder_.getMessageOrBuilder();
} else {
return headerText_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
}
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getHeaderTextFieldBuilder() {
if (headerTextBuilder_ == null) {
headerTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getHeaderText(),
getParentForChildren(),
isClean());
headerText_ = null;
}
return headerTextBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString descriptionText_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> descriptionTextBuilder_;
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public boolean hasDescriptionText() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText() {
if (descriptionTextBuilder_ == null) {
return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
} else {
return descriptionTextBuilder_.getMessage();
}
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public Builder setDescriptionText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (descriptionTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
descriptionText_ = value;
onChanged();
} else {
descriptionTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
return this;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public Builder setDescriptionText(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (descriptionTextBuilder_ == null) {
descriptionText_ = builderForValue.build();
onChanged();
} else {
descriptionTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
return this;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public Builder mergeDescriptionText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (descriptionTextBuilder_ == null) {
if (((bitField0_ & 0x00000040) == 0x00000040) &&
descriptionText_ != null &&
descriptionText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
descriptionText_ =
com.google.transit.realtime.GtfsRealtime.TranslatedString.newBuilder(descriptionText_).mergeFrom(value).buildPartial();
} else {
descriptionText_ = value;
}
onChanged();
} else {
descriptionTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
return this;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public Builder clearDescriptionText() {
if (descriptionTextBuilder_ == null) {
descriptionText_ = null;
onChanged();
} else {
descriptionTextBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getDescriptionTextBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getDescriptionTextFieldBuilder().getBuilder();
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder() {
if (descriptionTextBuilder_ != null) {
return descriptionTextBuilder_.getMessageOrBuilder();
} else {
return descriptionText_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
}
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getDescriptionTextFieldBuilder() {
if (descriptionTextBuilder_ == null) {
descriptionTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getDescriptionText(),
getParentForChildren(),
isClean());
descriptionText_ = null;
}
return descriptionTextBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.Alert)
}
// @@protoc_insertion_point(class_scope:transit_realtime.Alert)
private static final com.google.transit.realtime.GtfsRealtime.Alert DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Alert();
}
public static com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Alert parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Alert(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TimeRangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TimeRange)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
boolean hasStart();
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
long getStart();
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
boolean hasEnd();
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
long getEnd();
}
/**
*
* A time interval. The interval is considered active at time 't' if 't' is
* greater than or equal to the start time and less than the end time.
*
*
* Protobuf type {@code transit_realtime.TimeRange}
*/
public static final class TimeRange extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TimeRange> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TimeRange)
TimeRangeOrBuilder {
// Use TimeRange.newBuilder() to construct.
private TimeRange(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TimeRange() {
start_ = 0L;
end_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TimeRange(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
start_ = input.readUInt64();
break;
}
case 16: {
bitField0_ |= 0x00000002;
end_ = input.readUInt64();
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_TimeRange_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
}
private int bitField0_;
public static final int START_FIELD_NUMBER = 1;
private long start_;
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public boolean hasStart() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public long getStart() {
return start_;
}
public static final int END_FIELD_NUMBER = 2;
private long end_;
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public boolean hasEnd() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public long getEnd() {
return end_;
}
private byte memoizedIsInitialized = -1;
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;
}
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.writeUInt64(1, start_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt64(2, end_);
}
extensionWriter.writeUntil(2000, output);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, start_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, end_);
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TimeRange)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TimeRange other = (com.google.transit.realtime.GtfsRealtime.TimeRange) obj;
boolean result = true;
result = result && (hasStart() == other.hasStart());
if (hasStart()) {
result = result && (getStart()
== other.getStart());
}
result = result && (hasEnd() == other.hasEnd());
if (hasEnd()) {
result = result && (getEnd()
== other.getEnd());
}
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 (hasStart()) {
hash = (37 * hash) + START_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStart());
}
if (hasEnd()) {
hash = (37 * hash) + END_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEnd());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TimeRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 time interval. The interval is considered active at time 't' if 't' is
* greater than or equal to the start time and less than the end time.
*
*
* Protobuf type {@code transit_realtime.TimeRange}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TimeRange, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TimeRange)
com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TimeRange.class, com.google.transit.realtime.GtfsRealtime.TimeRange.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TimeRange.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
start_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
end_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.TimeRange build() {
com.google.transit.realtime.GtfsRealtime.TimeRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.transit.realtime.GtfsRealtime.TimeRange buildPartial() {
com.google.transit.realtime.GtfsRealtime.TimeRange result = new com.google.transit.realtime.GtfsRealtime.TimeRange(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.start_ = start_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.end_ = end_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TimeRange, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
int index, Type value) {
return (Builder) super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TimeRange, java.util.List> extension,
Type value) {
return (Builder) super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.TimeRange, ?> extension) {
return (Builder) super.clearExtension(extension);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TimeRange) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TimeRange) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TimeRange other) {
if (other == com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance()) return this;
if (other.hasStart()) {
setStart(other.getStart());
}
if (other.hasEnd()) {
setEnd(other.getEnd());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.transit.realtime.GtfsRealtime.TimeRange parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.TimeRange) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long start_;
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public boolean hasStart() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public long getStart() {
return start_;
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public Builder setStart(long value) {
bitField0_ |= 0x00000001;
start_ = value;
onChanged();
return this;
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
*/
public Builder clearStart() {
bitField0_ = (bitField0_ & ~0x00000001);
start_ = 0L;
onChanged();
return this;
}
private long end_;
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public boolean hasEnd() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public long getEnd() {
return end_;
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public Builder setEnd(long value) {
bitField0_ |= 0x00000002;
end_ = value;
onChanged();
return this;
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
*/
public Builder clearEnd() {
bitField0_ = (bitField0_ & ~0x00000002);
end_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TimeRange)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TimeRange)
private static final com.google.transit.realtime.GtfsRealtime.TimeRange DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TimeRange();
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TimeRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TimeRange(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PositionOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.Position)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
boolean hasLatitude();
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
float getLatitude();
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
boolean hasLongitude();
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
float getLongitude();
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
boolean hasBearing();
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
float getBearing();
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
boolean hasOdometer();
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
double getOdometer();
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
boolean hasSpeed();
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
float getSpeed();
}
/**
*
* A position.
*
*
* Protobuf type {@code transit_realtime.Position}
*/
public static final class Position extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Position> implements
// @@protoc_insertion_point(message_implements:transit_realtime.Position)
PositionOrBuilder {
// Use Position.newBuilder() to construct.
private Position(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Position() {
latitude_ = 0F;
longitude_ = 0F;
bearing_ = 0F;
odometer_ = 0D;
speed_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Position(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 13: {
bitField0_ |= 0x00000001;
latitude_ = input.readFloat();
break;
}
case 21: {
bitField0_ |= 0x00000002;
longitude_ = input.readFloat();
break;
}
case 29: {
bitField0_ |= 0x00000004;
bearing_ = input.readFloat();
break;
}
case 33: {
bitField0_ |= 0x00000008;
odometer_ = input.readDouble();
break;
}
case 45: {
bitField0_ |= 0x00000010;
speed_ = input.readFloat();
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_Position_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
}
private int bitField0_;
public static final int LATITUDE_FIELD_NUMBER = 1;
private float latitude_;
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public boolean hasLatitude() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public float getLatitude() {
return latitude_;
}
public static final int LONGITUDE_FIELD_NUMBER = 2;
private float longitude_;
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public boolean hasLongitude() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public float getLongitude() {
return longitude_;
}
public static final int BEARING_FIELD_NUMBER = 3;
private float bearing_;
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public boolean hasBearing() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public float getBearing() {
return bearing_;
}
public static final int ODOMETER_FIELD_NUMBER = 4;
private double odometer_;
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public boolean hasOdometer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public double getOdometer() {
return odometer_;
}
public static final int SPEED_FIELD_NUMBER = 5;
private float speed_;
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public boolean hasSpeed() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public float getSpeed() {
return speed_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasLatitude()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasLongitude()) {
memoizedIsInitialized = 0;
return false;
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
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.writeFloat(1, latitude_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeFloat(2, longitude_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeFloat(3, bearing_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeDouble(4, odometer_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeFloat(5, speed_);
}
extensionWriter.writeUntil(2000, output);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, latitude_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, longitude_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, bearing_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, odometer_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, speed_);
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Position)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.Position other = (com.google.transit.realtime.GtfsRealtime.Position) obj;
boolean result = true;
result = result && (hasLatitude() == other.hasLatitude());
if (hasLatitude()) {
result = result && (
java.lang.Float.floatToIntBits(getLatitude())
== java.lang.Float.floatToIntBits(
other.getLatitude()));
}
result = result && (hasLongitude() == other.hasLongitude());
if (hasLongitude()) {
result = result && (
java.lang.Float.floatToIntBits(getLongitude())
== java.lang.Float.floatToIntBits(
other.getLongitude()));
}
result = result && (hasBearing() == other.hasBearing());
if (hasBearing()) {
result = result && (
java.lang.Float.floatToIntBits(getBearing())
== java.lang.Float.floatToIntBits(
other.getBearing()));
}
result = result && (hasOdometer() == other.hasOdometer());
if (hasOdometer()) {
result = result && (
java.lang.Double.doubleToLongBits(getOdometer())
== java.lang.Double.doubleToLongBits(
other.getOdometer()));
}
result = result && (hasSpeed() == other.hasSpeed());
if (hasSpeed()) {
result = result && (
java.lang.Float.floatToIntBits(getSpeed())
== java.lang.Float.floatToIntBits(
other.getSpeed()));
}
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 (hasLatitude()) {
hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLatitude());
}
if (hasLongitude()) {
hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLongitude());
}
if (hasBearing()) {
hash = (37 * hash) + BEARING_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getBearing());
}
if (hasOdometer()) {
hash = (37 * hash) + ODOMETER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getOdometer()));
}
if (hasSpeed()) {
hash = (37 * hash) + SPEED_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getSpeed());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Position 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.Position parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Position 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.Position parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Position prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 position.
*
*
* Protobuf type {@code transit_realtime.Position}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.Position, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.Position)
com.google.transit.realtime.GtfsRealtime.PositionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Position.class, com.google.transit.realtime.GtfsRealtime.Position.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.Position.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
latitude_ = 0F;
bitField0_ = (bitField0_ & ~0x00000001);
longitude_ = 0F;
bitField0_ = (bitField0_ & ~0x00000002);
bearing_ = 0F;
bitField0_ = (bitField0_ & ~0x00000004);
odometer_ = 0D;
bitField0_ = (bitField0_ & ~0x00000008);
speed_ = 0F;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance();
}
public com.google.transit.realtime.GtfsRealtime.Position build() {
com.google.transit.realtime.GtfsRealtime.Position result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.transit.realtime.GtfsRealtime.Position buildPartial() {
com.google.transit.realtime.GtfsRealtime.Position result = new com.google.transit.realtime.GtfsRealtime.Position(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.latitude_ = latitude_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.longitude_ = longitude_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.bearing_ = bearing_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.odometer_ = odometer_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.speed_ = speed_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Position, Type> extension,
Type value) {
return (Builder) super.setExtension(extension, value);
}
public Builder setExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
int index, Type value) {
return (Builder) super.setExtension(extension, index, value);
}
public Builder addExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Position, java.util.List> extension,
Type value) {
return (Builder) super.addExtension(extension, value);
}
public Builder clearExtension(
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.transit.realtime.GtfsRealtime.Position, ?> extension) {
return (Builder) super.clearExtension(extension);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.Position) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.Position) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) {
if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this;
if (other.hasLatitude()) {
setLatitude(other.getLatitude());
}
if (other.hasLongitude()) {
setLongitude(other.getLongitude());
}
if (other.hasBearing()) {
setBearing(other.getBearing());
}
if (other.hasOdometer()) {
setOdometer(other.getOdometer());
}
if (other.hasSpeed()) {
setSpeed(other.getSpeed());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
if (!hasLatitude()) {
return false;
}
if (!hasLongitude()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.transit.realtime.GtfsRealtime.Position parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.transit.realtime.GtfsRealtime.Position) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private float latitude_;
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public boolean hasLatitude() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public float getLatitude() {
return latitude_;
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public Builder setLatitude(float value) {
bitField0_ |= 0x00000001;
latitude_ = value;
onChanged();
return this;
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
*/
public Builder clearLatitude() {
bitField0_ = (bitField0_ & ~0x00000001);
latitude_ = 0F;
onChanged();
return this;
}
private float longitude_;
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public boolean hasLongitude() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public float getLongitude() {
return longitude_;
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public Builder setLongitude(float value) {
bitField0_ |= 0x00000002;
longitude_ = value;
onChanged();
return this;
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
*/
public Builder clearLongitude() {
bitField0_ = (bitField0_ & ~0x00000002);
longitude_ = 0F;
onChanged();
return this;
}
private float bearing_;
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public boolean hasBearing() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public float getBearing() {
return bearing_;
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public Builder setBearing(float value) {
bitField0_ |= 0x00000004;
bearing_ = value;
onChanged();
return this;
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
*/
public Builder clearBearing() {
bitField0_ = (bitField0_ & ~0x00000004);
bearing_ = 0F;
onChanged();
return this;
}
private double odometer_;
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public boolean hasOdometer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public double getOdometer() {
return odometer_;
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public Builder setOdometer(double value) {
bitField0_ |= 0x00000008;
odometer_ = value;
onChanged();
return this;
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
*/
public Builder clearOdometer() {
bitField0_ = (bitField0_ & ~0x00000008);
odometer_ = 0D;
onChanged();
return this;
}
private float speed_;
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public boolean hasSpeed() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public float getSpeed() {
return speed_;
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public Builder setSpeed(float value) {
bitField0_ |= 0x00000010;
speed_ = value;
onChanged();
return this;
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
*/
public Builder clearSpeed() {
bitField0_ = (bitField0_ & ~0x00000010);
speed_ = 0F;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.Position)
}
// @@protoc_insertion_point(class_scope:transit_realtime.Position)
private static final com.google.transit.realtime.GtfsRealtime.Position DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Position();
}
public static com.google.transit.realtime.GtfsRealtime.Position getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated
public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Position parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Position(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TripDescriptorOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripDescriptor)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
boolean hasTripId();
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
java.lang.String getTripId();
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
com.google.protobuf.ByteString
getTripIdBytes();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
boolean hasRouteId();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
java.lang.String getRouteId();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
com.google.protobuf.ByteString
getRouteIdBytes();
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to. This field is
* still experimental, and subject to change. It may be formally adopted in
* the future.
*
*
* optional uint32 direction_id = 6;
*/
boolean hasDirectionId();
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to. This field is
* still experimental, and subject to change. It may be formally adopted in
* the future.
*
*
* optional uint32 direction_id = 6;
*/
int getDirectionId();
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
boolean hasStartTime();
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
java.lang.String getStartTime();
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
com.google.protobuf.ByteString
getStartTimeBytes();
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
boolean hasStartDate();
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
java.lang.String getStartDate();
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
*/
boolean hasScheduleRelationship();
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship();
}
/**
*
* A descriptor that identifies an instance of a GTFS trip, or all instances of
* a trip along a route.
* - To specify a single trip instance, the trip_id (and if necessary,
* start_time) is set. If route_id is also set, then it should be same as one
* that the given trip corresponds to.
* - To specify all the trips along a given route, only the route_id should be
* set. Note that if the trip_id is not known, then stop sequence ids in
* TripUpdate are not sufficient, and stop_ids must be provided as well. In
* addition, absolute arrival/departure times must be provided.
*
*
* Protobuf type {@code transit_realtime.TripDescriptor}
*/
public static final class TripDescriptor extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TripDescriptor> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripDescriptor)
TripDescriptorOrBuilder {
// Use TripDescriptor.newBuilder() to construct.
private TripDescriptor(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TripDescriptor() {
tripId_ = "";
routeId_ = "";
directionId_ = 0;
startTime_ = "";
startDate_ = "";
scheduleRelationship_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TripDescriptor(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
tripId_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
startTime_ = bs;
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
startDate_ = bs;
break;
}
case 32: {
int rawValue = input.readEnum();
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(4, rawValue);
} else {
bitField0_ |= 0x00000020;
scheduleRelationship_ = rawValue;
}
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
routeId_ = bs;
break;
}
case 48: {
bitField0_ |= 0x00000004;
directionId_ = input.readUInt32();
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_TripDescriptor_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.class, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder.class);
}
/**
*
* The relation between this trip and the static schedule. If a trip is done
* in accordance with temporary schedule, not reflected in GTFS, then it
* shouldn't be marked as SCHEDULED, but likely as ADDED.
*
*
* Protobuf enum {@code transit_realtime.TripDescriptor.ScheduleRelationship}
*/
public enum ScheduleRelationship
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Trip that is running in accordance with its GTFS schedule, or is close
* enough to the scheduled trip to be associated with it.
*
*
* SCHEDULED = 0;
*/
SCHEDULED(0),
/**
*
* An extra trip that was added in addition to a running schedule, for
* example, to replace a broken vehicle or to respond to sudden passenger
* load.
*
*
* ADDED = 1;
*/
ADDED(1),
/**
*
* A trip that is running with no schedule associated to it, for example, if
* there is no schedule at all.
*
*
* UNSCHEDULED = 2;
*/
UNSCHEDULED(2),
/**
*
* A trip that existed in the schedule but was removed.
*
*
* CANCELED = 3;
*/
CANCELED(3),;
/**
*
* Trip that is running in accordance with its GTFS schedule, or is close
* enough to the scheduled trip to be associated with it.
*
*
* SCHEDULED = 0;
*/
public static final int SCHEDULED_VALUE = 0;
/**
*
* An extra trip that was added in addition to a running schedule, for
* example, to replace a broken vehicle or to respond to sudden passenger
* load.
*
*
* ADDED = 1;
*/
public static final int ADDED_VALUE = 1;
/**
*
* A trip that is running with no schedule associated to it, for example, if
* there is no schedule at all.
*
*
* UNSCHEDULED = 2;
*/
public static final int UNSCHEDULED_VALUE = 2;
/**
*
* A trip that existed in the schedule but was removed.
*
*
* CANCELED = 3;
*/
public static final int CANCELED_VALUE = 3;
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 ADDED;
case 2:
return UNSCHEDULED;
case 3:
return CANCELED;
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.TripDescriptor.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.TripDescriptor.ScheduleRelationship)
}
private int bitField0_;
public static final int TRIP_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object tripId_;
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
public boolean hasTripId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
public java.lang.String getTripId() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tripId_ = s;
}
return s;
}
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary.
*
*
* optional string trip_id = 1;
*/
public com.google.protobuf.ByteString
getTripIdBytes() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tripId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object routeId_;
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
public boolean hasRouteId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
public java.lang.String getRouteId() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
routeId_ = s;
}
return s;
}
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
*/
public com.google.protobuf.ByteString
getRouteIdBytes() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DIRECTION_ID_FIELD_NUMBER = 6;
private int directionId_;
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to. This field is
* still experimental, and subject to change. It may be formally adopted in
* the future.
*
*
* optional uint32 direction_id = 6;
*/
public boolean hasDirectionId() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to. This field is
* still experimental, and subject to change. It may be formally adopted in
* the future.
*
*
* optional uint32 direction_id = 6;
*/
public int getDirectionId() {
return directionId_;
}
public static final int START_TIME_FIELD_NUMBER = 2;
private volatile java.lang.Object startTime_;
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
public boolean hasStartTime() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
public java.lang.String getStartTime() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startTime_ = s;
}
return s;
}
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
*/
public com.google.protobuf.ByteString
getStartTimeBytes() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_DATE_FIELD_NUMBER = 3;
private volatile java.lang.Object startDate_;
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
public boolean hasStartDate() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startDate_ = s;
}
return s;
}
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 4;
private int scheduleRelationship_;
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
*/
public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.valueOf(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
}
private byte memoizedIsInitialized = -1;
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;
}
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, tripId_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, startTime_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, startDate_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeEnum(4, scheduleRelationship_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, routeId_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt32(6, directionId_);
}
extensionWriter.writeUntil(2000, output);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tripId_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, startTime_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, startDate_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, scheduleRelationship_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, routeId_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, directionId_);
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripDescriptor other = (com.google.transit.realtime.GtfsRealtime.TripDescriptor) obj;
boolean result = true;
result = result && (hasTripId() == other.hasTripId());
if (hasTripId()) {
result = result && getTripId()
.equals(other.getTripId());
}
result = result && (hasRouteId() == other.hasRouteId());
if (hasRouteId()) {
result = result && getRouteId()
.equals(other.getRouteId());
}
result = result && (hasDirectionId() == other.hasDirectionId());
if (hasDirectionId()) {
result = result && (getDirectionId()
== other.getDirectionId());
}
result = result && (hasStartTime() == other.hasStartTime());
if (hasStartTime()) {
result = result && getStartTime()
.equals(other.getStartTime());
}
result = result && (hasStartDate() == other.hasStartDate());
if (hasStartDate()) {
result = result && getStartDate()
.equals(other.getStartDate());
}
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 (hasTripId()) {
hash = (37 * hash) + TRIP_ID_FIELD_NUMBER;
hash = (53 * hash) + getTripId().hashCode();
}
if (hasRouteId()) {
hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
hash = (53 * hash) + getRouteId().hashCode();
}
if (hasDirectionId()) {
hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
hash = (53 * hash) + getDirectionId();
}
if (hasStartTime()) {
hash = (37 * hash) + START_TIME_FIELD_NUMBER;
hash = (53 * hash) + getStartTime().hashCode();
}
if (hasStartDate()) {
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
}
if (hasScheduleRelationship()) {
hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
hash = (53 * hash) + scheduleRelationship_;
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripDescriptor prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*