
com.google.transit.realtime.GtfsRealtime Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
// 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;
* @return Whether the header field is set.
*/
boolean hasHeader();
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
* @return The header.
*/
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.
* Note that "required" and "optional" as stated in this file refer to Protocol
* Buffer cardinality, not semantic cardinality. See reference.md at
* https://github.com/google/transit/tree/master/gtfs-realtime for field
* semantic cardinality.
*
*
* Protobuf type {@code transit_realtime.FeedMessage}
*/
public static final class FeedMessage extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedMessage> implements
// @@protoc_insertion_point(message_implements:transit_realtime.FeedMessage)
FeedMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use FeedMessage.newBuilder() to construct.
private FeedMessage(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private FeedMessage() {
entity_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FeedMessage();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedMessage.class, com.google.transit.realtime.GtfsRealtime.FeedMessage.Builder.class);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 1;
private com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
* @return Whether the header field is set.
*/
@java.lang.Override
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
* @return The header.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
public static final int ENTITY_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List entity_;
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
@java.lang.Override
public java.util.List getEntityList() {
return entity_;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityOrBuilderList() {
return entity_;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
@java.lang.Override
public int getEntityCount() {
return entity_.size();
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
return entity_.get(index);
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
int index) {
return entity_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasHeader()) {
memoizedIsInitialized = 0;
return false;
}
if (!getHeader().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
for (int i = 0; i < getEntityCount(); i++) {
if (!getEntity(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getHeader());
}
for (int i = 0; i < entity_.size(); i++) {
output.writeMessage(2, entity_.get(i));
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
for (int i = 0; i < entity_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, entity_.get(i));
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@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;
if (hasHeader() != other.hasHeader()) return false;
if (hasHeader()) {
if (!getHeader()
.equals(other.getHeader())) return false;
}
if (!getEntityList()
.equals(other.getEntityList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
if (getEntityCount() > 0) {
hash = (37 * hash) + ENTITY_FIELD_NUMBER;
hash = (53 * hash) + getEntityList().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.FeedMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The contents of a feed message.
* A feed is a continuous stream of feed messages. Each message in the stream is
* obtained as a response to an appropriate HTTP GET request.
* A realtime feed is always defined with relation to an existing GTFS feed.
* All the entity ids are resolved with respect to the GTFS feed.
* Note that "required" and "optional" as stated in this file refer to Protocol
* Buffer cardinality, not semantic cardinality. See reference.md at
* https://github.com/google/transit/tree/master/gtfs-realtime for field
* semantic cardinality.
*
*
* Protobuf type {@code transit_realtime.FeedMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.FeedMessage, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.FeedMessage)
com.google.transit.realtime.GtfsRealtime.FeedMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedMessage.class, com.google.transit.realtime.GtfsRealtime.FeedMessage.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.FeedMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHeaderFieldBuilder();
getEntityFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
header_ = null;
if (headerBuilder_ != null) {
headerBuilder_.dispose();
headerBuilder_ = null;
}
if (entityBuilder_ == null) {
entity_ = java.util.Collections.emptyList();
} else {
entity_ = null;
entityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedMessage_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedMessage getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedMessage build() {
com.google.transit.realtime.GtfsRealtime.FeedMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedMessage buildPartial() {
com.google.transit.realtime.GtfsRealtime.FeedMessage result = new com.google.transit.realtime.GtfsRealtime.FeedMessage(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
if (entityBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
entity_ = java.util.Collections.unmodifiableList(entity_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.entity_ = entity_;
} else {
result.entity_ = entityBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedMessage result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.header_ = headerBuilder_ == null
? header_
: headerBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedMessage) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedMessage other) {
if (other == com.google.transit.realtime.GtfsRealtime.FeedMessage.getDefaultInstance()) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
if (entityBuilder_ == null) {
if (!other.entity_.isEmpty()) {
if (entity_.isEmpty()) {
entity_ = other.entity_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEntityIsMutable();
entity_.addAll(other.entity_);
}
onChanged();
}
} else {
if (!other.entity_.isEmpty()) {
if (entityBuilder_.isEmpty()) {
entityBuilder_.dispose();
entityBuilder_ = null;
entity_ = other.entity_;
bitField0_ = (bitField0_ & ~0x00000002);
entityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEntityFieldBuilder() : null;
} else {
entityBuilder_.addAllMessages(other.entity_);
}
}
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasHeader()) {
return false;
}
if (!getHeader().isInitialized()) {
return false;
}
for (int i = 0; i < getEntityCount(); i++) {
if (!getEntity(i).isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getHeaderFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.transit.realtime.GtfsRealtime.FeedEntity m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.FeedEntity.PARSER,
extensionRegistry);
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.add(m);
} else {
entityBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.transit.realtime.GtfsRealtime.FeedHeader header_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder> headerBuilder_;
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
* @return Whether the header field is set.
*/
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
* @return The header.
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder setHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
} else {
headerBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder setHeader(
com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder mergeHeader(com.google.transit.realtime.GtfsRealtime.FeedHeader value) {
if (headerBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
header_ != null &&
header_ != com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) {
getHeaderBuilder().mergeFrom(value);
} else {
header_ = value;
}
} else {
headerBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public Builder clearHeader() {
bitField0_ = (bitField0_ & ~0x00000001);
header_ = null;
if (headerBuilder_ != null) {
headerBuilder_.dispose();
headerBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder getHeaderBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
public com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance() : header_;
}
}
/**
*
* Metadata about this feed and feed message.
*
*
* required .transit_realtime.FeedHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedHeader, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder, com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
private java.util.List entity_ =
java.util.Collections.emptyList();
private void ensureEntityIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
entity_ = new java.util.ArrayList(entity_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder> entityBuilder_;
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List getEntityList() {
if (entityBuilder_ == null) {
return java.util.Collections.unmodifiableList(entity_);
} else {
return entityBuilder_.getMessageList();
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public int getEntityCount() {
if (entityBuilder_ == null) {
return entity_.size();
} else {
return entityBuilder_.getCount();
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity getEntity(int index) {
if (entityBuilder_ == null) {
return entity_.get(index);
} else {
return entityBuilder_.getMessage(index);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder setEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.set(index, value);
onChanged();
} else {
entityBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder setEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.set(index, builderForValue.build());
onChanged();
} else {
entityBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.add(value);
onChanged();
} else {
entityBuilder_.addMessage(value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntityIsMutable();
entity_.add(index, value);
onChanged();
} else {
entityBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.add(builderForValue.build());
onChanged();
} else {
entityBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addEntity(
int index, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder builderForValue) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.add(index, builderForValue.build());
onChanged();
} else {
entityBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder addAllEntity(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.FeedEntity> values) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entity_);
onChanged();
} else {
entityBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder clearEntity() {
if (entityBuilder_ == null) {
entity_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
entityBuilder_.clear();
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public Builder removeEntity(int index) {
if (entityBuilder_ == null) {
ensureEntityIsMutable();
entity_.remove(index);
onChanged();
} else {
entityBuilder_.remove(index);
}
return this;
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder getEntityBuilder(
int index) {
return getEntityFieldBuilder().getBuilder(index);
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder getEntityOrBuilder(
int index) {
if (entityBuilder_ == null) {
return entity_.get(index); } else {
return entityBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityOrBuilderList() {
if (entityBuilder_ != null) {
return entityBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entity_);
}
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder() {
return getEntityFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder addEntityBuilder(
int index) {
return getEntityFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance());
}
/**
*
* Contents of the feed.
*
*
* repeated .transit_realtime.FeedEntity entity = 2;
*/
public java.util.List
getEntityBuilderList() {
return getEntityFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>
getEntityFieldBuilder() {
if (entityBuilder_ == null) {
entityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.FeedEntity, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder, com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder>(
entity_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
entity_ = null;
}
return entityBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedMessage)
}
// @@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() {
@java.lang.Override
public FeedMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
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 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return Whether the gtfsRealtimeVersion field is set.
*/
boolean hasGtfsRealtimeVersion();
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The gtfsRealtimeVersion.
*/
java.lang.String getGtfsRealtimeVersion();
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The bytes for gtfsRealtimeVersion.
*/
com.google.protobuf.ByteString
getGtfsRealtimeVersionBytes();
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return Whether the incrementality field is set.
*/
boolean hasIncrementality();
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return The incrementality.
*/
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality();
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return The timestamp.
*/
long getTimestamp();
}
/**
*
* Metadata about a feed, included in feed messages.
*
*
* Protobuf type {@code transit_realtime.FeedHeader}
*/
public static final class FeedHeader extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedHeader> implements
// @@protoc_insertion_point(message_implements:transit_realtime.FeedHeader)
FeedHeaderOrBuilder {
private static final long serialVersionUID = 0L;
// Use FeedHeader.newBuilder() to construct.
private FeedHeader(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private FeedHeader() {
gtfsRealtimeVersion_ = "";
incrementality_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FeedHeader();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedHeader.class, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
}
/**
*
* Determines whether the current fetch is incremental. Currently,
* DIFFERENTIAL mode is unsupported and behavior is unspecified for feeds
* that use this mode. There are discussions on the GTFS Realtime mailing
* list around fully specifying the behavior of DIFFERENTIAL mode and the
* documentation will be updated when those discussions are finalized.
*
*
* Protobuf enum {@code transit_realtime.FeedHeader.Incrementality}
*/
public enum Incrementality
implements com.google.protobuf.ProtocolMessageEnum {
/**
* FULL_DATASET = 0;
*/
FULL_DATASET(0),
/**
* DIFFERENTIAL = 1;
*/
DIFFERENTIAL(1),
;
/**
* FULL_DATASET = 0;
*/
public static final int FULL_DATASET_VALUE = 0;
/**
* DIFFERENTIAL = 1;
*/
public static final int DIFFERENTIAL_VALUE = 1;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Incrementality valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Incrementality forNumber(int value) {
switch (value) {
case 0: return FULL_DATASET;
case 1: return DIFFERENTIAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Incrementality> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Incrementality findValueByNumber(int number) {
return Incrementality.forNumber(number);
}
};
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;
@SuppressWarnings("serial")
private volatile java.lang.Object gtfsRealtimeVersion_ = "";
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return Whether the gtfsRealtimeVersion field is set.
*/
@java.lang.Override
public boolean hasGtfsRealtimeVersion() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The gtfsRealtimeVersion.
*/
@java.lang.Override
public java.lang.String getGtfsRealtimeVersion() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
gtfsRealtimeVersion_ = s;
}
return s;
}
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The bytes for gtfsRealtimeVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGtfsRealtimeVersionBytes() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gtfsRealtimeVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INCREMENTALITY_FIELD_NUMBER = 2;
private int incrementality_ = 0;
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return Whether the incrementality field is set.
*/
@java.lang.Override public boolean hasIncrementality() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return The incrementality.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(incrementality_);
return result == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET : result;
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
private long timestamp_ = 0L;
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasGtfsRealtimeVersion()) {
memoizedIsInitialized = 0;
return false;
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gtfsRealtimeVersion_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(2, incrementality_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeUInt64(3, timestamp_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gtfsRealtimeVersion_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, incrementality_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, timestamp_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.FeedHeader other = (com.google.transit.realtime.GtfsRealtime.FeedHeader) obj;
if (hasGtfsRealtimeVersion() != other.hasGtfsRealtimeVersion()) return false;
if (hasGtfsRealtimeVersion()) {
if (!getGtfsRealtimeVersion()
.equals(other.getGtfsRealtimeVersion())) return false;
}
if (hasIncrementality() != other.hasIncrementality()) return false;
if (hasIncrementality()) {
if (incrementality_ != other.incrementality_) return false;
}
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (getTimestamp()
!= other.getTimestamp()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasGtfsRealtimeVersion()) {
hash = (37 * hash) + GTFS_REALTIME_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getGtfsRealtimeVersion().hashCode();
}
if (hasIncrementality()) {
hash = (37 * hash) + INCREMENTALITY_FIELD_NUMBER;
hash = (53 * hash) + incrementality_;
}
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.FeedHeader prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Metadata about a feed, included in feed messages.
*
*
* Protobuf type {@code transit_realtime.FeedHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.FeedHeader, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.FeedHeader)
com.google.transit.realtime.GtfsRealtime.FeedHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedHeader.class, com.google.transit.realtime.GtfsRealtime.FeedHeader.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.FeedHeader.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
gtfsRealtimeVersion_ = "";
incrementality_ = 0;
timestamp_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedHeader_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader build() {
com.google.transit.realtime.GtfsRealtime.FeedHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader buildPartial() {
com.google.transit.realtime.GtfsRealtime.FeedHeader result = new com.google.transit.realtime.GtfsRealtime.FeedHeader(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedHeader result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.gtfsRealtimeVersion_ = gtfsRealtimeVersion_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.incrementality_ = incrementality_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.timestamp_ = timestamp_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedHeader) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedHeader other) {
if (other == com.google.transit.realtime.GtfsRealtime.FeedHeader.getDefaultInstance()) return this;
if (other.hasGtfsRealtimeVersion()) {
gtfsRealtimeVersion_ = other.gtfsRealtimeVersion_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasIncrementality()) {
setIncrementality(other.getIncrementality());
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasGtfsRealtimeVersion()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
gtfsRealtimeVersion_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality tmpValue =
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(2, tmpRaw);
} else {
incrementality_ = tmpRaw;
bitField0_ |= 0x00000002;
}
break;
} // case 16
case 24: {
timestamp_ = input.readUInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object gtfsRealtimeVersion_ = "";
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return Whether the gtfsRealtimeVersion field is set.
*/
public boolean hasGtfsRealtimeVersion() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The gtfsRealtimeVersion.
*/
public java.lang.String getGtfsRealtimeVersion() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
gtfsRealtimeVersion_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return The bytes for gtfsRealtimeVersion.
*/
public com.google.protobuf.ByteString
getGtfsRealtimeVersionBytes() {
java.lang.Object ref = gtfsRealtimeVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gtfsRealtimeVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @param value The gtfsRealtimeVersion to set.
* @return This builder for chaining.
*/
public Builder setGtfsRealtimeVersion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
gtfsRealtimeVersion_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @return This builder for chaining.
*/
public Builder clearGtfsRealtimeVersion() {
gtfsRealtimeVersion_ = getDefaultInstance().getGtfsRealtimeVersion();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Version of the feed specification.
* The current version is 2.0. Valid versions are "2.0", "1.0".
*
*
* required string gtfs_realtime_version = 1;
* @param value The bytes for gtfsRealtimeVersion to set.
* @return This builder for chaining.
*/
public Builder setGtfsRealtimeVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
gtfsRealtimeVersion_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int incrementality_ = 0;
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return Whether the incrementality field is set.
*/
@java.lang.Override public boolean hasIncrementality() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return The incrementality.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality getIncrementality() {
com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality result = com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.forNumber(incrementality_);
return result == null ? com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality.FULL_DATASET : result;
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @param value The incrementality to set.
* @return This builder for chaining.
*/
public Builder setIncrementality(com.google.transit.realtime.GtfsRealtime.FeedHeader.Incrementality value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
incrementality_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 [default = FULL_DATASET];
* @return This builder for chaining.
*/
public Builder clearIncrementality() {
bitField0_ = (bitField0_ & ~0x00000002);
incrementality_ = 0;
onChanged();
return this;
}
private long timestamp_ ;
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* This timestamp identifies the moment when the content of this feed has been
* created (in server time). In POSIX time (i.e., number of seconds since
* January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 3;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000004);
timestamp_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedHeader)
}
// @@protoc_insertion_point(class_scope:transit_realtime.FeedHeader)
private static final com.google.transit.realtime.GtfsRealtime.FeedHeader DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedHeader();
}
public static com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FeedHeader parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedHeader getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FeedEntityOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.FeedEntity)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return Whether the id field is set.
*/
boolean hasId();
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return Whether the isDeleted field is set.
*/
boolean hasIsDeleted();
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return The isDeleted.
*/
boolean getIsDeleted();
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return Whether the tripUpdate field is set.
*/
boolean hasTripUpdate();
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return The tripUpdate.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate();
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return Whether the vehicle field is set.
*/
boolean hasVehicle();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return The vehicle.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle();
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder();
/**
* optional .transit_realtime.Alert alert = 5;
* @return Whether the alert field is set.
*/
boolean hasAlert();
/**
* optional .transit_realtime.Alert alert = 5;
* @return The alert.
*/
com.google.transit.realtime.GtfsRealtime.Alert getAlert();
/**
* optional .transit_realtime.Alert alert = 5;
*/
com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder();
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return Whether the shape field is set.
*/
boolean hasShape();
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return The shape.
*/
com.google.transit.realtime.GtfsRealtime.Shape getShape();
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder();
}
/**
*
* A definition (or update) of an entity in the transit feed.
*
*
* Protobuf type {@code transit_realtime.FeedEntity}
*/
public static final class FeedEntity extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
FeedEntity> implements
// @@protoc_insertion_point(message_implements:transit_realtime.FeedEntity)
FeedEntityOrBuilder {
private static final long serialVersionUID = 0L;
// Use FeedEntity.newBuilder() to construct.
private FeedEntity(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private FeedEntity() {
id_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FeedEntity();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedEntity.class, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
}
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_DELETED_FIELD_NUMBER = 2;
private boolean isDeleted_ = false;
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return Whether the isDeleted field is set.
*/
@java.lang.Override
public boolean hasIsDeleted() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return The isDeleted.
*/
@java.lang.Override
public boolean getIsDeleted() {
return isDeleted_;
}
public static final int TRIP_UPDATE_FIELD_NUMBER = 3;
private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return Whether the tripUpdate field is set.
*/
@java.lang.Override
public boolean hasTripUpdate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return The tripUpdate.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
public static final int VEHICLE_FIELD_NUMBER = 4;
private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return Whether the vehicle field is set.
*/
@java.lang.Override
public boolean hasVehicle() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return The vehicle.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
}
public static final int ALERT_FIELD_NUMBER = 5;
private com.google.transit.realtime.GtfsRealtime.Alert alert_;
/**
* optional .transit_realtime.Alert alert = 5;
* @return Whether the alert field is set.
*/
@java.lang.Override
public boolean hasAlert() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .transit_realtime.Alert alert = 5;
* @return The alert.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
public static final int SHAPE_FIELD_NUMBER = 6;
private com.google.transit.realtime.GtfsRealtime.Shape shape_;
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return Whether the shape field is set.
*/
@java.lang.Override
public boolean hasShape() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return The shape.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Shape getShape() {
return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder() {
return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasId()) {
memoizedIsInitialized = 0;
return false;
}
if (hasTripUpdate()) {
if (!getTripUpdate().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasAlert()) {
if (!getAlert().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasShape()) {
if (!getShape().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(2, isDeleted_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getTripUpdate());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(4, getVehicle());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(5, getAlert());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(6, getShape());
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, isDeleted_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTripUpdate());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getVehicle());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getAlert());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getShape());
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.FeedEntity other = (com.google.transit.realtime.GtfsRealtime.FeedEntity) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (hasIsDeleted() != other.hasIsDeleted()) return false;
if (hasIsDeleted()) {
if (getIsDeleted()
!= other.getIsDeleted()) return false;
}
if (hasTripUpdate() != other.hasTripUpdate()) return false;
if (hasTripUpdate()) {
if (!getTripUpdate()
.equals(other.getTripUpdate())) return false;
}
if (hasVehicle() != other.hasVehicle()) return false;
if (hasVehicle()) {
if (!getVehicle()
.equals(other.getVehicle())) return false;
}
if (hasAlert() != other.hasAlert()) return false;
if (hasAlert()) {
if (!getAlert()
.equals(other.getAlert())) return false;
}
if (hasShape() != other.hasShape()) return false;
if (hasShape()) {
if (!getShape()
.equals(other.getShape())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
if (hasIsDeleted()) {
hash = (37 * hash) + IS_DELETED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsDeleted());
}
if (hasTripUpdate()) {
hash = (37 * hash) + TRIP_UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getTripUpdate().hashCode();
}
if (hasVehicle()) {
hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
hash = (53 * hash) + getVehicle().hashCode();
}
if (hasAlert()) {
hash = (37 * hash) + ALERT_FIELD_NUMBER;
hash = (53 * hash) + getAlert().hashCode();
}
if (hasShape()) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShape().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.FeedEntity prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A definition (or update) of an entity in the transit feed.
*
*
* Protobuf type {@code transit_realtime.FeedEntity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.FeedEntity, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.FeedEntity)
com.google.transit.realtime.GtfsRealtime.FeedEntityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.FeedEntity.class, com.google.transit.realtime.GtfsRealtime.FeedEntity.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.FeedEntity.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTripUpdateFieldBuilder();
getVehicleFieldBuilder();
getAlertFieldBuilder();
getShapeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
isDeleted_ = false;
tripUpdate_ = null;
if (tripUpdateBuilder_ != null) {
tripUpdateBuilder_.dispose();
tripUpdateBuilder_ = null;
}
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
alert_ = null;
if (alertBuilder_ != null) {
alertBuilder_.dispose();
alertBuilder_ = null;
}
shape_ = null;
if (shapeBuilder_ != null) {
shapeBuilder_.dispose();
shapeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_FeedEntity_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedEntity build() {
com.google.transit.realtime.GtfsRealtime.FeedEntity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.FeedEntity buildPartial() {
com.google.transit.realtime.GtfsRealtime.FeedEntity result = new com.google.transit.realtime.GtfsRealtime.FeedEntity(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.FeedEntity result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.isDeleted_ = isDeleted_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.tripUpdate_ = tripUpdateBuilder_ == null
? tripUpdate_
: tripUpdateBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.vehicle_ = vehicleBuilder_ == null
? vehicle_
: vehicleBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.alert_ = alertBuilder_ == null
? alert_
: alertBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.shape_ = shapeBuilder_ == null
? shape_
: shapeBuilder_.build();
to_bitField0_ |= 0x00000020;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.FeedEntity) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.FeedEntity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.FeedEntity other) {
if (other == com.google.transit.realtime.GtfsRealtime.FeedEntity.getDefaultInstance()) return this;
if (other.hasId()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasIsDeleted()) {
setIsDeleted(other.getIsDeleted());
}
if (other.hasTripUpdate()) {
mergeTripUpdate(other.getTripUpdate());
}
if (other.hasVehicle()) {
mergeVehicle(other.getVehicle());
}
if (other.hasAlert()) {
mergeAlert(other.getAlert());
}
if (other.hasShape()) {
mergeShape(other.getShape());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
if (hasTripUpdate()) {
if (!getTripUpdate().isInitialized()) {
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
return false;
}
}
if (hasAlert()) {
if (!getAlert().isInitialized()) {
return false;
}
}
if (hasShape()) {
if (!getShape().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
isDeleted_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getTripUpdateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getVehicleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getAlertFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getShapeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The ids are used only to provide incrementality support. The id should be
* unique within a FeedMessage. Consequent FeedMessages may contain
* FeedEntities with the same id. In case of a DIFFERENTIAL update the new
* FeedEntity with some id will replace the old FeedEntity with the same id
* (or delete it - see is_deleted below).
* The actual GTFS entities (e.g. stations, routes, trips) referenced by the
* feed must be specified by explicit selectors (see EntitySelector below for
* more info).
*
*
* required string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean isDeleted_ ;
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return Whether the isDeleted field is set.
*/
@java.lang.Override
public boolean hasIsDeleted() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return The isDeleted.
*/
@java.lang.Override
public boolean getIsDeleted() {
return isDeleted_;
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @param value The isDeleted to set.
* @return This builder for chaining.
*/
public Builder setIsDeleted(boolean value) {
isDeleted_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Whether this entity is to be deleted. Relevant only for incremental
* fetches.
*
*
* optional bool is_deleted = 2 [default = false];
* @return This builder for chaining.
*/
public Builder clearIsDeleted() {
bitField0_ = (bitField0_ & ~0x00000002);
isDeleted_ = false;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate tripUpdate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder> tripUpdateBuilder_;
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return Whether the tripUpdate field is set.
*/
public boolean hasTripUpdate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
* @return The tripUpdate.
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate getTripUpdate() {
if (tripUpdateBuilder_ == null) {
return tripUpdate_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
} else {
return tripUpdateBuilder_.getMessage();
}
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder setTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
if (tripUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tripUpdate_ = value;
} else {
tripUpdateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder setTripUpdate(
com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder builderForValue) {
if (tripUpdateBuilder_ == null) {
tripUpdate_ = builderForValue.build();
} else {
tripUpdateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder mergeTripUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate value) {
if (tripUpdateBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
tripUpdate_ != null &&
tripUpdate_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()) {
getTripUpdateBuilder().mergeFrom(value);
} else {
tripUpdate_ = value;
}
} else {
tripUpdateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public Builder clearTripUpdate() {
bitField0_ = (bitField0_ & ~0x00000004);
tripUpdate_ = null;
if (tripUpdateBuilder_ != null) {
tripUpdateBuilder_.dispose();
tripUpdateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder getTripUpdateBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTripUpdateFieldBuilder().getBuilder();
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder getTripUpdateOrBuilder() {
if (tripUpdateBuilder_ != null) {
return tripUpdateBuilder_.getMessageOrBuilder();
} else {
return tripUpdate_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance() : tripUpdate_;
}
}
/**
*
* Data about the entity itself. Exactly one of the following fields must be
* present (unless the entity is being deleted).
*
*
* optional .transit_realtime.TripUpdate trip_update = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>
getTripUpdateFieldBuilder() {
if (tripUpdateBuilder_ == null) {
tripUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder>(
getTripUpdate(),
getParentForChildren(),
isClean());
tripUpdate_ = null;
}
return tripUpdateBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehiclePosition vehicle_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder> vehicleBuilder_;
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return Whether the vehicle field is set.
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
* @return The vehicle.
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehiclePosition value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) {
getVehicleBuilder().mergeFrom(value);
} else {
vehicle_ = value;
}
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public Builder clearVehicle() {
bitField0_ = (bitField0_ & ~0x00000008);
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder getVehicleBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance() : vehicle_;
}
}
/**
* optional .transit_realtime.VehiclePosition vehicle = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.Alert alert_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder> alertBuilder_;
/**
* optional .transit_realtime.Alert alert = 5;
* @return Whether the alert field is set.
*/
public boolean hasAlert() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .transit_realtime.Alert alert = 5;
* @return The alert.
*/
public com.google.transit.realtime.GtfsRealtime.Alert getAlert() {
if (alertBuilder_ == null) {
return alert_ == null ? com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
} else {
return alertBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder setAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
if (alertBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
alert_ = value;
} else {
alertBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder setAlert(
com.google.transit.realtime.GtfsRealtime.Alert.Builder builderForValue) {
if (alertBuilder_ == null) {
alert_ = builderForValue.build();
} else {
alertBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder mergeAlert(com.google.transit.realtime.GtfsRealtime.Alert value) {
if (alertBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
alert_ != null &&
alert_ != com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance()) {
getAlertBuilder().mergeFrom(value);
} else {
alert_ = value;
}
} else {
alertBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public Builder clearAlert() {
bitField0_ = (bitField0_ & ~0x00000010);
alert_ = null;
if (alertBuilder_ != null) {
alertBuilder_.dispose();
alertBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public com.google.transit.realtime.GtfsRealtime.Alert.Builder getAlertBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAlertFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
public com.google.transit.realtime.GtfsRealtime.AlertOrBuilder getAlertOrBuilder() {
if (alertBuilder_ != null) {
return alertBuilder_.getMessageOrBuilder();
} else {
return alert_ == null ?
com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance() : alert_;
}
}
/**
* optional .transit_realtime.Alert alert = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>
getAlertFieldBuilder() {
if (alertBuilder_ == null) {
alertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Alert, com.google.transit.realtime.GtfsRealtime.Alert.Builder, com.google.transit.realtime.GtfsRealtime.AlertOrBuilder>(
getAlert(),
getParentForChildren(),
isClean());
alert_ = null;
}
return alertBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.Shape shape_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder> shapeBuilder_;
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return Whether the shape field is set.
*/
public boolean hasShape() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
* @return The shape.
*/
public com.google.transit.realtime.GtfsRealtime.Shape getShape() {
if (shapeBuilder_ == null) {
return shape_ == null ? com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public Builder setShape(com.google.transit.realtime.GtfsRealtime.Shape value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
} else {
shapeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public Builder setShape(
com.google.transit.realtime.GtfsRealtime.Shape.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public Builder mergeShape(com.google.transit.realtime.GtfsRealtime.Shape value) {
if (shapeBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
shape_ != null &&
shape_ != com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance()) {
getShapeBuilder().mergeFrom(value);
} else {
shape_ = value;
}
} else {
shapeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public Builder clearShape() {
bitField0_ = (bitField0_ & ~0x00000020);
shape_ = null;
if (shapeBuilder_ != null) {
shapeBuilder_.dispose();
shapeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public com.google.transit.realtime.GtfsRealtime.Shape.Builder getShapeBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
public com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_ == null ?
com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance() : shape_;
}
}
/**
*
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.Shape shape = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Shape, com.google.transit.realtime.GtfsRealtime.Shape.Builder, com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder>(
getShape(),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.FeedEntity)
}
// @@protoc_insertion_point(class_scope:transit_realtime.FeedEntity)
private static final com.google.transit.realtime.GtfsRealtime.FeedEntity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.FeedEntity();
}
public static com.google.transit.realtime.GtfsRealtime.FeedEntity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FeedEntity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.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;
* @return Whether the trip field is set.
*/
boolean hasTrip();
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return Whether the vehicle field is set.
*/
boolean hasVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return The vehicle.
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
java.util.List
getStopTimeUpdateList();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index);
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
int getStopTimeUpdateCount();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList();
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
int index);
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return The timestamp.
*/
long getTimestamp();
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return Whether the delay field is set.
*/
boolean hasDelay();
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return The delay.
*/
int getDelay();
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return Whether the tripProperties field is set.
*/
boolean hasTripProperties();
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return The tripProperties.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getTripProperties();
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder getTripPropertiesOrBuilder();
}
/**
*
* Realtime update of the progress of a vehicle along a trip.
* Depending on the value of ScheduleRelationship, a TripUpdate can specify:
* - A trip that proceeds along the schedule.
* - A trip that proceeds along a route but has no fixed schedule.
* - A trip that have been added or removed with regard to schedule.
*
* The updates can be for future, predicted arrival/departure events, or for
* past events that already occurred.
* Normally, updates should get more precise and more certain (see
* uncertainty below) as the events gets closer to current time.
* Even if that is not possible, the information for past events should be
* precise and certain. In particular, if an update points to time in the past
* but its update's uncertainty is not 0, the client should conclude that the
* update is a (wrong) prediction and that the trip has not completed yet.
*
* Note that the update can describe a trip that is already completed.
* To this end, it is enough to provide an update for the last stop of the trip.
* If the time of that is in the past, the client will conclude from that that
* the whole trip is in the past (it is possible, although inconsequential, to
* also provide updates for preceding stops).
* This option is most relevant for a trip that has completed ahead of schedule,
* but according to the schedule, the trip is still proceeding at the current
* time. Removing the updates for this trip could make the client assume
* that the trip is still proceeding.
* Note that the feed provider is allowed, but not required, to purge past
* updates - this is one case where this would be practically useful.
*
*
* Protobuf type {@code transit_realtime.TripUpdate}
*/
public static final class TripUpdate extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TripUpdate> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate)
TripUpdateOrBuilder {
private static final long serialVersionUID = 0L;
// Use TripUpdate.newBuilder() to construct.
private TripUpdate(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TripUpdate() {
stopTimeUpdate_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TripUpdate();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
}
public interface StopTimeEventOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeEvent)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return Whether the delay field is set.
*/
boolean hasDelay();
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return The delay.
*/
int getDelay();
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return Whether the time field is set.
*/
boolean hasTime();
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return The time.
*/
long getTime();
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return Whether the uncertainty field is set.
*/
boolean hasUncertainty();
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return The uncertainty.
*/
int getUncertainty();
}
/**
*
* Timing information for a single predicted event (either arrival or
* departure).
* Timing consists of delay and/or estimated time, and uncertainty.
* - delay should be used when the prediction is given relative to some
* existing schedule in GTFS.
* - time should be given whether there is a predicted schedule or not. If
* both time and delay are specified, time will take precedence
* (although normally, time, if given for a scheduled trip, should be
* equal to scheduled time in GTFS + delay).
*
* Uncertainty applies equally to both time and delay.
* The uncertainty roughly specifies the expected error in true delay (but
* note, we don't yet define its precise statistical meaning). It's possible
* for the uncertainty to be 0, for example for trains that are driven under
* computer timing control.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
*/
public static final class StopTimeEvent extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
StopTimeEvent> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeEvent)
StopTimeEventOrBuilder {
private static final long serialVersionUID = 0L;
// Use StopTimeEvent.newBuilder() to construct.
private StopTimeEvent(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private StopTimeEvent() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StopTimeEvent();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
}
private int bitField0_;
public static final int DELAY_FIELD_NUMBER = 1;
private int delay_ = 0;
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return Whether the delay field is set.
*/
@java.lang.Override
public boolean hasDelay() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return The delay.
*/
@java.lang.Override
public int getDelay() {
return delay_;
}
public static final int TIME_FIELD_NUMBER = 2;
private long time_ = 0L;
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return Whether the time field is set.
*/
@java.lang.Override
public boolean hasTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return The time.
*/
@java.lang.Override
public long getTime() {
return time_;
}
public static final int UNCERTAINTY_FIELD_NUMBER = 3;
private int uncertainty_ = 0;
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return Whether the uncertainty field is set.
*/
@java.lang.Override
public boolean hasUncertainty() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return The uncertainty.
*/
@java.lang.Override
public int getUncertainty() {
return uncertainty_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(1, delay_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(2, time_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt32(3, uncertainty_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, delay_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, time_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, uncertainty_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) obj;
if (hasDelay() != other.hasDelay()) return false;
if (hasDelay()) {
if (getDelay()
!= other.getDelay()) return false;
}
if (hasTime() != other.hasTime()) return false;
if (hasTime()) {
if (getTime()
!= other.getTime()) return false;
}
if (hasUncertainty() != other.hasUncertainty()) return false;
if (hasUncertainty()) {
if (getUncertainty()
!= other.getUncertainty()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDelay()) {
hash = (37 * hash) + DELAY_FIELD_NUMBER;
hash = (53 * hash) + getDelay();
}
if (hasTime()) {
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTime());
}
if (hasUncertainty()) {
hash = (37 * hash) + UNCERTAINTY_FIELD_NUMBER;
hash = (53 * hash) + getUncertainty();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Timing information for a single predicted event (either arrival or
* departure).
* Timing consists of delay and/or estimated time, and uncertainty.
* - delay should be used when the prediction is given relative to some
* existing schedule in GTFS.
* - time should be given whether there is a predicted schedule or not. If
* both time and delay are specified, time will take precedence
* (although normally, time, if given for a scheduled trip, should be
* equal to scheduled time in GTFS + delay).
*
* Uncertainty applies equally to both time and delay.
* The uncertainty roughly specifies the expected error in true delay (but
* note, we don't yet define its precise statistical meaning). It's possible
* for the uncertainty to be 0, for example for trains that are driven under
* computer timing control.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeEvent}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeEvent)
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
delay_ = 0;
time_ = 0L;
uncertainty_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.delay_ = delay_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.time_ = time_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.uncertainty_ = uncertainty_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) return this;
if (other.hasDelay()) {
setDelay(other.getDelay());
}
if (other.hasTime()) {
setTime(other.getTime());
}
if (other.hasUncertainty()) {
setUncertainty(other.getUncertainty());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
delay_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
time_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
uncertainty_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int delay_ ;
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return Whether the delay field is set.
*/
@java.lang.Override
public boolean hasDelay() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return The delay.
*/
@java.lang.Override
public int getDelay() {
return delay_;
}
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @param value The delay to set.
* @return This builder for chaining.
*/
public Builder setDelay(int value) {
delay_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
*
* optional int32 delay = 1;
* @return This builder for chaining.
*/
public Builder clearDelay() {
bitField0_ = (bitField0_ & ~0x00000001);
delay_ = 0;
onChanged();
return this;
}
private long time_ ;
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return Whether the time field is set.
*/
@java.lang.Override
public boolean hasTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return The time.
*/
@java.lang.Override
public long getTime() {
return time_;
}
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @param value The time to set.
* @return This builder for chaining.
*/
public Builder setTime(long value) {
time_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Event as absolute time.
* In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
* UTC).
*
*
* optional int64 time = 2;
* @return This builder for chaining.
*/
public Builder clearTime() {
bitField0_ = (bitField0_ & ~0x00000002);
time_ = 0L;
onChanged();
return this;
}
private int uncertainty_ ;
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return Whether the uncertainty field is set.
*/
@java.lang.Override
public boolean hasUncertainty() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return The uncertainty.
*/
@java.lang.Override
public int getUncertainty() {
return uncertainty_;
}
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @param value The uncertainty to set.
* @return This builder for chaining.
*/
public Builder setUncertainty(int value) {
uncertainty_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If uncertainty is omitted, it is interpreted as unknown.
* If the prediction is unknown or too uncertain, the delay (or time) field
* should be empty. In such case, the uncertainty field is ignored.
* To specify a completely certain prediction, set its uncertainty to 0.
*
*
* optional int32 uncertainty = 3;
* @return This builder for chaining.
*/
public Builder clearUncertainty() {
bitField0_ = (bitField0_ & ~0x00000004);
uncertainty_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeEvent)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeEvent)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StopTimeEvent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StopTimeUpdateOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeUpdate)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return Whether the stopSequence field is set.
*/
boolean hasStopSequence();
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return The stopSequence.
*/
int getStopSequence();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return Whether the stopId field is set.
*/
boolean hasStopId();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return The stopId.
*/
java.lang.String getStopId();
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return The bytes for stopId.
*/
com.google.protobuf.ByteString
getStopIdBytes();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return Whether the arrival field is set.
*/
boolean hasArrival();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return The arrival.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return Whether the departure field is set.
*/
boolean hasDeparture();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return The departure.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture();
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder();
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return Whether the departureOccupancyStatus field is set.
*/
boolean hasDepartureOccupancyStatus();
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return The departureOccupancyStatus.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus();
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return Whether the scheduleRelationship field is set.
*/
boolean hasScheduleRelationship();
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return The scheduleRelationship.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship();
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return Whether the stopTimeProperties field is set.
*/
boolean hasStopTimeProperties();
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return The stopTimeProperties.
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getStopTimeProperties();
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder();
}
/**
*
* Realtime update for arrival and/or departure events for a given stop on a
* trip. Updates can be supplied for both past and future events.
* The producer is allowed, although not required, to drop past events.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate}
*/
public static final class StopTimeUpdate extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
StopTimeUpdate> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeUpdate)
StopTimeUpdateOrBuilder {
private static final long serialVersionUID = 0L;
// Use StopTimeUpdate.newBuilder() to construct.
private StopTimeUpdate(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private StopTimeUpdate() {
stopId_ = "";
departureOccupancyStatus_ = 0;
scheduleRelationship_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StopTimeUpdate();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder.class);
}
/**
*
* The relation between the StopTimeEvents 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. Frequency-based trips (GTFS frequencies.txt with exact_times = 0)
* should not have a SCHEDULED value and should use UNSCHEDULED instead.
*
*
* SCHEDULED = 0;
*/
SCHEDULED(0),
/**
*
* The stop is skipped, i.e., the vehicle will not stop at this stop.
* Arrival and departure are optional.
*
*
* SKIPPED = 1;
*/
SKIPPED(1),
/**
*
* No StopTimeEvents are given for this stop.
* The main intention for this value is to give time predictions only for
* part of a trip, i.e., if the last update for a trip has a NO_DATA
* specifier, then StopTimeEvents for the rest of the stops in the trip
* are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
* NO_DATA = 2;
*/
NO_DATA(2),
/**
*
* The vehicle is operating a trip defined in GTFS frequencies.txt with exact_times = 0.
* This value should not be used for trips that are not defined in GTFS frequencies.txt,
* or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
* with ScheduleRelationship=UNSCHEDULED must also set TripDescriptor.ScheduleRelationship=UNSCHEDULED.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* UNSCHEDULED = 3;
*/
UNSCHEDULED(3),
;
/**
*
* The vehicle is proceeding in accordance with its static schedule of
* stops, although not necessarily according to the times of the schedule.
* At least one of arrival and departure must be provided. If the schedule
* for this stop contains both arrival and departure times then so must
* this update. Frequency-based trips (GTFS frequencies.txt with exact_times = 0)
* should not have a SCHEDULED value and should use UNSCHEDULED instead.
*
*
* SCHEDULED = 0;
*/
public static final int SCHEDULED_VALUE = 0;
/**
*
* The stop is skipped, i.e., the vehicle will not stop at this stop.
* Arrival and departure are optional.
*
*
* SKIPPED = 1;
*/
public static final int SKIPPED_VALUE = 1;
/**
*
* No StopTimeEvents are given for this stop.
* The main intention for this value is to give time predictions only for
* part of a trip, i.e., if the last update for a trip has a NO_DATA
* specifier, then StopTimeEvents for the rest of the stops in the trip
* are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*
*
* NO_DATA = 2;
*/
public static final int NO_DATA_VALUE = 2;
/**
*
* The vehicle is operating a trip defined in GTFS frequencies.txt with exact_times = 0.
* This value should not be used for trips that are not defined in GTFS frequencies.txt,
* or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
* with ScheduleRelationship=UNSCHEDULED must also set TripDescriptor.ScheduleRelationship=UNSCHEDULED.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* UNSCHEDULED = 3;
*/
public static final int UNSCHEDULED_VALUE = 3;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ScheduleRelationship valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ScheduleRelationship forNumber(int value) {
switch (value) {
case 0: return SCHEDULED;
case 1: return SKIPPED;
case 2: return NO_DATA;
case 3: return UNSCHEDULED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ScheduleRelationship> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ScheduleRelationship findValueByNumber(int number) {
return ScheduleRelationship.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDescriptor().getEnumTypes().get(0);
}
private static final ScheduleRelationship[] VALUES = values();
public static ScheduleRelationship valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private ScheduleRelationship(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship)
}
public interface StopTimePropertiesOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return Whether the assignedStopId field is set.
*/
boolean hasAssignedStopId();
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The assignedStopId.
*/
java.lang.String getAssignedStopId();
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The bytes for assignedStopId.
*/
com.google.protobuf.ByteString
getAssignedStopIdBytes();
}
/**
*
* Provides the updated values for the stop time.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
*/
public static final class StopTimeProperties extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
StopTimeProperties> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
StopTimePropertiesOrBuilder {
private static final long serialVersionUID = 0L;
// Use StopTimeProperties.newBuilder() to construct.
private StopTimeProperties(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private StopTimeProperties() {
assignedStopId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StopTimeProperties();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder.class);
}
private int bitField0_;
public static final int ASSIGNED_STOP_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object assignedStopId_ = "";
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return Whether the assignedStopId field is set.
*/
@java.lang.Override
public boolean hasAssignedStopId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The assignedStopId.
*/
@java.lang.Override
public java.lang.String getAssignedStopId() {
java.lang.Object ref = assignedStopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
assignedStopId_ = s;
}
return s;
}
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The bytes for assignedStopId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAssignedStopIdBytes() {
java.lang.Object ref = assignedStopId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
assignedStopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assignedStopId_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assignedStopId_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties) obj;
if (hasAssignedStopId() != other.hasAssignedStopId()) return false;
if (hasAssignedStopId()) {
if (!getAssignedStopId()
.equals(other.getAssignedStopId())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasAssignedStopId()) {
hash = (37 * hash) + ASSIGNED_STOP_ID_FIELD_NUMBER;
hash = (53 * hash) + getAssignedStopId().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Provides the updated values for the stop time.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
assignedStopId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.assignedStopId_ = assignedStopId_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance()) return this;
if (other.hasAssignedStopId()) {
assignedStopId_ = other.assignedStopId_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
assignedStopId_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object assignedStopId_ = "";
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return Whether the assignedStopId field is set.
*/
public boolean hasAssignedStopId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The assignedStopId.
*/
public java.lang.String getAssignedStopId() {
java.lang.Object ref = assignedStopId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
assignedStopId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return The bytes for assignedStopId.
*/
public com.google.protobuf.ByteString
getAssignedStopIdBytes() {
java.lang.Object ref = assignedStopId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
assignedStopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @param value The assignedStopId to set.
* @return This builder for chaining.
*/
public Builder setAssignedStopId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
assignedStopId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @return This builder for chaining.
*/
public Builder clearAssignedStopId() {
assignedStopId_ = getDefaultInstance().getAssignedStopId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string assigned_stop_id = 1;
* @param value The bytes for assignedStopId to set.
* @return This builder for chaining.
*/
public Builder setAssignedStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
assignedStopId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StopTimeProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int STOP_SEQUENCE_FIELD_NUMBER = 1;
private int stopSequence_ = 0;
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return Whether the stopSequence field is set.
*/
@java.lang.Override
public boolean hasStopSequence() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return The stopSequence.
*/
@java.lang.Override
public int getStopSequence() {
return stopSequence_;
}
public static final int STOP_ID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object stopId_ = "";
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return Whether the stopId field is set.
*/
@java.lang.Override
public boolean hasStopId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return The stopId.
*/
@java.lang.Override
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
}
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return The bytes for stopId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ARRIVAL_FIELD_NUMBER = 2;
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent arrival_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return Whether the arrival field is set.
*/
@java.lang.Override
public boolean hasArrival() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return The arrival.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival() {
return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getArrivalOrBuilder() {
return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
}
public static final int DEPARTURE_FIELD_NUMBER = 3;
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent departure_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return Whether the departure field is set.
*/
@java.lang.Override
public boolean hasDeparture() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return The departure.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture() {
return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder getDepartureOrBuilder() {
return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
}
public static final int DEPARTURE_OCCUPANCY_STATUS_FIELD_NUMBER = 7;
private int departureOccupancyStatus_ = 0;
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return Whether the departureOccupancyStatus field is set.
*/
@java.lang.Override public boolean hasDepartureOccupancyStatus() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return The departureOccupancyStatus.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(departureOccupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
}
public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 5;
private int scheduleRelationship_ = 0;
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return The scheduleRelationship.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.SCHEDULED : result;
}
public static final int STOP_TIME_PROPERTIES_FIELD_NUMBER = 6;
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties stopTimeProperties_;
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return Whether the stopTimeProperties field is set.
*/
@java.lang.Override
public boolean hasStopTimeProperties() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return The stopTimeProperties.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getStopTimeProperties() {
return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder() {
return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (hasArrival()) {
if (!getArrival().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasDeparture()) {
if (!getDeparture().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasStopTimeProperties()) {
if (!getStopTimeProperties().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeUInt32(1, stopSequence_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(2, getArrival());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(3, getDeparture());
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stopId_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeEnum(5, scheduleRelationship_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(6, getStopTimeProperties());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeEnum(7, departureOccupancyStatus_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, stopSequence_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getArrival());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDeparture());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stopId_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, scheduleRelationship_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getStopTimeProperties());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, departureOccupancyStatus_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate) obj;
if (hasStopSequence() != other.hasStopSequence()) return false;
if (hasStopSequence()) {
if (getStopSequence()
!= other.getStopSequence()) return false;
}
if (hasStopId() != other.hasStopId()) return false;
if (hasStopId()) {
if (!getStopId()
.equals(other.getStopId())) return false;
}
if (hasArrival() != other.hasArrival()) return false;
if (hasArrival()) {
if (!getArrival()
.equals(other.getArrival())) return false;
}
if (hasDeparture() != other.hasDeparture()) return false;
if (hasDeparture()) {
if (!getDeparture()
.equals(other.getDeparture())) return false;
}
if (hasDepartureOccupancyStatus() != other.hasDepartureOccupancyStatus()) return false;
if (hasDepartureOccupancyStatus()) {
if (departureOccupancyStatus_ != other.departureOccupancyStatus_) return false;
}
if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
if (hasScheduleRelationship()) {
if (scheduleRelationship_ != other.scheduleRelationship_) return false;
}
if (hasStopTimeProperties() != other.hasStopTimeProperties()) return false;
if (hasStopTimeProperties()) {
if (!getStopTimeProperties()
.equals(other.getStopTimeProperties())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasStopSequence()) {
hash = (37 * hash) + STOP_SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + getStopSequence();
}
if (hasStopId()) {
hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
hash = (53 * hash) + getStopId().hashCode();
}
if (hasArrival()) {
hash = (37 * hash) + ARRIVAL_FIELD_NUMBER;
hash = (53 * hash) + getArrival().hashCode();
}
if (hasDeparture()) {
hash = (37 * hash) + DEPARTURE_FIELD_NUMBER;
hash = (53 * hash) + getDeparture().hashCode();
}
if (hasDepartureOccupancyStatus()) {
hash = (37 * hash) + DEPARTURE_OCCUPANCY_STATUS_FIELD_NUMBER;
hash = (53 * hash) + departureOccupancyStatus_;
}
if (hasScheduleRelationship()) {
hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
hash = (53 * hash) + scheduleRelationship_;
}
if (hasStopTimeProperties()) {
hash = (37 * hash) + STOP_TIME_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getStopTimeProperties().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Realtime update for arrival and/or departure events for a given stop on a
* trip. Updates can be supplied for both past and future events.
* The producer is allowed, although not required, to drop past events.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.StopTimeUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.StopTimeUpdate)
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getArrivalFieldBuilder();
getDepartureFieldBuilder();
getStopTimePropertiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
stopSequence_ = 0;
stopId_ = "";
arrival_ = null;
if (arrivalBuilder_ != null) {
arrivalBuilder_.dispose();
arrivalBuilder_ = null;
}
departure_ = null;
if (departureBuilder_ != null) {
departureBuilder_.dispose();
departureBuilder_ = null;
}
departureOccupancyStatus_ = 0;
scheduleRelationship_ = 0;
stopTimeProperties_ = null;
if (stopTimePropertiesBuilder_ != null) {
stopTimePropertiesBuilder_.dispose();
stopTimePropertiesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.stopSequence_ = stopSequence_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.stopId_ = stopId_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.arrival_ = arrivalBuilder_ == null
? arrival_
: arrivalBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.departure_ = departureBuilder_ == null
? departure_
: departureBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.departureOccupancyStatus_ = departureOccupancyStatus_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.scheduleRelationship_ = scheduleRelationship_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.stopTimeProperties_ = stopTimePropertiesBuilder_ == null
? stopTimeProperties_
: stopTimePropertiesBuilder_.build();
to_bitField0_ |= 0x00000040;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance()) return this;
if (other.hasStopSequence()) {
setStopSequence(other.getStopSequence());
}
if (other.hasStopId()) {
stopId_ = other.stopId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasArrival()) {
mergeArrival(other.getArrival());
}
if (other.hasDeparture()) {
mergeDeparture(other.getDeparture());
}
if (other.hasDepartureOccupancyStatus()) {
setDepartureOccupancyStatus(other.getDepartureOccupancyStatus());
}
if (other.hasScheduleRelationship()) {
setScheduleRelationship(other.getScheduleRelationship());
}
if (other.hasStopTimeProperties()) {
mergeStopTimeProperties(other.getStopTimeProperties());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (hasArrival()) {
if (!getArrival().isInitialized()) {
return false;
}
}
if (hasDeparture()) {
if (!getDeparture().isInitialized()) {
return false;
}
}
if (hasStopTimeProperties()) {
if (!getStopTimeProperties().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
stopSequence_ = input.readUInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getArrivalFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 18
case 26: {
input.readMessage(
getDepartureFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 26
case 34: {
stopId_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 34
case 40: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship tmpValue =
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(5, tmpRaw);
} else {
scheduleRelationship_ = tmpRaw;
bitField0_ |= 0x00000020;
}
break;
} // case 40
case 50: {
input.readMessage(
getStopTimePropertiesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 50
case 56: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus tmpValue =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(7, tmpRaw);
} else {
departureOccupancyStatus_ = tmpRaw;
bitField0_ |= 0x00000010;
}
break;
} // case 56
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int stopSequence_ ;
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return Whether the stopSequence field is set.
*/
@java.lang.Override
public boolean hasStopSequence() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return The stopSequence.
*/
@java.lang.Override
public int getStopSequence() {
return stopSequence_;
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @param value The stopSequence to set.
* @return This builder for chaining.
*/
public Builder setStopSequence(int value) {
stopSequence_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Must be the same as in stop_times.txt in the corresponding GTFS feed.
*
*
* optional uint32 stop_sequence = 1;
* @return This builder for chaining.
*/
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;
* @return Whether the stopId field is set.
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return The stopId.
*/
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;
* @return The bytes for stopId.
*/
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @param value The stopId to set.
* @return This builder for chaining.
*/
public Builder setStopId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @return This builder for chaining.
*/
public Builder clearStopId() {
stopId_ = getDefaultInstance().getStopId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Must be the same as in stops.txt in the corresponding GTFS feed.
*
*
* optional string stop_id = 4;
* @param value The bytes for stopId to set.
* @return This builder for chaining.
*/
public Builder setStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent arrival_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> arrivalBuilder_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return Whether the arrival field is set.
*/
public boolean hasArrival() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
* @return The arrival.
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getArrival() {
if (arrivalBuilder_ == null) {
return arrival_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : arrival_;
} else {
return arrivalBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder setArrival(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent value) {
if (arrivalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
arrival_ = value;
} else {
arrivalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* 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();
} else {
arrivalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
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) != 0) &&
arrival_ != null &&
arrival_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
getArrivalBuilder().mergeFrom(value);
} else {
arrival_ = value;
}
} else {
arrivalBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2;
*/
public Builder clearArrival() {
bitField0_ = (bitField0_ & ~0x00000004);
arrival_ = null;
if (arrivalBuilder_ != null) {
arrivalBuilder_.dispose();
arrivalBuilder_ = null;
}
onChanged();
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_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEventOrBuilder> departureBuilder_;
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return Whether the departure field is set.
*/
public boolean hasDeparture() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
* @return The departure.
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent getDeparture() {
if (departureBuilder_ == null) {
return departure_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance() : departure_;
} else {
return departureBuilder_.getMessage();
}
}
/**
* 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;
} else {
departureBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
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();
} else {
departureBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
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) != 0) &&
departure_ != null &&
departure_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent.getDefaultInstance()) {
getDepartureBuilder().mergeFrom(value);
} else {
departure_ = value;
}
} else {
departureBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3;
*/
public Builder clearDeparture() {
bitField0_ = (bitField0_ & ~0x00000008);
departure_ = null;
if (departureBuilder_ != null) {
departureBuilder_.dispose();
departureBuilder_ = null;
}
onChanged();
return this;
}
/**
* 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 departureOccupancyStatus_ = 0;
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return Whether the departureOccupancyStatus field is set.
*/
@java.lang.Override public boolean hasDepartureOccupancyStatus() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return The departureOccupancyStatus.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getDepartureOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(departureOccupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
}
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @param value The departureOccupancyStatus to set.
* @return This builder for chaining.
*/
public Builder setDepartureOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
departureOccupancyStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
* @return This builder for chaining.
*/
public Builder clearDepartureOccupancyStatus() {
bitField0_ = (bitField0_ & ~0x00000010);
departureOccupancyStatus_ = 0;
onChanged();
return this;
}
private int scheduleRelationship_ = 0;
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return The scheduleRelationship.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship getScheduleRelationship() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.forNumber(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship.SCHEDULED : result;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @param value The scheduleRelationship to set.
* @return This builder for chaining.
*/
public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.ScheduleRelationship value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
scheduleRelationship_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED];
* @return This builder for chaining.
*/
public Builder clearScheduleRelationship() {
bitField0_ = (bitField0_ & ~0x00000020);
scheduleRelationship_ = 0;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties stopTimeProperties_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder> stopTimePropertiesBuilder_;
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return Whether the stopTimeProperties field is set.
*/
public boolean hasStopTimeProperties() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
* @return The stopTimeProperties.
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties getStopTimeProperties() {
if (stopTimePropertiesBuilder_ == null) {
return stopTimeProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
} else {
return stopTimePropertiesBuilder_.getMessage();
}
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public Builder setStopTimeProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties value) {
if (stopTimePropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
stopTimeProperties_ = value;
} else {
stopTimePropertiesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public Builder setStopTimeProperties(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder builderForValue) {
if (stopTimePropertiesBuilder_ == null) {
stopTimeProperties_ = builderForValue.build();
} else {
stopTimePropertiesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public Builder mergeStopTimeProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties value) {
if (stopTimePropertiesBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
stopTimeProperties_ != null &&
stopTimeProperties_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance()) {
getStopTimePropertiesBuilder().mergeFrom(value);
} else {
stopTimeProperties_ = value;
}
} else {
stopTimePropertiesBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public Builder clearStopTimeProperties() {
bitField0_ = (bitField0_ & ~0x00000040);
stopTimeProperties_ = null;
if (stopTimePropertiesBuilder_ != null) {
stopTimePropertiesBuilder_.dispose();
stopTimePropertiesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder getStopTimePropertiesBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getStopTimePropertiesFieldBuilder().getBuilder();
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder getStopTimePropertiesOrBuilder() {
if (stopTimePropertiesBuilder_ != null) {
return stopTimePropertiesBuilder_.getMessageOrBuilder();
} else {
return stopTimeProperties_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.getDefaultInstance() : stopTimeProperties_;
}
}
/**
*
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties stop_time_properties = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder>
getStopTimePropertiesFieldBuilder() {
if (stopTimePropertiesBuilder_ == null) {
stopTimePropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimeProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.StopTimePropertiesOrBuilder>(
getStopTimeProperties(),
getParentForChildren(),
isClean());
stopTimeProperties_ = null;
}
return stopTimePropertiesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.StopTimeUpdate)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.StopTimeUpdate)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StopTimeUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TripPropertiesOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TripUpdate.TripProperties)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
boolean hasTripId();
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
java.lang.String getTripId();
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
com.google.protobuf.ByteString
getTripIdBytes();
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return Whether the startDate field is set.
*/
boolean hasStartDate();
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The startDate.
*/
java.lang.String getStartDate();
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The bytes for startDate.
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return Whether the startTime field is set.
*/
boolean hasStartTime();
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The startTime.
*/
java.lang.String getStartTime();
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The bytes for startTime.
*/
com.google.protobuf.ByteString
getStartTimeBytes();
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return Whether the shapeId field is set.
*/
boolean hasShapeId();
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The shapeId.
*/
java.lang.String getShapeId();
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The bytes for shapeId.
*/
com.google.protobuf.ByteString
getShapeIdBytes();
}
/**
*
* Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
* trip_id, start_date, and start_time of a DUPLICATED trip.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.TripProperties}
*/
public static final class TripProperties extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TripProperties> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TripUpdate.TripProperties)
TripPropertiesOrBuilder {
private static final long serialVersionUID = 0L;
// Use TripProperties.newBuilder() to construct.
private TripProperties(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TripProperties() {
tripId_ = "";
startDate_ = "";
startTime_ = "";
shapeId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TripProperties();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_TripProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_TripProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder.class);
}
private int bitField0_;
public static final int TRIP_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object tripId_ = "";
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
@java.lang.Override
public boolean hasTripId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
@java.lang.Override
public java.lang.String getTripId() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tripId_ = s;
}
return s;
}
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTripIdBytes() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tripId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_DATE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object startDate_ = "";
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return Whether the startDate field is set.
*/
@java.lang.Override
public boolean hasStartDate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The startDate.
*/
@java.lang.Override
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startDate_ = s;
}
return s;
}
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The bytes for startDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_TIME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object startTime_ = "";
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return Whether the startTime field is set.
*/
@java.lang.Override
public boolean hasStartTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The startTime.
*/
@java.lang.Override
public java.lang.String getStartTime() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startTime_ = s;
}
return s;
}
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The bytes for startTime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartTimeBytes() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHAPE_ID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object shapeId_ = "";
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return Whether the shapeId field is set.
*/
@java.lang.Override
public boolean hasShapeId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The shapeId.
*/
@java.lang.Override
public java.lang.String getShapeId() {
java.lang.Object ref = shapeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
shapeId_ = s;
}
return s;
}
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The bytes for shapeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getShapeIdBytes() {
java.lang.Object ref = shapeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shapeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tripId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, startDate_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, startTime_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, shapeId_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tripId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, startDate_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, startTime_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, shapeId_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties other = (com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties) obj;
if (hasTripId() != other.hasTripId()) return false;
if (hasTripId()) {
if (!getTripId()
.equals(other.getTripId())) return false;
}
if (hasStartDate() != other.hasStartDate()) return false;
if (hasStartDate()) {
if (!getStartDate()
.equals(other.getStartDate())) return false;
}
if (hasStartTime() != other.hasStartTime()) return false;
if (hasStartTime()) {
if (!getStartTime()
.equals(other.getStartTime())) return false;
}
if (hasShapeId() != other.hasShapeId()) return false;
if (hasShapeId()) {
if (!getShapeId()
.equals(other.getShapeId())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTripId()) {
hash = (37 * hash) + TRIP_ID_FIELD_NUMBER;
hash = (53 * hash) + getTripId().hashCode();
}
if (hasStartDate()) {
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
}
if (hasStartTime()) {
hash = (37 * hash) + START_TIME_FIELD_NUMBER;
hash = (53 * hash) + getStartTime().hashCode();
}
if (hasShapeId()) {
hash = (37 * hash) + SHAPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getShapeId().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties 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.TripProperties parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties 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.TripProperties 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.TripProperties 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.TripProperties 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.TripProperties 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.TripProperties 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.TripProperties parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
* trip_id, start_date, and start_time of a DUPLICATED trip.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TripUpdate.TripProperties}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate.TripProperties)
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_TripProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_TripProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tripId_ = "";
startDate_ = "";
startTime_ = "";
shapeId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_TripProperties_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties result = new com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tripId_ = tripId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.startDate_ = startDate_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.startTime_ = startTime_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.shapeId_ = shapeId_;
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance()) return this;
if (other.hasTripId()) {
tripId_ = other.tripId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasStartDate()) {
startDate_ = other.startDate_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasStartTime()) {
startTime_ = other.startTime_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasShapeId()) {
shapeId_ = other.shapeId_;
bitField0_ |= 0x00000008;
onChanged();
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
tripId_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
startDate_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
startTime_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
shapeId_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object tripId_ = "";
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
public boolean hasTripId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
public java.lang.String getTripId() {
java.lang.Object ref = tripId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tripId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
public com.google.protobuf.ByteString
getTripIdBytes() {
java.lang.Object ref = tripId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tripId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @param value The tripId to set.
* @return This builder for chaining.
*/
public Builder setTripId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
tripId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @return This builder for chaining.
*/
public Builder clearTripId() {
tripId_ = getDefaultInstance().getTripId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
* but will start at a different service date and/or time (defined using the TripProperties.start_date and
* TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
* than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
* be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string trip_id = 1;
* @param value The bytes for tripId to set.
* @return This builder for chaining.
*/
public Builder setTripIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
tripId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object startDate_ = "";
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return Whether the startDate field is set.
*/
public boolean hasStartDate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The startDate.
*/
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startDate_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return The bytes for startDate.
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @param value The startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDate(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
startDate_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @return This builder for chaining.
*/
public Builder clearStartDate() {
startDate_ = getDefaultInstance().getStartDate();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
* schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_date = 2;
* @param value The bytes for startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
startDate_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object startTime_ = "";
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return Whether the startTime field is set.
*/
public boolean hasStartTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The startTime.
*/
public java.lang.String getStartTime() {
java.lang.Object ref = startTime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startTime_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return The bytes for startTime.
*/
public com.google.protobuf.ByteString
getStartTimeBytes() {
java.lang.Object ref = startTime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @param value The startTime to set.
* @return This builder for chaining.
*/
public Builder setStartTime(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
startTime_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @return This builder for chaining.
*/
public Builder clearStartTime() {
startTime_ = getDefaultInstance().getStartTime();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
* in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
* between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
* departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
* of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
* delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
* departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
* prediction time values do not have any offset applied to them and indicate the predicted time as provided.
* For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
* is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
* populated and will be ignored by consumers.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string start_time = 3;
* @param value The bytes for startTime to set.
* @return This builder for chaining.
*/
public Builder setStartTimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
startTime_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object shapeId_ = "";
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return Whether the shapeId field is set.
*/
public boolean hasShapeId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The shapeId.
*/
public java.lang.String getShapeId() {
java.lang.Object ref = shapeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
shapeId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return The bytes for shapeId.
*/
public com.google.protobuf.ByteString
getShapeIdBytes() {
java.lang.Object ref = shapeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shapeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @param value The shapeId to set.
* @return This builder for chaining.
*/
public Builder setShapeId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
shapeId_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @return This builder for chaining.
*/
public Builder clearShapeId() {
shapeId_ = getDefaultInstance().getShapeId();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
* (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
* paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
* nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
* or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
* (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
* be marked as schedule_relationship=SKIPPED.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 4;
* @param value The bytes for shapeId to set.
* @return This builder for chaining.
*/
public Builder setShapeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
shapeId_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate.TripProperties)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate.TripProperties)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TripProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TRIP_FIELD_NUMBER = 1;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
* @return Whether the trip field is set.
*/
@java.lang.Override
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
public static final int VEHICLE_FIELD_NUMBER = 3;
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return Whether the vehicle field is set.
*/
@java.lang.Override
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return The vehicle.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
public static final int STOP_TIME_UPDATE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List stopTimeUpdate_;
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
@java.lang.Override
public java.util.List getStopTimeUpdateList() {
return stopTimeUpdate_;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList() {
return stopTimeUpdate_;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
@java.lang.Override
public int getStopTimeUpdateCount() {
return stopTimeUpdate_.size();
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
return stopTimeUpdate_.get(index);
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
int index) {
return stopTimeUpdate_.get(index);
}
public static final int TIMESTAMP_FIELD_NUMBER = 4;
private long timestamp_ = 0L;
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
public static final int DELAY_FIELD_NUMBER = 5;
private int delay_ = 0;
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return Whether the delay field is set.
*/
@java.lang.Override
public boolean hasDelay() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return The delay.
*/
@java.lang.Override
public int getDelay() {
return delay_;
}
public static final int TRIP_PROPERTIES_FIELD_NUMBER = 6;
private com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties tripProperties_;
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return Whether the tripProperties field is set.
*/
@java.lang.Override
public boolean hasTripProperties() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return The tripProperties.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getTripProperties() {
return tripProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance() : tripProperties_;
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder getTripPropertiesOrBuilder() {
return tripProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance() : tripProperties_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasTrip()) {
memoizedIsInitialized = 0;
return false;
}
if (!getTrip().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getStopTimeUpdateCount(); i++) {
if (!getStopTimeUpdate(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasTripProperties()) {
if (!getTripProperties().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTrip());
}
for (int i = 0; i < stopTimeUpdate_.size(); i++) {
output.writeMessage(2, stopTimeUpdate_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getVehicle());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeUInt64(4, timestamp_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeInt32(5, delay_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(6, getTripProperties());
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTrip());
}
for (int i = 0; i < stopTimeUpdate_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, stopTimeUpdate_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getVehicle());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, timestamp_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, delay_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getTripProperties());
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripUpdate other = (com.google.transit.realtime.GtfsRealtime.TripUpdate) obj;
if (hasTrip() != other.hasTrip()) return false;
if (hasTrip()) {
if (!getTrip()
.equals(other.getTrip())) return false;
}
if (hasVehicle() != other.hasVehicle()) return false;
if (hasVehicle()) {
if (!getVehicle()
.equals(other.getVehicle())) return false;
}
if (!getStopTimeUpdateList()
.equals(other.getStopTimeUpdateList())) return false;
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (getTimestamp()
!= other.getTimestamp()) return false;
}
if (hasDelay() != other.hasDelay()) return false;
if (hasDelay()) {
if (getDelay()
!= other.getDelay()) return false;
}
if (hasTripProperties() != other.hasTripProperties()) return false;
if (hasTripProperties()) {
if (!getTripProperties()
.equals(other.getTripProperties())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTrip()) {
hash = (37 * hash) + TRIP_FIELD_NUMBER;
hash = (53 * hash) + getTrip().hashCode();
}
if (hasVehicle()) {
hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
hash = (53 * hash) + getVehicle().hashCode();
}
if (getStopTimeUpdateCount() > 0) {
hash = (37 * hash) + STOP_TIME_UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getStopTimeUpdateList().hashCode();
}
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
}
if (hasDelay()) {
hash = (37 * hash) + DELAY_FIELD_NUMBER;
hash = (53 * hash) + getDelay();
}
if (hasTripProperties()) {
hash = (37 * hash) + TRIP_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getTripProperties().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripUpdate prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Realtime update of the progress of a vehicle along a trip.
* Depending on the value of ScheduleRelationship, a TripUpdate can specify:
* - A trip that proceeds along the schedule.
* - A trip that proceeds along a route but has no fixed schedule.
* - A trip that have been added or removed with regard to schedule.
*
* The updates can be for future, predicted arrival/departure events, or for
* past events that already occurred.
* Normally, updates should get more precise and more certain (see
* uncertainty below) as the events gets closer to current time.
* Even if that is not possible, the information for past events should be
* precise and certain. In particular, if an update points to time in the past
* but its update's uncertainty is not 0, the client should conclude that the
* update is a (wrong) prediction and that the trip has not completed yet.
*
* Note that the update can describe a trip that is already completed.
* To this end, it is enough to provide an update for the last stop of the trip.
* If the time of that is in the past, the client will conclude from that that
* the whole trip is in the past (it is possible, although inconsequential, to
* also provide updates for preceding stops).
* This option is most relevant for a trip that has completed ahead of schedule,
* but according to the schedule, the trip is still proceeding at the current
* time. Removing the updates for this trip could make the client assume
* that the trip is still proceeding.
* Note that the feed provider is allowed, but not required, to purge past
* updates - this is one case where this would be practically useful.
*
*
* Protobuf type {@code transit_realtime.TripUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripUpdate, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripUpdate)
com.google.transit.realtime.GtfsRealtime.TripUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TripUpdate.class, com.google.transit.realtime.GtfsRealtime.TripUpdate.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripUpdate.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTripFieldBuilder();
getVehicleFieldBuilder();
getStopTimeUpdateFieldBuilder();
getTripPropertiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdate_ = java.util.Collections.emptyList();
} else {
stopTimeUpdate_ = null;
stopTimeUpdateBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
timestamp_ = 0L;
delay_ = 0;
tripProperties_ = null;
if (tripPropertiesBuilder_ != null) {
tripPropertiesBuilder_.dispose();
tripPropertiesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripUpdate_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate build() {
com.google.transit.realtime.GtfsRealtime.TripUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripUpdate result = new com.google.transit.realtime.GtfsRealtime.TripUpdate(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TripUpdate result) {
if (stopTimeUpdateBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
stopTimeUpdate_ = java.util.Collections.unmodifiableList(stopTimeUpdate_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.stopTimeUpdate_ = stopTimeUpdate_;
} else {
result.stopTimeUpdate_ = stopTimeUpdateBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripUpdate result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.trip_ = tripBuilder_ == null
? trip_
: tripBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vehicle_ = vehicleBuilder_ == null
? vehicle_
: vehicleBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.timestamp_ = timestamp_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.delay_ = delay_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.tripProperties_ = tripPropertiesBuilder_ == null
? tripProperties_
: tripPropertiesBuilder_.build();
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripUpdate) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripUpdate other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripUpdate.getDefaultInstance()) return this;
if (other.hasTrip()) {
mergeTrip(other.getTrip());
}
if (other.hasVehicle()) {
mergeVehicle(other.getVehicle());
}
if (stopTimeUpdateBuilder_ == null) {
if (!other.stopTimeUpdate_.isEmpty()) {
if (stopTimeUpdate_.isEmpty()) {
stopTimeUpdate_ = other.stopTimeUpdate_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.addAll(other.stopTimeUpdate_);
}
onChanged();
}
} else {
if (!other.stopTimeUpdate_.isEmpty()) {
if (stopTimeUpdateBuilder_.isEmpty()) {
stopTimeUpdateBuilder_.dispose();
stopTimeUpdateBuilder_ = null;
stopTimeUpdate_ = other.stopTimeUpdate_;
bitField0_ = (bitField0_ & ~0x00000004);
stopTimeUpdateBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getStopTimeUpdateFieldBuilder() : null;
} else {
stopTimeUpdateBuilder_.addAllMessages(other.stopTimeUpdate_);
}
}
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasDelay()) {
setDelay(other.getDelay());
}
if (other.hasTripProperties()) {
mergeTripProperties(other.getTripProperties());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasTrip()) {
return false;
}
if (!getTrip().isInitialized()) {
return false;
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
return false;
}
}
for (int i = 0; i < getStopTimeUpdateCount(); i++) {
if (!getStopTimeUpdate(i).isInitialized()) {
return false;
}
}
if (hasTripProperties()) {
if (!getTripProperties().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getTripFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.PARSER,
extensionRegistry);
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(m);
} else {
stopTimeUpdateBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getVehicleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 32: {
timestamp_ = input.readUInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
delay_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
input.readMessage(
getTripPropertiesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
* @return Whether the trip field is set.
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
if (tripBuilder_ == null) {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
} else {
return tripBuilder_.getMessage();
}
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trip_ = value;
} else {
tripBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
if (tripBuilder_ == null) {
trip_ = builderForValue.build();
} else {
tripBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
trip_ != null &&
trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
getTripBuilder().mergeFrom(value);
} else {
trip_ = value;
}
} else {
tripBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public Builder clearTrip() {
bitField0_ = (bitField0_ & ~0x00000001);
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTripFieldBuilder().getBuilder();
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
if (tripBuilder_ != null) {
return tripBuilder_.getMessageOrBuilder();
} else {
return trip_ == null ?
com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
}
/**
*
* The Trip that this message applies to. There can be at most one
* TripUpdate entity for each actual trip instance.
* If there is none, that means there is no prediction information available.
* It does *not* mean that the trip is progressing according to schedule.
*
*
* required .transit_realtime.TripDescriptor trip = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
getTripFieldBuilder() {
if (tripBuilder_ == null) {
tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>(
getTrip(),
getParentForChildren(),
isClean());
trip_ = null;
}
return tripBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return Whether the vehicle field is set.
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
* @return The vehicle.
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
getVehicleBuilder().mergeFrom(value);
} else {
vehicle_ = value;
}
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public Builder clearVehicle() {
bitField0_ = (bitField0_ & ~0x00000002);
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private java.util.List stopTimeUpdate_ =
java.util.Collections.emptyList();
private void ensureStopTimeUpdateIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
stopTimeUpdate_ = new java.util.ArrayList(stopTimeUpdate_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder> stopTimeUpdateBuilder_;
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List getStopTimeUpdateList() {
if (stopTimeUpdateBuilder_ == null) {
return java.util.Collections.unmodifiableList(stopTimeUpdate_);
} else {
return stopTimeUpdateBuilder_.getMessageList();
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public int getStopTimeUpdateCount() {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.size();
} else {
return stopTimeUpdateBuilder_.getCount();
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getStopTimeUpdate(int index) {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.get(index);
} else {
return stopTimeUpdateBuilder_.getMessage(index);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder setStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.set(index, value);
onChanged();
} else {
stopTimeUpdateBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder setStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.set(index, builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(value);
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate value) {
if (stopTimeUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(index, value);
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addStopTimeUpdate(
int index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder builderForValue) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.add(index, builderForValue.build());
onChanged();
} else {
stopTimeUpdateBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder addAllStopTimeUpdate(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate> values) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, stopTimeUpdate_);
onChanged();
} else {
stopTimeUpdateBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder clearStopTimeUpdate() {
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdate_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
stopTimeUpdateBuilder_.clear();
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public Builder removeStopTimeUpdate(int index) {
if (stopTimeUpdateBuilder_ == null) {
ensureStopTimeUpdateIsMutable();
stopTimeUpdate_.remove(index);
onChanged();
} else {
stopTimeUpdateBuilder_.remove(index);
}
return this;
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder getStopTimeUpdateBuilder(
int index) {
return getStopTimeUpdateFieldBuilder().getBuilder(index);
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder getStopTimeUpdateOrBuilder(
int index) {
if (stopTimeUpdateBuilder_ == null) {
return stopTimeUpdate_.get(index); } else {
return stopTimeUpdateBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateOrBuilderList() {
if (stopTimeUpdateBuilder_ != null) {
return stopTimeUpdateBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(stopTimeUpdate_);
}
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder() {
return getStopTimeUpdateFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder addStopTimeUpdateBuilder(
int index) {
return getStopTimeUpdateFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.getDefaultInstance());
}
/**
*
* Updates to StopTimes for the trip (both future, i.e., predictions, and in
* some cases, past ones, i.e., those that already happened).
* The updates must be sorted by stop_sequence, and apply for all the
* following stops of the trip up to the next specified one.
*
* Example 1:
* For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
* delay of 0 for stop_sequence of the current stop means that the trip is
* exactly on time.
*
* Example 2:
* For the same trip instance, 3 StopTimeUpdates are provided:
* - delay of 5 min for stop_sequence 3
* - delay of 1 min for stop_sequence 8
* - delay of unspecified duration for stop_sequence 10
* This will be interpreted as:
* - stop_sequences 3,4,5,6,7 have delay of 5 min.
* - stop_sequences 8,9 have delay of 1 min.
* - stop_sequences 10,... have unknown delay.
*
*
* repeated .transit_realtime.TripUpdate.StopTimeUpdate stop_time_update = 2;
*/
public java.util.List
getStopTimeUpdateBuilderList() {
return getStopTimeUpdateFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>
getStopTimeUpdateFieldBuilder() {
if (stopTimeUpdateBuilder_ == null) {
stopTimeUpdateBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdateOrBuilder>(
stopTimeUpdate_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
stopTimeUpdate_ = null;
}
return stopTimeUpdateBuilder_;
}
private long timestamp_ ;
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The most recent moment at which the vehicle's real-time progress was measured
* to estimate StopTimes in the future. When StopTimes in the past are provided,
* arrival/departure times may be earlier than this value. In POSIX
* time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 4;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000008);
timestamp_ = 0L;
onChanged();
return this;
}
private int delay_ ;
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return Whether the delay field is set.
*/
@java.lang.Override
public boolean hasDelay() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return The delay.
*/
@java.lang.Override
public int getDelay() {
return delay_;
}
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @param value The delay to set.
* @return This builder for chaining.
*/
public Builder setDelay(int value) {
delay_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The current schedule deviation for the trip. Delay should only be
* specified when the prediction is given relative to some existing schedule
* in GTFS.
*
* Delay (in seconds) can be positive (meaning that the vehicle is late) or
* negative (meaning that the vehicle is ahead of schedule). Delay of 0
* means that the vehicle is exactly on time.
*
* Delay information in StopTimeUpdates take precedent of trip-level delay
* information, such that trip-level delay is only propagated until the next
* stop along the trip with a StopTimeUpdate delay value specified.
*
* Feed providers are strongly encouraged to provide a TripUpdate.timestamp
* value indicating when the delay value was last updated, in order to
* evaluate the freshness of the data.
*
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*
*
* optional int32 delay = 5;
* @return This builder for chaining.
*/
public Builder clearDelay() {
bitField0_ = (bitField0_ & ~0x00000010);
delay_ = 0;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties tripProperties_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder> tripPropertiesBuilder_;
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return Whether the tripProperties field is set.
*/
public boolean hasTripProperties() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
* @return The tripProperties.
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties getTripProperties() {
if (tripPropertiesBuilder_ == null) {
return tripProperties_ == null ? com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance() : tripProperties_;
} else {
return tripPropertiesBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public Builder setTripProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties value) {
if (tripPropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tripProperties_ = value;
} else {
tripPropertiesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public Builder setTripProperties(
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder builderForValue) {
if (tripPropertiesBuilder_ == null) {
tripProperties_ = builderForValue.build();
} else {
tripPropertiesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public Builder mergeTripProperties(com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties value) {
if (tripPropertiesBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
tripProperties_ != null &&
tripProperties_ != com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance()) {
getTripPropertiesBuilder().mergeFrom(value);
} else {
tripProperties_ = value;
}
} else {
tripPropertiesBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public Builder clearTripProperties() {
bitField0_ = (bitField0_ & ~0x00000020);
tripProperties_ = null;
if (tripPropertiesBuilder_ != null) {
tripPropertiesBuilder_.dispose();
tripPropertiesBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder getTripPropertiesBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getTripPropertiesFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
public com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder getTripPropertiesOrBuilder() {
if (tripPropertiesBuilder_ != null) {
return tripPropertiesBuilder_.getMessageOrBuilder();
} else {
return tripProperties_ == null ?
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.getDefaultInstance() : tripProperties_;
}
}
/**
* optional .transit_realtime.TripUpdate.TripProperties trip_properties = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder>
getTripPropertiesFieldBuilder() {
if (tripPropertiesBuilder_ == null) {
tripPropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripProperties.Builder, com.google.transit.realtime.GtfsRealtime.TripUpdate.TripPropertiesOrBuilder>(
getTripProperties(),
getParentForChildren(),
isClean());
tripProperties_ = null;
}
return tripPropertiesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripUpdate)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripUpdate)
private static final com.google.transit.realtime.GtfsRealtime.TripUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripUpdate();
}
public static com.google.transit.realtime.GtfsRealtime.TripUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TripUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripUpdate 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;
* @return Whether the trip field is set.
*/
boolean hasTrip();
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return Whether the vehicle field is set.
*/
boolean hasVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return The vehicle.
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle();
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return Whether the position field is set.
*/
boolean hasPosition();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return The position.
*/
com.google.transit.realtime.GtfsRealtime.Position getPosition();
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder();
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return Whether the currentStopSequence field is set.
*/
boolean hasCurrentStopSequence();
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return The currentStopSequence.
*/
int getCurrentStopSequence();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return Whether the stopId field is set.
*/
boolean hasStopId();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The stopId.
*/
java.lang.String getStopId();
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The bytes for stopId.
*/
com.google.protobuf.ByteString
getStopIdBytes();
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return Whether the currentStatus field is set.
*/
boolean hasCurrentStatus();
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return The currentStatus.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus();
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return The timestamp.
*/
long getTimestamp();
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return Whether the congestionLevel field is set.
*/
boolean hasCongestionLevel();
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return The congestionLevel.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel();
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return Whether the occupancyStatus field is set.
*/
boolean hasOccupancyStatus();
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return The occupancyStatus.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus();
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return Whether the occupancyPercentage field is set.
*/
boolean hasOccupancyPercentage();
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return The occupancyPercentage.
*/
int getOccupancyPercentage();
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
java.util.List
getMultiCarriageDetailsList();
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails getMultiCarriageDetails(int index);
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
int getMultiCarriageDetailsCount();
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder>
getMultiCarriageDetailsOrBuilderList();
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder getMultiCarriageDetailsOrBuilder(
int index);
}
/**
*
* Realtime positioning information for a given vehicle.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition}
*/
public static final class VehiclePosition extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
VehiclePosition> implements
// @@protoc_insertion_point(message_implements:transit_realtime.VehiclePosition)
VehiclePositionOrBuilder {
private static final long serialVersionUID = 0L;
// Use VehiclePosition.newBuilder() to construct.
private VehiclePosition(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private VehiclePosition() {
stopId_ = "";
currentStatus_ = 2;
congestionLevel_ = 0;
occupancyStatus_ = 0;
multiCarriageDetails_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VehiclePosition();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
}
/**
* Protobuf enum {@code transit_realtime.VehiclePosition.VehicleStopStatus}
*/
public enum VehicleStopStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The vehicle is just about to arrive at the stop (on a stop
* display, the vehicle symbol typically flashes).
*
*
* INCOMING_AT = 0;
*/
INCOMING_AT(0),
/**
*
* The vehicle is standing at the stop.
*
*
* STOPPED_AT = 1;
*/
STOPPED_AT(1),
/**
*
* The vehicle has departed and is in transit to the next stop.
*
*
* IN_TRANSIT_TO = 2;
*/
IN_TRANSIT_TO(2),
;
/**
*
* The vehicle is just about to arrive at the stop (on a stop
* display, the vehicle symbol typically flashes).
*
*
* INCOMING_AT = 0;
*/
public static final int INCOMING_AT_VALUE = 0;
/**
*
* The vehicle is standing at the stop.
*
*
* STOPPED_AT = 1;
*/
public static final int STOPPED_AT_VALUE = 1;
/**
*
* The vehicle has departed and is in transit to the next stop.
*
*
* IN_TRANSIT_TO = 2;
*/
public static final int IN_TRANSIT_TO_VALUE = 2;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static VehicleStopStatus valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static VehicleStopStatus forNumber(int value) {
switch (value) {
case 0: return INCOMING_AT;
case 1: return STOPPED_AT;
case 2: return IN_TRANSIT_TO;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
VehicleStopStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public VehicleStopStatus findValueByNumber(int number) {
return VehicleStopStatus.forNumber(number);
}
};
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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CongestionLevel valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CongestionLevel forNumber(int value) {
switch (value) {
case 0: return UNKNOWN_CONGESTION_LEVEL;
case 1: return RUNNING_SMOOTHLY;
case 2: return STOP_AND_GO;
case 3: return CONGESTION;
case 4: return SEVERE_CONGESTION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CongestionLevel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CongestionLevel findValueByNumber(int number) {
return CongestionLevel.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDescriptor().getEnumTypes().get(1);
}
private static final CongestionLevel[] VALUES = values();
public static CongestionLevel valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private CongestionLevel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.VehiclePosition.CongestionLevel)
}
/**
*
* The state of passenger occupancy for the vehicle or carriage.
* Individual producers may not publish all OccupancyStatus values. Therefore, consumers
* must not assume that the OccupancyStatus values follow a linear scale.
* Consumers should represent OccupancyStatus values as the state indicated
* and intended by the producer. Likewise, producers must use OccupancyStatus values that
* correspond to actual vehicle occupancy states.
* For describing passenger occupancy levels on a linear scale, see `occupancy_percentage`.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf enum {@code transit_realtime.VehiclePosition.OccupancyStatus}
*/
public enum OccupancyStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The vehicle or carriage is considered empty by most measures, and has few or no
* passengers onboard, but is still accepting passengers.
*
*
* EMPTY = 0;
*/
EMPTY(0),
/**
*
* The vehicle or carriage has a large number of seats available.
* The amount of free seats out of the total seats available to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
*
* MANY_SEATS_AVAILABLE = 1;
*/
MANY_SEATS_AVAILABLE(1),
/**
*
* The vehicle or carriage has a relatively small number of seats available.
* The amount of free seats out of the total seats available to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
*
* FEW_SEATS_AVAILABLE = 2;
*/
FEW_SEATS_AVAILABLE(2),
/**
*
* The vehicle or carriage can currently accommodate only standing passengers.
*
*
* STANDING_ROOM_ONLY = 3;
*/
STANDING_ROOM_ONLY(3),
/**
*
* The vehicle or carriage can currently accommodate only standing passengers
* and has limited space for them.
*
*
* CRUSHED_STANDING_ROOM_ONLY = 4;
*/
CRUSHED_STANDING_ROOM_ONLY(4),
/**
*
* The vehicle or carriage is considered full by most measures, but may still be
* allowing passengers to board.
*
*
* FULL = 5;
*/
FULL(5),
/**
*
* The vehicle or carriage is not accepting passengers, but usually accepts passengers for boarding.
*
*
* NOT_ACCEPTING_PASSENGERS = 6;
*/
NOT_ACCEPTING_PASSENGERS(6),
/**
*
* The vehicle or carriage doesn't have any occupancy data available at that time.
*
*
* NO_DATA_AVAILABLE = 7;
*/
NO_DATA_AVAILABLE(7),
/**
*
* The vehicle or carriage is not boardable and never accepts passengers.
* Useful for special vehicles or carriages (engine, maintenance carriage, etc…).
*
*
* NOT_BOARDABLE = 8;
*/
NOT_BOARDABLE(8),
;
/**
*
* The vehicle or carriage 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 or carriage has a large number of seats available.
* The amount of free seats out of the total seats available to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*
*
* MANY_SEATS_AVAILABLE = 1;
*/
public static final int MANY_SEATS_AVAILABLE_VALUE = 1;
/**
*
* The vehicle or carriage has a relatively small number of seats available.
* The amount of free seats out of the total seats available to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*
*
* FEW_SEATS_AVAILABLE = 2;
*/
public static final int FEW_SEATS_AVAILABLE_VALUE = 2;
/**
*
* The vehicle or carriage can currently accommodate only standing passengers.
*
*
* STANDING_ROOM_ONLY = 3;
*/
public static final int STANDING_ROOM_ONLY_VALUE = 3;
/**
*
* The vehicle or carriage 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 or carriage 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 or carriage is not accepting passengers, but usually accepts passengers for boarding.
*
*
* NOT_ACCEPTING_PASSENGERS = 6;
*/
public static final int NOT_ACCEPTING_PASSENGERS_VALUE = 6;
/**
*
* The vehicle or carriage doesn't have any occupancy data available at that time.
*
*
* NO_DATA_AVAILABLE = 7;
*/
public static final int NO_DATA_AVAILABLE_VALUE = 7;
/**
*
* The vehicle or carriage is not boardable and never accepts passengers.
* Useful for special vehicles or carriages (engine, maintenance carriage, etc…).
*
*
* NOT_BOARDABLE = 8;
*/
public static final int NOT_BOARDABLE_VALUE = 8;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OccupancyStatus valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static OccupancyStatus forNumber(int value) {
switch (value) {
case 0: return EMPTY;
case 1: return MANY_SEATS_AVAILABLE;
case 2: return FEW_SEATS_AVAILABLE;
case 3: return STANDING_ROOM_ONLY;
case 4: return CRUSHED_STANDING_ROOM_ONLY;
case 5: return FULL;
case 6: return NOT_ACCEPTING_PASSENGERS;
case 7: return NO_DATA_AVAILABLE;
case 8: return NOT_BOARDABLE;
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)
}
public interface CarriageDetailsOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.VehiclePosition.CarriageDetails)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
boolean hasId();
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
boolean hasLabel();
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The label.
*/
java.lang.String getLabel();
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return Whether the occupancyStatus field is set.
*/
boolean hasOccupancyStatus();
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return The occupancyStatus.
*/
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus();
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return Whether the occupancyPercentage field is set.
*/
boolean hasOccupancyPercentage();
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return The occupancyPercentage.
*/
int getOccupancyPercentage();
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return Whether the carriageSequence field is set.
*/
boolean hasCarriageSequence();
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return The carriageSequence.
*/
int getCarriageSequence();
}
/**
*
* Carriage specific details, used for vehicles composed of several carriages
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition.CarriageDetails}
*/
public static final class CarriageDetails extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
CarriageDetails> implements
// @@protoc_insertion_point(message_implements:transit_realtime.VehiclePosition.CarriageDetails)
CarriageDetailsOrBuilder {
private static final long serialVersionUID = 0L;
// Use CarriageDetails.newBuilder() to construct.
private CarriageDetails(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private CarriageDetails() {
id_ = "";
label_ = "";
occupancyStatus_ = 7;
occupancyPercentage_ = -1;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CarriageDetails();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_CarriageDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
}
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABEL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object label_ = "";
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
@java.lang.Override
public boolean hasLabel() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
label_ = s;
}
return s;
}
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OCCUPANCY_STATUS_FIELD_NUMBER = 3;
private int occupancyStatus_ = 7;
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return Whether the occupancyStatus field is set.
*/
@java.lang.Override public boolean hasOccupancyStatus() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return The occupancyStatus.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.NO_DATA_AVAILABLE : result;
}
public static final int OCCUPANCY_PERCENTAGE_FIELD_NUMBER = 4;
private int occupancyPercentage_ = -1;
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return Whether the occupancyPercentage field is set.
*/
@java.lang.Override
public boolean hasOccupancyPercentage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return The occupancyPercentage.
*/
@java.lang.Override
public int getOccupancyPercentage() {
return occupancyPercentage_;
}
public static final int CARRIAGE_SEQUENCE_FIELD_NUMBER = 5;
private int carriageSequence_ = 0;
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return Whether the carriageSequence field is set.
*/
@java.lang.Override
public boolean hasCarriageSequence() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return The carriageSequence.
*/
@java.lang.Override
public int getCarriageSequence() {
return carriageSequence_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeEnum(3, occupancyStatus_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeInt32(4, occupancyPercentage_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeUInt32(5, carriageSequence_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, occupancyStatus_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, occupancyPercentage_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(5, carriageSequence_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails other = (com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (hasLabel() != other.hasLabel()) return false;
if (hasLabel()) {
if (!getLabel()
.equals(other.getLabel())) return false;
}
if (hasOccupancyStatus() != other.hasOccupancyStatus()) return false;
if (hasOccupancyStatus()) {
if (occupancyStatus_ != other.occupancyStatus_) return false;
}
if (hasOccupancyPercentage() != other.hasOccupancyPercentage()) return false;
if (hasOccupancyPercentage()) {
if (getOccupancyPercentage()
!= other.getOccupancyPercentage()) return false;
}
if (hasCarriageSequence() != other.hasCarriageSequence()) return false;
if (hasCarriageSequence()) {
if (getCarriageSequence()
!= other.getCarriageSequence()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
if (hasLabel()) {
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
}
if (hasOccupancyStatus()) {
hash = (37 * hash) + OCCUPANCY_STATUS_FIELD_NUMBER;
hash = (53 * hash) + occupancyStatus_;
}
if (hasOccupancyPercentage()) {
hash = (37 * hash) + OCCUPANCY_PERCENTAGE_FIELD_NUMBER;
hash = (53 * hash) + getOccupancyPercentage();
}
if (hasCarriageSequence()) {
hash = (37 * hash) + CARRIAGE_SEQUENCE_FIELD_NUMBER;
hash = (53 * hash) + getCarriageSequence();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails 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.CarriageDetails parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails 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.CarriageDetails 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.CarriageDetails 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.CarriageDetails 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.CarriageDetails 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.CarriageDetails 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.CarriageDetails parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Carriage specific details, used for vehicles composed of several carriages
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition.CarriageDetails}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.VehiclePosition.CarriageDetails)
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_CarriageDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
label_ = "";
occupancyStatus_ = 7;
occupancyPercentage_ = -1;
carriageSequence_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails build() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails buildPartial() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails result = new com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.label_ = label_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.occupancyStatus_ = occupancyStatus_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.occupancyPercentage_ = occupancyPercentage_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.carriageSequence_ = carriageSequence_;
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails other) {
if (other == com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.getDefaultInstance()) return this;
if (other.hasId()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasLabel()) {
label_ = other.label_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasOccupancyStatus()) {
setOccupancyStatus(other.getOccupancyStatus());
}
if (other.hasOccupancyPercentage()) {
setOccupancyPercentage(other.getOccupancyPercentage());
}
if (other.hasCarriageSequence()) {
setCarriageSequence(other.getCarriageSequence());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
label_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus tmpValue =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(3, tmpRaw);
} else {
occupancyStatus_ = tmpRaw;
bitField0_ |= 0x00000004;
}
break;
} // case 24
case 32: {
occupancyPercentage_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
carriageSequence_ = input.readUInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Identification of the carriage. Should be unique per vehicle.
*
*
* optional string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
public boolean hasLabel() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
label_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string label = 2;
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int occupancyStatus_ = 7;
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return Whether the occupancyStatus field is set.
*/
@java.lang.Override public boolean hasOccupancyStatus() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return The occupancyStatus.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.NO_DATA_AVAILABLE : result;
}
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @param value The occupancyStatus to set.
* @return This builder for chaining.
*/
public Builder setOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
occupancyStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
* @return This builder for chaining.
*/
public Builder clearOccupancyStatus() {
bitField0_ = (bitField0_ & ~0x00000004);
occupancyStatus_ = 7;
onChanged();
return this;
}
private int occupancyPercentage_ = -1;
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return Whether the occupancyPercentage field is set.
*/
@java.lang.Override
public boolean hasOccupancyPercentage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return The occupancyPercentage.
*/
@java.lang.Override
public int getOccupancyPercentage() {
return occupancyPercentage_;
}
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @param value The occupancyPercentage to set.
* @return This builder for chaining.
*/
public Builder setOccupancyPercentage(int value) {
occupancyPercentage_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional int32 occupancy_percentage = 4 [default = -1];
* @return This builder for chaining.
*/
public Builder clearOccupancyPercentage() {
bitField0_ = (bitField0_ & ~0x00000008);
occupancyPercentage_ = -1;
onChanged();
return this;
}
private int carriageSequence_ ;
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return Whether the carriageSequence field is set.
*/
@java.lang.Override
public boolean hasCarriageSequence() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return The carriageSequence.
*/
@java.lang.Override
public int getCarriageSequence() {
return carriageSequence_;
}
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @param value The carriageSequence to set.
* @return This builder for chaining.
*/
public Builder setCarriageSequence(int value) {
carriageSequence_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 carriage_sequence = 5;
* @return This builder for chaining.
*/
public Builder clearCarriageSequence() {
bitField0_ = (bitField0_ & ~0x00000010);
carriageSequence_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.VehiclePosition.CarriageDetails)
}
// @@protoc_insertion_point(class_scope:transit_realtime.VehiclePosition.CarriageDetails)
private static final com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails();
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CarriageDetails parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails 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 vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
* @return Whether the trip field is set.
*/
@java.lang.Override
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
public static final int VEHICLE_FIELD_NUMBER = 8;
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return Whether the vehicle field is set.
*/
@java.lang.Override
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return The vehicle.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
public static final int POSITION_FIELD_NUMBER = 2;
private com.google.transit.realtime.GtfsRealtime.Position position_;
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return Whether the position field is set.
*/
@java.lang.Override
public boolean hasPosition() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return The position.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
public static final int CURRENT_STOP_SEQUENCE_FIELD_NUMBER = 3;
private int currentStopSequence_ = 0;
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return Whether the currentStopSequence field is set.
*/
@java.lang.Override
public boolean hasCurrentStopSequence() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return The currentStopSequence.
*/
@java.lang.Override
public int getCurrentStopSequence() {
return currentStopSequence_;
}
public static final int STOP_ID_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object stopId_ = "";
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return Whether the stopId field is set.
*/
@java.lang.Override
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The stopId.
*/
@java.lang.Override
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The bytes for stopId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CURRENT_STATUS_FIELD_NUMBER = 4;
private int currentStatus_ = 2;
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return Whether the currentStatus field is set.
*/
@java.lang.Override public boolean hasCurrentStatus() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return The currentStatus.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(currentStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
}
public static final int TIMESTAMP_FIELD_NUMBER = 5;
private long timestamp_ = 0L;
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
public static final int CONGESTION_LEVEL_FIELD_NUMBER = 6;
private int congestionLevel_ = 0;
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return Whether the congestionLevel field is set.
*/
@java.lang.Override public boolean hasCongestionLevel() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return The congestionLevel.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(congestionLevel_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL : result;
}
public static final int OCCUPANCY_STATUS_FIELD_NUMBER = 9;
private int occupancyStatus_ = 0;
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return Whether the occupancyStatus field is set.
*/
@java.lang.Override public boolean hasOccupancyStatus() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return The occupancyStatus.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
}
public static final int OCCUPANCY_PERCENTAGE_FIELD_NUMBER = 10;
private int occupancyPercentage_ = 0;
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return Whether the occupancyPercentage field is set.
*/
@java.lang.Override
public boolean hasOccupancyPercentage() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return The occupancyPercentage.
*/
@java.lang.Override
public int getOccupancyPercentage() {
return occupancyPercentage_;
}
public static final int MULTI_CARRIAGE_DETAILS_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private java.util.List multiCarriageDetails_;
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
@java.lang.Override
public java.util.List getMultiCarriageDetailsList() {
return multiCarriageDetails_;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder>
getMultiCarriageDetailsOrBuilderList() {
return multiCarriageDetails_;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
@java.lang.Override
public int getMultiCarriageDetailsCount() {
return multiCarriageDetails_.size();
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails getMultiCarriageDetails(int index) {
return multiCarriageDetails_.get(index);
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder getMultiCarriageDetailsOrBuilder(
int index) {
return multiCarriageDetails_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (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;
}
}
for (int i = 0; i < getMultiCarriageDetailsCount(); i++) {
if (!getMultiCarriageDetails(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getTrip());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(2, getPosition());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeUInt32(3, currentStopSequence_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeEnum(4, currentStatus_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeUInt64(5, timestamp_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeEnum(6, congestionLevel_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, stopId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(8, getVehicle());
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeEnum(9, occupancyStatus_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeUInt32(10, occupancyPercentage_);
}
for (int i = 0; i < multiCarriageDetails_.size(); i++) {
output.writeMessage(11, multiCarriageDetails_.get(i));
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTrip());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getPosition());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, currentStopSequence_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, currentStatus_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, timestamp_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, congestionLevel_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, stopId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getVehicle());
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, occupancyStatus_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(10, occupancyPercentage_);
}
for (int i = 0; i < multiCarriageDetails_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, multiCarriageDetails_.get(i));
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.VehiclePosition other = (com.google.transit.realtime.GtfsRealtime.VehiclePosition) obj;
if (hasTrip() != other.hasTrip()) return false;
if (hasTrip()) {
if (!getTrip()
.equals(other.getTrip())) return false;
}
if (hasVehicle() != other.hasVehicle()) return false;
if (hasVehicle()) {
if (!getVehicle()
.equals(other.getVehicle())) return false;
}
if (hasPosition() != other.hasPosition()) return false;
if (hasPosition()) {
if (!getPosition()
.equals(other.getPosition())) return false;
}
if (hasCurrentStopSequence() != other.hasCurrentStopSequence()) return false;
if (hasCurrentStopSequence()) {
if (getCurrentStopSequence()
!= other.getCurrentStopSequence()) return false;
}
if (hasStopId() != other.hasStopId()) return false;
if (hasStopId()) {
if (!getStopId()
.equals(other.getStopId())) return false;
}
if (hasCurrentStatus() != other.hasCurrentStatus()) return false;
if (hasCurrentStatus()) {
if (currentStatus_ != other.currentStatus_) return false;
}
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (getTimestamp()
!= other.getTimestamp()) return false;
}
if (hasCongestionLevel() != other.hasCongestionLevel()) return false;
if (hasCongestionLevel()) {
if (congestionLevel_ != other.congestionLevel_) return false;
}
if (hasOccupancyStatus() != other.hasOccupancyStatus()) return false;
if (hasOccupancyStatus()) {
if (occupancyStatus_ != other.occupancyStatus_) return false;
}
if (hasOccupancyPercentage() != other.hasOccupancyPercentage()) return false;
if (hasOccupancyPercentage()) {
if (getOccupancyPercentage()
!= other.getOccupancyPercentage()) return false;
}
if (!getMultiCarriageDetailsList()
.equals(other.getMultiCarriageDetailsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTrip()) {
hash = (37 * hash) + TRIP_FIELD_NUMBER;
hash = (53 * hash) + getTrip().hashCode();
}
if (hasVehicle()) {
hash = (37 * hash) + VEHICLE_FIELD_NUMBER;
hash = (53 * hash) + getVehicle().hashCode();
}
if (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_;
}
if (hasOccupancyPercentage()) {
hash = (37 * hash) + OCCUPANCY_PERCENTAGE_FIELD_NUMBER;
hash = (53 * hash) + getOccupancyPercentage();
}
if (getMultiCarriageDetailsCount() > 0) {
hash = (37 * hash) + MULTI_CARRIAGE_DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getMultiCarriageDetailsList().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehiclePosition prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Realtime positioning information for a given vehicle.
*
*
* Protobuf type {@code transit_realtime.VehiclePosition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.VehiclePosition, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.VehiclePosition)
com.google.transit.realtime.GtfsRealtime.VehiclePositionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.class, com.google.transit.realtime.GtfsRealtime.VehiclePosition.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.VehiclePosition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTripFieldBuilder();
getVehicleFieldBuilder();
getPositionFieldBuilder();
getMultiCarriageDetailsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
position_ = null;
if (positionBuilder_ != null) {
positionBuilder_.dispose();
positionBuilder_ = null;
}
currentStopSequence_ = 0;
stopId_ = "";
currentStatus_ = 2;
timestamp_ = 0L;
congestionLevel_ = 0;
occupancyStatus_ = 0;
occupancyPercentage_ = 0;
if (multiCarriageDetailsBuilder_ == null) {
multiCarriageDetails_ = java.util.Collections.emptyList();
} else {
multiCarriageDetails_ = null;
multiCarriageDetailsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehiclePosition_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition build() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition buildPartial() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition result = new com.google.transit.realtime.GtfsRealtime.VehiclePosition(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.VehiclePosition result) {
if (multiCarriageDetailsBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
multiCarriageDetails_ = java.util.Collections.unmodifiableList(multiCarriageDetails_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.multiCarriageDetails_ = multiCarriageDetails_;
} else {
result.multiCarriageDetails_ = multiCarriageDetailsBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehiclePosition result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.trip_ = tripBuilder_ == null
? trip_
: tripBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vehicle_ = vehicleBuilder_ == null
? vehicle_
: vehicleBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.position_ = positionBuilder_ == null
? position_
: positionBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.currentStopSequence_ = currentStopSequence_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.stopId_ = stopId_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.currentStatus_ = currentStatus_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.timestamp_ = timestamp_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.congestionLevel_ = congestionLevel_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.occupancyStatus_ = occupancyStatus_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.occupancyPercentage_ = occupancyPercentage_;
to_bitField0_ |= 0x00000200;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.VehiclePosition) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehiclePosition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehiclePosition other) {
if (other == com.google.transit.realtime.GtfsRealtime.VehiclePosition.getDefaultInstance()) return this;
if (other.hasTrip()) {
mergeTrip(other.getTrip());
}
if (other.hasVehicle()) {
mergeVehicle(other.getVehicle());
}
if (other.hasPosition()) {
mergePosition(other.getPosition());
}
if (other.hasCurrentStopSequence()) {
setCurrentStopSequence(other.getCurrentStopSequence());
}
if (other.hasStopId()) {
stopId_ = other.stopId_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasCurrentStatus()) {
setCurrentStatus(other.getCurrentStatus());
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasCongestionLevel()) {
setCongestionLevel(other.getCongestionLevel());
}
if (other.hasOccupancyStatus()) {
setOccupancyStatus(other.getOccupancyStatus());
}
if (other.hasOccupancyPercentage()) {
setOccupancyPercentage(other.getOccupancyPercentage());
}
if (multiCarriageDetailsBuilder_ == null) {
if (!other.multiCarriageDetails_.isEmpty()) {
if (multiCarriageDetails_.isEmpty()) {
multiCarriageDetails_ = other.multiCarriageDetails_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.addAll(other.multiCarriageDetails_);
}
onChanged();
}
} else {
if (!other.multiCarriageDetails_.isEmpty()) {
if (multiCarriageDetailsBuilder_.isEmpty()) {
multiCarriageDetailsBuilder_.dispose();
multiCarriageDetailsBuilder_ = null;
multiCarriageDetails_ = other.multiCarriageDetails_;
bitField0_ = (bitField0_ & ~0x00000400);
multiCarriageDetailsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMultiCarriageDetailsFieldBuilder() : null;
} else {
multiCarriageDetailsBuilder_.addAllMessages(other.multiCarriageDetails_);
}
}
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (hasTrip()) {
if (!getTrip().isInitialized()) {
return false;
}
}
if (hasVehicle()) {
if (!getVehicle().isInitialized()) {
return false;
}
}
if (hasPosition()) {
if (!getPosition().isInitialized()) {
return false;
}
}
for (int i = 0; i < getMultiCarriageDetailsCount(); i++) {
if (!getMultiCarriageDetails(i).isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getTripFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getPositionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 18
case 24: {
currentStopSequence_ = input.readUInt32();
bitField0_ |= 0x00000008;
break;
} // case 24
case 32: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus tmpValue =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(4, tmpRaw);
} else {
currentStatus_ = tmpRaw;
bitField0_ |= 0x00000020;
}
break;
} // case 32
case 40: {
timestamp_ = input.readUInt64();
bitField0_ |= 0x00000040;
break;
} // case 40
case 48: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel tmpValue =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(6, tmpRaw);
} else {
congestionLevel_ = tmpRaw;
bitField0_ |= 0x00000080;
}
break;
} // case 48
case 58: {
stopId_ = input.readBytes();
bitField0_ |= 0x00000010;
break;
} // case 58
case 66: {
input.readMessage(
getVehicleFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 66
case 72: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus tmpValue =
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(9, tmpRaw);
} else {
occupancyStatus_ = tmpRaw;
bitField0_ |= 0x00000100;
}
break;
} // case 72
case 80: {
occupancyPercentage_ = input.readUInt32();
bitField0_ |= 0x00000200;
break;
} // case 80
case 90: {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.PARSER,
extensionRegistry);
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.add(m);
} else {
multiCarriageDetailsBuilder_.addMessage(m);
}
break;
} // case 90
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
* @return Whether the trip field is set.
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
* @return The trip.
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
if (tripBuilder_ == null) {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
} else {
return tripBuilder_.getMessage();
}
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trip_ = value;
} else {
tripBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder setTrip(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
if (tripBuilder_ == null) {
trip_ = builderForValue.build();
} else {
tripBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
trip_ != null &&
trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
getTripBuilder().mergeFrom(value);
} else {
trip_ = value;
}
} else {
tripBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public Builder clearTrip() {
bitField0_ = (bitField0_ & ~0x00000001);
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTripFieldBuilder().getBuilder();
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
if (tripBuilder_ != null) {
return tripBuilder_.getMessageOrBuilder();
} else {
return trip_ == null ?
com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
}
/**
*
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*
*
* optional .transit_realtime.TripDescriptor trip = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>
getTripFieldBuilder() {
if (tripBuilder_ == null) {
tripBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder>(
getTrip(),
getParentForChildren(),
isClean());
trip_ = null;
}
return tripBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.VehicleDescriptor vehicle_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder> vehicleBuilder_;
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return Whether the vehicle field is set.
*/
public boolean hasVehicle() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
* @return The vehicle.
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getVehicle() {
if (vehicleBuilder_ == null) {
return vehicle_ == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
} else {
return vehicleBuilder_.getMessage();
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder setVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vehicle_ = value;
} else {
vehicleBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder setVehicle(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder builderForValue) {
if (vehicleBuilder_ == null) {
vehicle_ = builderForValue.build();
} else {
vehicleBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder mergeVehicle(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor value) {
if (vehicleBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
vehicle_ != null &&
vehicle_ != com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) {
getVehicleBuilder().mergeFrom(value);
} else {
vehicle_ = value;
}
} else {
vehicleBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public Builder clearVehicle() {
bitField0_ = (bitField0_ & ~0x00000002);
vehicle_ = null;
if (vehicleBuilder_ != null) {
vehicleBuilder_.dispose();
vehicleBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder getVehicleBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getVehicleFieldBuilder().getBuilder();
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder getVehicleOrBuilder() {
if (vehicleBuilder_ != null) {
return vehicleBuilder_.getMessageOrBuilder();
} else {
return vehicle_ == null ?
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance() : vehicle_;
}
}
/**
*
* Additional information on the vehicle that is serving this trip.
*
*
* optional .transit_realtime.VehicleDescriptor vehicle = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>
getVehicleFieldBuilder() {
if (vehicleBuilder_ == null) {
vehicleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder>(
getVehicle(),
getParentForChildren(),
isClean());
vehicle_ = null;
}
return vehicleBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.Position position_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder> positionBuilder_;
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return Whether the position field is set.
*/
public boolean hasPosition() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
* @return The position.
*/
public com.google.transit.realtime.GtfsRealtime.Position getPosition() {
if (positionBuilder_ == null) {
return position_ == null ? com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
} else {
return positionBuilder_.getMessage();
}
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder setPosition(com.google.transit.realtime.GtfsRealtime.Position value) {
if (positionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
position_ = value;
} else {
positionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder setPosition(
com.google.transit.realtime.GtfsRealtime.Position.Builder builderForValue) {
if (positionBuilder_ == null) {
position_ = builderForValue.build();
} else {
positionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder mergePosition(com.google.transit.realtime.GtfsRealtime.Position value) {
if (positionBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
position_ != null &&
position_ != com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) {
getPositionBuilder().mergeFrom(value);
} else {
position_ = value;
}
} else {
positionBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public Builder clearPosition() {
bitField0_ = (bitField0_ & ~0x00000004);
position_ = null;
if (positionBuilder_ != null) {
positionBuilder_.dispose();
positionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.Position.Builder getPositionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPositionFieldBuilder().getBuilder();
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
public com.google.transit.realtime.GtfsRealtime.PositionOrBuilder getPositionOrBuilder() {
if (positionBuilder_ != null) {
return positionBuilder_.getMessageOrBuilder();
} else {
return position_ == null ?
com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance() : position_;
}
}
/**
*
* Current position of this vehicle.
*
*
* optional .transit_realtime.Position position = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>
getPositionFieldBuilder() {
if (positionBuilder_ == null) {
positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.Position, com.google.transit.realtime.GtfsRealtime.Position.Builder, com.google.transit.realtime.GtfsRealtime.PositionOrBuilder>(
getPosition(),
getParentForChildren(),
isClean());
position_ = null;
}
return positionBuilder_;
}
private int currentStopSequence_ ;
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return Whether the currentStopSequence field is set.
*/
@java.lang.Override
public boolean hasCurrentStopSequence() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return The currentStopSequence.
*/
@java.lang.Override
public int getCurrentStopSequence() {
return currentStopSequence_;
}
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @param value The currentStopSequence to set.
* @return This builder for chaining.
*/
public Builder setCurrentStopSequence(int value) {
currentStopSequence_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*
*
* optional uint32 current_stop_sequence = 3;
* @return This builder for chaining.
*/
public Builder clearCurrentStopSequence() {
bitField0_ = (bitField0_ & ~0x00000008);
currentStopSequence_ = 0;
onChanged();
return this;
}
private java.lang.Object stopId_ = "";
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return Whether the stopId field is set.
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The stopId.
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return The bytes for stopId.
*/
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @param value The stopId to set.
* @return This builder for chaining.
*/
public Builder setStopId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @return This builder for chaining.
*/
public Builder clearStopId() {
stopId_ = getDefaultInstance().getStopId();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*
*
* optional string stop_id = 7;
* @param value The bytes for stopId to set.
* @return This builder for chaining.
*/
public Builder setStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int currentStatus_ = 2;
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return Whether the currentStatus field is set.
*/
@java.lang.Override public boolean hasCurrentStatus() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return The currentStatus.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus getCurrentStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.forNumber(currentStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus.IN_TRANSIT_TO : result;
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @param value The currentStatus to set.
* @return This builder for chaining.
*/
public Builder setCurrentStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.VehicleStopStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
currentStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*
*
* optional .transit_realtime.VehiclePosition.VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
* @return This builder for chaining.
*/
public Builder clearCurrentStatus() {
bitField0_ = (bitField0_ & ~0x00000020);
currentStatus_ = 2;
onChanged();
return this;
}
private long timestamp_ ;
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*
*
* optional uint64 timestamp = 5;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000040);
timestamp_ = 0L;
onChanged();
return this;
}
private int congestionLevel_ = 0;
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return Whether the congestionLevel field is set.
*/
@java.lang.Override public boolean hasCongestionLevel() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return The congestionLevel.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel getCongestionLevel() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.forNumber(congestionLevel_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel.UNKNOWN_CONGESTION_LEVEL : result;
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @param value The congestionLevel to set.
* @return This builder for chaining.
*/
public Builder setCongestionLevel(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CongestionLevel value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
congestionLevel_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.VehiclePosition.CongestionLevel congestion_level = 6;
* @return This builder for chaining.
*/
public Builder clearCongestionLevel() {
bitField0_ = (bitField0_ & ~0x00000080);
congestionLevel_ = 0;
onChanged();
return this;
}
private int occupancyStatus_ = 0;
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return Whether the occupancyStatus field is set.
*/
@java.lang.Override public boolean hasOccupancyStatus() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return The occupancyStatus.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus getOccupancyStatus() {
com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus result = com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.forNumber(occupancyStatus_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus.EMPTY : result;
}
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @param value The occupancyStatus to set.
* @return This builder for chaining.
*/
public Builder setOccupancyStatus(com.google.transit.realtime.GtfsRealtime.VehiclePosition.OccupancyStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
occupancyStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*
*
* optional .transit_realtime.VehiclePosition.OccupancyStatus occupancy_status = 9;
* @return This builder for chaining.
*/
public Builder clearOccupancyStatus() {
bitField0_ = (bitField0_ & ~0x00000100);
occupancyStatus_ = 0;
onChanged();
return this;
}
private int occupancyPercentage_ ;
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return Whether the occupancyPercentage field is set.
*/
@java.lang.Override
public boolean hasOccupancyPercentage() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return The occupancyPercentage.
*/
@java.lang.Override
public int getOccupancyPercentage() {
return occupancyPercentage_;
}
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @param value The occupancyPercentage to set.
* @return This builder for chaining.
*/
public Builder setOccupancyPercentage(int value) {
occupancyPercentage_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional uint32 occupancy_percentage = 10;
* @return This builder for chaining.
*/
public Builder clearOccupancyPercentage() {
bitField0_ = (bitField0_ & ~0x00000200);
occupancyPercentage_ = 0;
onChanged();
return this;
}
private java.util.List multiCarriageDetails_ =
java.util.Collections.emptyList();
private void ensureMultiCarriageDetailsIsMutable() {
if (!((bitField0_ & 0x00000400) != 0)) {
multiCarriageDetails_ = new java.util.ArrayList(multiCarriageDetails_);
bitField0_ |= 0x00000400;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder> multiCarriageDetailsBuilder_;
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public java.util.List getMultiCarriageDetailsList() {
if (multiCarriageDetailsBuilder_ == null) {
return java.util.Collections.unmodifiableList(multiCarriageDetails_);
} else {
return multiCarriageDetailsBuilder_.getMessageList();
}
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public int getMultiCarriageDetailsCount() {
if (multiCarriageDetailsBuilder_ == null) {
return multiCarriageDetails_.size();
} else {
return multiCarriageDetailsBuilder_.getCount();
}
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails getMultiCarriageDetails(int index) {
if (multiCarriageDetailsBuilder_ == null) {
return multiCarriageDetails_.get(index);
} else {
return multiCarriageDetailsBuilder_.getMessage(index);
}
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder setMultiCarriageDetails(
int index, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails value) {
if (multiCarriageDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.set(index, value);
onChanged();
} else {
multiCarriageDetailsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder setMultiCarriageDetails(
int index, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder builderForValue) {
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.set(index, builderForValue.build());
onChanged();
} else {
multiCarriageDetailsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder addMultiCarriageDetails(com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails value) {
if (multiCarriageDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.add(value);
onChanged();
} else {
multiCarriageDetailsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder addMultiCarriageDetails(
int index, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails value) {
if (multiCarriageDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.add(index, value);
onChanged();
} else {
multiCarriageDetailsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder addMultiCarriageDetails(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder builderForValue) {
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.add(builderForValue.build());
onChanged();
} else {
multiCarriageDetailsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder addMultiCarriageDetails(
int index, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder builderForValue) {
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.add(index, builderForValue.build());
onChanged();
} else {
multiCarriageDetailsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder addAllMultiCarriageDetails(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails> values) {
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, multiCarriageDetails_);
onChanged();
} else {
multiCarriageDetailsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder clearMultiCarriageDetails() {
if (multiCarriageDetailsBuilder_ == null) {
multiCarriageDetails_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
} else {
multiCarriageDetailsBuilder_.clear();
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public Builder removeMultiCarriageDetails(int index) {
if (multiCarriageDetailsBuilder_ == null) {
ensureMultiCarriageDetailsIsMutable();
multiCarriageDetails_.remove(index);
onChanged();
} else {
multiCarriageDetailsBuilder_.remove(index);
}
return this;
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder getMultiCarriageDetailsBuilder(
int index) {
return getMultiCarriageDetailsFieldBuilder().getBuilder(index);
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder getMultiCarriageDetailsOrBuilder(
int index) {
if (multiCarriageDetailsBuilder_ == null) {
return multiCarriageDetails_.get(index); } else {
return multiCarriageDetailsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder>
getMultiCarriageDetailsOrBuilderList() {
if (multiCarriageDetailsBuilder_ != null) {
return multiCarriageDetailsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(multiCarriageDetails_);
}
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder addMultiCarriageDetailsBuilder() {
return getMultiCarriageDetailsFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.getDefaultInstance());
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder addMultiCarriageDetailsBuilder(
int index) {
return getMultiCarriageDetailsFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.getDefaultInstance());
}
/**
*
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* repeated .transit_realtime.VehiclePosition.CarriageDetails multi_carriage_details = 11;
*/
public java.util.List
getMultiCarriageDetailsBuilderList() {
return getMultiCarriageDetailsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder>
getMultiCarriageDetailsFieldBuilder() {
if (multiCarriageDetailsBuilder_ == null) {
multiCarriageDetailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetails.Builder, com.google.transit.realtime.GtfsRealtime.VehiclePosition.CarriageDetailsOrBuilder>(
multiCarriageDetails_,
((bitField0_ & 0x00000400) != 0),
getParentForChildren(),
isClean());
multiCarriageDetails_ = null;
}
return multiCarriageDetailsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.VehiclePosition)
}
// @@protoc_insertion_point(class_scope:transit_realtime.VehiclePosition)
private static final com.google.transit.realtime.GtfsRealtime.VehiclePosition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehiclePosition();
}
public static com.google.transit.realtime.GtfsRealtime.VehiclePosition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VehiclePosition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.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];
* @return Whether the cause field is set.
*/
boolean hasCause();
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @return The cause.
*/
com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause();
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @return Whether the effect field is set.
*/
boolean hasEffect();
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @return The effect.
*/
com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
* @return Whether the url field is set.
*/
boolean hasUrl();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
* @return The url.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl();
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
* @return Whether the headerText field is set.
*/
boolean hasHeaderText();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
* @return The headerText.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText();
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
* @return Whether the descriptionText field is set.
*/
boolean hasDescriptionText();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
* @return The descriptionText.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText();
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder();
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return Whether the ttsHeaderText field is set.
*/
boolean hasTtsHeaderText();
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return The ttsHeaderText.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsHeaderText();
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsHeaderTextOrBuilder();
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return Whether the ttsDescriptionText field is set.
*/
boolean hasTtsDescriptionText();
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return The ttsDescriptionText.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsDescriptionText();
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsDescriptionTextOrBuilder();
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return Whether the severityLevel field is set.
*/
boolean hasSeverityLevel();
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return The severityLevel.
*/
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel();
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return The image.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage();
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder();
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return Whether the imageAlternativeText field is set.
*/
boolean hasImageAlternativeText();
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return The imageAlternativeText.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText();
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder();
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return Whether the causeDetail field is set.
*/
boolean hasCauseDetail();
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return The causeDetail.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail();
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder();
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return Whether the effectDetail field is set.
*/
boolean hasEffectDetail();
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return The effectDetail.
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail();
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder();
}
/**
*
* An alert, indicating some sort of incident in the public transit network.
*
*
* Protobuf type {@code transit_realtime.Alert}
*/
public static final class Alert extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Alert> implements
// @@protoc_insertion_point(message_implements:transit_realtime.Alert)
AlertOrBuilder {
private static final long serialVersionUID = 0L;
// Use Alert.newBuilder() to construct.
private Alert(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Alert() {
activePeriod_ = java.util.Collections.emptyList();
informedEntity_ = java.util.Collections.emptyList();
cause_ = 1;
effect_ = 8;
severityLevel_ = 1;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Alert();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
}
/**
*
* Cause of this alert. If cause_detail is included, then Cause must also be included.
*
*
* Protobuf enum {@code transit_realtime.Alert.Cause}
*/
public enum Cause
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN_CAUSE = 1;
*/
UNKNOWN_CAUSE(1),
/**
*
* Not machine-representable.
*
*
* OTHER_CAUSE = 2;
*/
OTHER_CAUSE(2),
/**
* TECHNICAL_PROBLEM = 3;
*/
TECHNICAL_PROBLEM(3),
/**
*
* Public transit agency employees stopped working.
*
*
* STRIKE = 4;
*/
STRIKE(4),
/**
*
* People are blocking the streets.
*
*
* DEMONSTRATION = 5;
*/
DEMONSTRATION(5),
/**
* ACCIDENT = 6;
*/
ACCIDENT(6),
/**
* HOLIDAY = 7;
*/
HOLIDAY(7),
/**
* WEATHER = 8;
*/
WEATHER(8),
/**
* MAINTENANCE = 9;
*/
MAINTENANCE(9),
/**
* CONSTRUCTION = 10;
*/
CONSTRUCTION(10),
/**
* POLICE_ACTIVITY = 11;
*/
POLICE_ACTIVITY(11),
/**
* MEDICAL_EMERGENCY = 12;
*/
MEDICAL_EMERGENCY(12),
;
/**
* UNKNOWN_CAUSE = 1;
*/
public static final int UNKNOWN_CAUSE_VALUE = 1;
/**
*
* Not machine-representable.
*
*
* OTHER_CAUSE = 2;
*/
public static final int OTHER_CAUSE_VALUE = 2;
/**
* TECHNICAL_PROBLEM = 3;
*/
public static final int TECHNICAL_PROBLEM_VALUE = 3;
/**
*
* Public transit agency employees stopped working.
*
*
* STRIKE = 4;
*/
public static final int STRIKE_VALUE = 4;
/**
*
* People are blocking the streets.
*
*
* DEMONSTRATION = 5;
*/
public static final int DEMONSTRATION_VALUE = 5;
/**
* ACCIDENT = 6;
*/
public static final int ACCIDENT_VALUE = 6;
/**
* HOLIDAY = 7;
*/
public static final int HOLIDAY_VALUE = 7;
/**
* WEATHER = 8;
*/
public static final int WEATHER_VALUE = 8;
/**
* MAINTENANCE = 9;
*/
public static final int MAINTENANCE_VALUE = 9;
/**
* CONSTRUCTION = 10;
*/
public static final int CONSTRUCTION_VALUE = 10;
/**
* POLICE_ACTIVITY = 11;
*/
public static final int POLICE_ACTIVITY_VALUE = 11;
/**
* MEDICAL_EMERGENCY = 12;
*/
public static final int MEDICAL_EMERGENCY_VALUE = 12;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Cause valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Cause forNumber(int value) {
switch (value) {
case 1: return UNKNOWN_CAUSE;
case 2: return OTHER_CAUSE;
case 3: return TECHNICAL_PROBLEM;
case 4: return STRIKE;
case 5: return DEMONSTRATION;
case 6: return ACCIDENT;
case 7: return HOLIDAY;
case 8: return WEATHER;
case 9: return MAINTENANCE;
case 10: return CONSTRUCTION;
case 11: return POLICE_ACTIVITY;
case 12: return MEDICAL_EMERGENCY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Cause> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Cause findValueByNumber(int number) {
return Cause.forNumber(number);
}
};
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. If effect_detail is included, then Effect must also be included.
*
*
* Protobuf enum {@code transit_realtime.Alert.Effect}
*/
public enum Effect
implements com.google.protobuf.ProtocolMessageEnum {
/**
* NO_SERVICE = 1;
*/
NO_SERVICE(1),
/**
* REDUCED_SERVICE = 2;
*/
REDUCED_SERVICE(2),
/**
*
* We don't care about INsignificant delays: they are hard to detect, have
* little impact on the user, and would clutter the results as they are too
* frequent.
*
*
* SIGNIFICANT_DELAYS = 3;
*/
SIGNIFICANT_DELAYS(3),
/**
* DETOUR = 4;
*/
DETOUR(4),
/**
* ADDITIONAL_SERVICE = 5;
*/
ADDITIONAL_SERVICE(5),
/**
* MODIFIED_SERVICE = 6;
*/
MODIFIED_SERVICE(6),
/**
* OTHER_EFFECT = 7;
*/
OTHER_EFFECT(7),
/**
* UNKNOWN_EFFECT = 8;
*/
UNKNOWN_EFFECT(8),
/**
* STOP_MOVED = 9;
*/
STOP_MOVED(9),
/**
* NO_EFFECT = 10;
*/
NO_EFFECT(10),
/**
* ACCESSIBILITY_ISSUE = 11;
*/
ACCESSIBILITY_ISSUE(11),
;
/**
* NO_SERVICE = 1;
*/
public static final int NO_SERVICE_VALUE = 1;
/**
* REDUCED_SERVICE = 2;
*/
public static final int REDUCED_SERVICE_VALUE = 2;
/**
*
* We don't care about INsignificant delays: they are hard to detect, have
* little impact on the user, and would clutter the results as they are too
* frequent.
*
*
* SIGNIFICANT_DELAYS = 3;
*/
public static final int SIGNIFICANT_DELAYS_VALUE = 3;
/**
* DETOUR = 4;
*/
public static final int DETOUR_VALUE = 4;
/**
* ADDITIONAL_SERVICE = 5;
*/
public static final int ADDITIONAL_SERVICE_VALUE = 5;
/**
* MODIFIED_SERVICE = 6;
*/
public static final int MODIFIED_SERVICE_VALUE = 6;
/**
* OTHER_EFFECT = 7;
*/
public static final int OTHER_EFFECT_VALUE = 7;
/**
* UNKNOWN_EFFECT = 8;
*/
public static final int UNKNOWN_EFFECT_VALUE = 8;
/**
* STOP_MOVED = 9;
*/
public static final int STOP_MOVED_VALUE = 9;
/**
* NO_EFFECT = 10;
*/
public static final int NO_EFFECT_VALUE = 10;
/**
* ACCESSIBILITY_ISSUE = 11;
*/
public static final int ACCESSIBILITY_ISSUE_VALUE = 11;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Effect valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Effect forNumber(int value) {
switch (value) {
case 1: return NO_SERVICE;
case 2: return REDUCED_SERVICE;
case 3: return SIGNIFICANT_DELAYS;
case 4: return DETOUR;
case 5: return ADDITIONAL_SERVICE;
case 6: return MODIFIED_SERVICE;
case 7: return OTHER_EFFECT;
case 8: return UNKNOWN_EFFECT;
case 9: return STOP_MOVED;
case 10: return NO_EFFECT;
case 11: return ACCESSIBILITY_ISSUE;
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)
}
/**
*
* Severity of this alert.
*
*
* Protobuf enum {@code transit_realtime.Alert.SeverityLevel}
*/
public enum SeverityLevel
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN_SEVERITY = 1;
*/
UNKNOWN_SEVERITY(1),
/**
* INFO = 2;
*/
INFO(2),
/**
* WARNING = 3;
*/
WARNING(3),
/**
* SEVERE = 4;
*/
SEVERE(4),
;
/**
* UNKNOWN_SEVERITY = 1;
*/
public static final int UNKNOWN_SEVERITY_VALUE = 1;
/**
* INFO = 2;
*/
public static final int INFO_VALUE = 2;
/**
* WARNING = 3;
*/
public static final int WARNING_VALUE = 3;
/**
* SEVERE = 4;
*/
public static final int SEVERE_VALUE = 4;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SeverityLevel valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static SeverityLevel forNumber(int value) {
switch (value) {
case 1: return UNKNOWN_SEVERITY;
case 2: return INFO;
case 3: return WARNING;
case 4: return SEVERE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SeverityLevel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SeverityLevel findValueByNumber(int number) {
return SeverityLevel.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.Alert.getDescriptor().getEnumTypes().get(2);
}
private static final SeverityLevel[] VALUES = values();
public static SeverityLevel valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private SeverityLevel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.Alert.SeverityLevel)
}
private int bitField0_;
public static final int ACTIVE_PERIOD_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List activePeriod_;
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
@java.lang.Override
public java.util.List getActivePeriodList() {
return activePeriod_;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder>
getActivePeriodOrBuilderList() {
return activePeriod_;
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
@java.lang.Override
public int getActivePeriodCount() {
return activePeriod_.size();
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TimeRange getActivePeriod(int index) {
return activePeriod_.get(index);
}
/**
*
* Time when the alert should be shown to the user. If missing, the
* alert will be shown as long as it appears in the feed.
* If multiple ranges are given, the alert will be shown during all of them.
*
*
* repeated .transit_realtime.TimeRange active_period = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TimeRangeOrBuilder getActivePeriodOrBuilder(
int index) {
return activePeriod_.get(index);
}
public static final int INFORMED_ENTITY_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List informedEntity_;
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
@java.lang.Override
public java.util.List getInformedEntityList() {
return informedEntity_;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder>
getInformedEntityOrBuilderList() {
return informedEntity_;
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
@java.lang.Override
public int getInformedEntityCount() {
return informedEntity_.size();
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelector getInformedEntity(int index) {
return informedEntity_.get(index);
}
/**
*
* Entities whose users we should notify of this alert.
*
*
* repeated .transit_realtime.EntitySelector informed_entity = 5;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder getInformedEntityOrBuilder(
int index) {
return informedEntity_.get(index);
}
public static final int CAUSE_FIELD_NUMBER = 6;
private int cause_ = 1;
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @return Whether the cause field is set.
*/
@java.lang.Override public boolean hasCause() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @return The cause.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause() {
com.google.transit.realtime.GtfsRealtime.Alert.Cause result = com.google.transit.realtime.GtfsRealtime.Alert.Cause.forNumber(cause_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Cause.UNKNOWN_CAUSE : result;
}
public static final int EFFECT_FIELD_NUMBER = 7;
private int effect_ = 8;
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @return Whether the effect field is set.
*/
@java.lang.Override public boolean hasEffect() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @return The effect.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect() {
com.google.transit.realtime.GtfsRealtime.Alert.Effect result = com.google.transit.realtime.GtfsRealtime.Alert.Effect.forNumber(effect_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Effect.UNKNOWN_EFFECT : result;
}
public static final int URL_FIELD_NUMBER = 8;
private com.google.transit.realtime.GtfsRealtime.TranslatedString url_;
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
* @return Whether the url field is set.
*/
@java.lang.Override
public boolean hasUrl() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
* @return The url.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getUrl() {
return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getUrlOrBuilder() {
return url_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : url_;
}
public static final int HEADER_TEXT_FIELD_NUMBER = 10;
private com.google.transit.realtime.GtfsRealtime.TranslatedString headerText_;
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
* @return Whether the headerText field is set.
*/
@java.lang.Override
public boolean hasHeaderText() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
* @return The headerText.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getHeaderText() {
return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getHeaderTextOrBuilder() {
return headerText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : headerText_;
}
public static final int DESCRIPTION_TEXT_FIELD_NUMBER = 11;
private com.google.transit.realtime.GtfsRealtime.TranslatedString descriptionText_;
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
* @return Whether the descriptionText field is set.
*/
@java.lang.Override
public boolean hasDescriptionText() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
* @return The descriptionText.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getDescriptionText() {
return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getDescriptionTextOrBuilder() {
return descriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : descriptionText_;
}
public static final int TTS_HEADER_TEXT_FIELD_NUMBER = 12;
private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsHeaderText_;
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return Whether the ttsHeaderText field is set.
*/
@java.lang.Override
public boolean hasTtsHeaderText() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return The ttsHeaderText.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsHeaderText() {
return ttsHeaderText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsHeaderTextOrBuilder() {
return ttsHeaderText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
}
public static final int TTS_DESCRIPTION_TEXT_FIELD_NUMBER = 13;
private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsDescriptionText_;
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return Whether the ttsDescriptionText field is set.
*/
@java.lang.Override
public boolean hasTtsDescriptionText() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return The ttsDescriptionText.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsDescriptionText() {
return ttsDescriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsDescriptionTextOrBuilder() {
return ttsDescriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
}
public static final int SEVERITY_LEVEL_FIELD_NUMBER = 14;
private int severityLevel_ = 1;
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return Whether the severityLevel field is set.
*/
@java.lang.Override public boolean hasSeverityLevel() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return The severityLevel.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel() {
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel result = com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.forNumber(severityLevel_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.UNKNOWN_SEVERITY : result;
}
public static final int IMAGE_FIELD_NUMBER = 15;
private com.google.transit.realtime.GtfsRealtime.TranslatedImage image_;
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return The image.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage() {
return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder() {
return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
}
public static final int IMAGE_ALTERNATIVE_TEXT_FIELD_NUMBER = 16;
private com.google.transit.realtime.GtfsRealtime.TranslatedString imageAlternativeText_;
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return Whether the imageAlternativeText field is set.
*/
@java.lang.Override
public boolean hasImageAlternativeText() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return The imageAlternativeText.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText() {
return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder() {
return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
}
public static final int CAUSE_DETAIL_FIELD_NUMBER = 17;
private com.google.transit.realtime.GtfsRealtime.TranslatedString causeDetail_;
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return Whether the causeDetail field is set.
*/
@java.lang.Override
public boolean hasCauseDetail() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return The causeDetail.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail() {
return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder() {
return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
}
public static final int EFFECT_DETAIL_FIELD_NUMBER = 18;
private com.google.transit.realtime.GtfsRealtime.TranslatedString effectDetail_;
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return Whether the effectDetail field is set.
*/
@java.lang.Override
public boolean hasEffectDetail() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return The effectDetail.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail() {
return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder() {
return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
for (int i = 0; i < getActivePeriodCount(); i++) {
if (!getActivePeriod(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getInformedEntityCount(); i++) {
if (!getInformedEntity(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasUrl()) {
if (!getUrl().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasHeaderText()) {
if (!getHeaderText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasDescriptionText()) {
if (!getDescriptionText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasTtsHeaderText()) {
if (!getTtsHeaderText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasTtsDescriptionText()) {
if (!getTtsDescriptionText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasImage()) {
if (!getImage().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasImageAlternativeText()) {
if (!getImageAlternativeText().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasCauseDetail()) {
if (!getCauseDetail().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (hasEffectDetail()) {
if (!getEffectDetail().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
for (int i = 0; i < activePeriod_.size(); i++) {
output.writeMessage(1, activePeriod_.get(i));
}
for (int i = 0; i < informedEntity_.size(); i++) {
output.writeMessage(5, informedEntity_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeEnum(6, cause_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(7, effect_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(8, getUrl());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(10, getHeaderText());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(11, getDescriptionText());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(12, getTtsHeaderText());
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(13, getTtsDescriptionText());
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeEnum(14, severityLevel_);
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeMessage(15, getImage());
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeMessage(16, getImageAlternativeText());
}
if (((bitField0_ & 0x00000400) != 0)) {
output.writeMessage(17, getCauseDetail());
}
if (((bitField0_ & 0x00000800) != 0)) {
output.writeMessage(18, getEffectDetail());
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < activePeriod_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, activePeriod_.get(i));
}
for (int i = 0; i < informedEntity_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, informedEntity_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, cause_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, effect_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getUrl());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getHeaderText());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getDescriptionText());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getTtsHeaderText());
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getTtsDescriptionText());
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(14, severityLevel_);
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getImage());
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getImageAlternativeText());
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, getCauseDetail());
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, getEffectDetail());
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Alert)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.Alert other = (com.google.transit.realtime.GtfsRealtime.Alert) obj;
if (!getActivePeriodList()
.equals(other.getActivePeriodList())) return false;
if (!getInformedEntityList()
.equals(other.getInformedEntityList())) return false;
if (hasCause() != other.hasCause()) return false;
if (hasCause()) {
if (cause_ != other.cause_) return false;
}
if (hasEffect() != other.hasEffect()) return false;
if (hasEffect()) {
if (effect_ != other.effect_) return false;
}
if (hasUrl() != other.hasUrl()) return false;
if (hasUrl()) {
if (!getUrl()
.equals(other.getUrl())) return false;
}
if (hasHeaderText() != other.hasHeaderText()) return false;
if (hasHeaderText()) {
if (!getHeaderText()
.equals(other.getHeaderText())) return false;
}
if (hasDescriptionText() != other.hasDescriptionText()) return false;
if (hasDescriptionText()) {
if (!getDescriptionText()
.equals(other.getDescriptionText())) return false;
}
if (hasTtsHeaderText() != other.hasTtsHeaderText()) return false;
if (hasTtsHeaderText()) {
if (!getTtsHeaderText()
.equals(other.getTtsHeaderText())) return false;
}
if (hasTtsDescriptionText() != other.hasTtsDescriptionText()) return false;
if (hasTtsDescriptionText()) {
if (!getTtsDescriptionText()
.equals(other.getTtsDescriptionText())) return false;
}
if (hasSeverityLevel() != other.hasSeverityLevel()) return false;
if (hasSeverityLevel()) {
if (severityLevel_ != other.severityLevel_) return false;
}
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage()
.equals(other.getImage())) return false;
}
if (hasImageAlternativeText() != other.hasImageAlternativeText()) return false;
if (hasImageAlternativeText()) {
if (!getImageAlternativeText()
.equals(other.getImageAlternativeText())) return false;
}
if (hasCauseDetail() != other.hasCauseDetail()) return false;
if (hasCauseDetail()) {
if (!getCauseDetail()
.equals(other.getCauseDetail())) return false;
}
if (hasEffectDetail() != other.hasEffectDetail()) return false;
if (hasEffectDetail()) {
if (!getEffectDetail()
.equals(other.getEffectDetail())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getActivePeriodCount() > 0) {
hash = (37 * hash) + ACTIVE_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getActivePeriodList().hashCode();
}
if (getInformedEntityCount() > 0) {
hash = (37 * hash) + INFORMED_ENTITY_FIELD_NUMBER;
hash = (53 * hash) + getInformedEntityList().hashCode();
}
if (hasCause()) {
hash = (37 * hash) + CAUSE_FIELD_NUMBER;
hash = (53 * hash) + cause_;
}
if (hasEffect()) {
hash = (37 * hash) + EFFECT_FIELD_NUMBER;
hash = (53 * hash) + effect_;
}
if (hasUrl()) {
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
}
if (hasHeaderText()) {
hash = (37 * hash) + HEADER_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getHeaderText().hashCode();
}
if (hasDescriptionText()) {
hash = (37 * hash) + DESCRIPTION_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getDescriptionText().hashCode();
}
if (hasTtsHeaderText()) {
hash = (37 * hash) + TTS_HEADER_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getTtsHeaderText().hashCode();
}
if (hasTtsDescriptionText()) {
hash = (37 * hash) + TTS_DESCRIPTION_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getTtsDescriptionText().hashCode();
}
if (hasSeverityLevel()) {
hash = (37 * hash) + SEVERITY_LEVEL_FIELD_NUMBER;
hash = (53 * hash) + severityLevel_;
}
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
if (hasImageAlternativeText()) {
hash = (37 * hash) + IMAGE_ALTERNATIVE_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getImageAlternativeText().hashCode();
}
if (hasCauseDetail()) {
hash = (37 * hash) + CAUSE_DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getCauseDetail().hashCode();
}
if (hasEffectDetail()) {
hash = (37 * hash) + EFFECT_DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getEffectDetail().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Alert parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Alert prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* An alert, indicating some sort of incident in the public transit network.
*
*
* Protobuf type {@code transit_realtime.Alert}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.Alert, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.Alert)
com.google.transit.realtime.GtfsRealtime.AlertOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Alert.class, com.google.transit.realtime.GtfsRealtime.Alert.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.Alert.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getActivePeriodFieldBuilder();
getInformedEntityFieldBuilder();
getUrlFieldBuilder();
getHeaderTextFieldBuilder();
getDescriptionTextFieldBuilder();
getTtsHeaderTextFieldBuilder();
getTtsDescriptionTextFieldBuilder();
getImageFieldBuilder();
getImageAlternativeTextFieldBuilder();
getCauseDetailFieldBuilder();
getEffectDetailFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (activePeriodBuilder_ == null) {
activePeriod_ = java.util.Collections.emptyList();
} else {
activePeriod_ = null;
activePeriodBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (informedEntityBuilder_ == null) {
informedEntity_ = java.util.Collections.emptyList();
} else {
informedEntity_ = null;
informedEntityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
cause_ = 1;
effect_ = 8;
url_ = null;
if (urlBuilder_ != null) {
urlBuilder_.dispose();
urlBuilder_ = null;
}
headerText_ = null;
if (headerTextBuilder_ != null) {
headerTextBuilder_.dispose();
headerTextBuilder_ = null;
}
descriptionText_ = null;
if (descriptionTextBuilder_ != null) {
descriptionTextBuilder_.dispose();
descriptionTextBuilder_ = null;
}
ttsHeaderText_ = null;
if (ttsHeaderTextBuilder_ != null) {
ttsHeaderTextBuilder_.dispose();
ttsHeaderTextBuilder_ = null;
}
ttsDescriptionText_ = null;
if (ttsDescriptionTextBuilder_ != null) {
ttsDescriptionTextBuilder_.dispose();
ttsDescriptionTextBuilder_ = null;
}
severityLevel_ = 1;
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
imageAlternativeText_ = null;
if (imageAlternativeTextBuilder_ != null) {
imageAlternativeTextBuilder_.dispose();
imageAlternativeTextBuilder_ = null;
}
causeDetail_ = null;
if (causeDetailBuilder_ != null) {
causeDetailBuilder_.dispose();
causeDetailBuilder_ = null;
}
effectDetail_ = null;
if (effectDetailBuilder_ != null) {
effectDetailBuilder_.dispose();
effectDetailBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Alert_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.Alert.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert build() {
com.google.transit.realtime.GtfsRealtime.Alert result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert buildPartial() {
com.google.transit.realtime.GtfsRealtime.Alert result = new com.google.transit.realtime.GtfsRealtime.Alert(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.Alert result) {
if (activePeriodBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
activePeriod_ = java.util.Collections.unmodifiableList(activePeriod_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.activePeriod_ = activePeriod_;
} else {
result.activePeriod_ = activePeriodBuilder_.build();
}
if (informedEntityBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
informedEntity_ = java.util.Collections.unmodifiableList(informedEntity_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.informedEntity_ = informedEntity_;
} else {
result.informedEntity_ = informedEntityBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Alert result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.cause_ = cause_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.effect_ = effect_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.url_ = urlBuilder_ == null
? url_
: urlBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.headerText_ = headerTextBuilder_ == null
? headerText_
: headerTextBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.descriptionText_ = descriptionTextBuilder_ == null
? descriptionText_
: descriptionTextBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.ttsHeaderText_ = ttsHeaderTextBuilder_ == null
? ttsHeaderText_
: ttsHeaderTextBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.ttsDescriptionText_ = ttsDescriptionTextBuilder_ == null
? ttsDescriptionText_
: ttsDescriptionTextBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.severityLevel_ = severityLevel_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.image_ = imageBuilder_ == null
? image_
: imageBuilder_.build();
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.imageAlternativeText_ = imageAlternativeTextBuilder_ == null
? imageAlternativeText_
: imageAlternativeTextBuilder_.build();
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.causeDetail_ = causeDetailBuilder_ == null
? causeDetail_
: causeDetailBuilder_.build();
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.effectDetail_ = effectDetailBuilder_ == null
? effectDetail_
: effectDetailBuilder_.build();
to_bitField0_ |= 0x00000800;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
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());
}
if (other.hasTtsHeaderText()) {
mergeTtsHeaderText(other.getTtsHeaderText());
}
if (other.hasTtsDescriptionText()) {
mergeTtsDescriptionText(other.getTtsDescriptionText());
}
if (other.hasSeverityLevel()) {
setSeverityLevel(other.getSeverityLevel());
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
if (other.hasImageAlternativeText()) {
mergeImageAlternativeText(other.getImageAlternativeText());
}
if (other.hasCauseDetail()) {
mergeCauseDetail(other.getCauseDetail());
}
if (other.hasEffectDetail()) {
mergeEffectDetail(other.getEffectDetail());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
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 (hasTtsHeaderText()) {
if (!getTtsHeaderText().isInitialized()) {
return false;
}
}
if (hasTtsDescriptionText()) {
if (!getTtsDescriptionText().isInitialized()) {
return false;
}
}
if (hasImage()) {
if (!getImage().isInitialized()) {
return false;
}
}
if (hasImageAlternativeText()) {
if (!getImageAlternativeText().isInitialized()) {
return false;
}
}
if (hasCauseDetail()) {
if (!getCauseDetail().isInitialized()) {
return false;
}
}
if (hasEffectDetail()) {
if (!getEffectDetail().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.transit.realtime.GtfsRealtime.TimeRange m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.TimeRange.PARSER,
extensionRegistry);
if (activePeriodBuilder_ == null) {
ensureActivePeriodIsMutable();
activePeriod_.add(m);
} else {
activePeriodBuilder_.addMessage(m);
}
break;
} // case 10
case 42: {
com.google.transit.realtime.GtfsRealtime.EntitySelector m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.EntitySelector.PARSER,
extensionRegistry);
if (informedEntityBuilder_ == null) {
ensureInformedEntityIsMutable();
informedEntity_.add(m);
} else {
informedEntityBuilder_.addMessage(m);
}
break;
} // case 42
case 48: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.Alert.Cause tmpValue =
com.google.transit.realtime.GtfsRealtime.Alert.Cause.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(6, tmpRaw);
} else {
cause_ = tmpRaw;
bitField0_ |= 0x00000004;
}
break;
} // case 48
case 56: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.Alert.Effect tmpValue =
com.google.transit.realtime.GtfsRealtime.Alert.Effect.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(7, tmpRaw);
} else {
effect_ = tmpRaw;
bitField0_ |= 0x00000008;
}
break;
} // case 56
case 66: {
input.readMessage(
getUrlFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 66
case 82: {
input.readMessage(
getHeaderTextFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 82
case 90: {
input.readMessage(
getDescriptionTextFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 90
case 98: {
input.readMessage(
getTtsHeaderTextFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 98
case 106: {
input.readMessage(
getTtsDescriptionTextFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 106
case 112: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel tmpValue =
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(14, tmpRaw);
} else {
severityLevel_ = tmpRaw;
bitField0_ |= 0x00000200;
}
break;
} // case 112
case 122: {
input.readMessage(
getImageFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000400;
break;
} // case 122
case 130: {
input.readMessage(
getImageAlternativeTextFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000800;
break;
} // case 130
case 138: {
input.readMessage(
getCauseDetailFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 138
case 146: {
input.readMessage(
getEffectDetailFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00002000;
break;
} // case 146
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List activePeriod_ =
java.util.Collections.emptyList();
private void ensureActivePeriodIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
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) != 0),
getParentForChildren(),
isClean());
activePeriod_ = null;
}
return activePeriodBuilder_;
}
private java.util.List informedEntity_ =
java.util.Collections.emptyList();
private void ensureInformedEntityIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
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) != 0),
getParentForChildren(),
isClean());
informedEntity_ = null;
}
return informedEntityBuilder_;
}
private int cause_ = 1;
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @return Whether the cause field is set.
*/
@java.lang.Override public boolean hasCause() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @return The cause.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert.Cause getCause() {
com.google.transit.realtime.GtfsRealtime.Alert.Cause result = com.google.transit.realtime.GtfsRealtime.Alert.Cause.forNumber(cause_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Cause.UNKNOWN_CAUSE : result;
}
/**
* optional .transit_realtime.Alert.Cause cause = 6 [default = UNKNOWN_CAUSE];
* @param value The cause to set.
* @return This builder for chaining.
*/
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];
* @return This builder for chaining.
*/
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];
* @return Whether the effect field is set.
*/
@java.lang.Override public boolean hasEffect() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @return The effect.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert.Effect getEffect() {
com.google.transit.realtime.GtfsRealtime.Alert.Effect result = com.google.transit.realtime.GtfsRealtime.Alert.Effect.forNumber(effect_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.Effect.UNKNOWN_EFFECT : result;
}
/**
* optional .transit_realtime.Alert.Effect effect = 7 [default = UNKNOWN_EFFECT];
* @param value The effect to set.
* @return This builder for chaining.
*/
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];
* @return This builder for chaining.
*/
public Builder clearEffect() {
bitField0_ = (bitField0_ & ~0x00000008);
effect_ = 8;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString url_;
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;
* @return Whether the url field is set.
*/
public boolean hasUrl() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
* @return The url.
*/
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;
} else {
urlBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
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();
} else {
urlBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
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) != 0) &&
url_ != null &&
url_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getUrlBuilder().mergeFrom(value);
} else {
url_ = value;
}
} else {
urlBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The URL which provides additional information about the alert.
*
*
* optional .transit_realtime.TranslatedString url = 8;
*/
public Builder clearUrl() {
bitField0_ = (bitField0_ & ~0x00000010);
url_ = null;
if (urlBuilder_ != null) {
urlBuilder_.dispose();
urlBuilder_ = null;
}
onChanged();
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_;
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;
* @return Whether the headerText field is set.
*/
public boolean hasHeaderText() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Alert header. Contains a short summary of the alert text as plain-text.
*
*
* optional .transit_realtime.TranslatedString header_text = 10;
* @return The headerText.
*/
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;
} else {
headerTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
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();
} else {
headerTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
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) != 0) &&
headerText_ != null &&
headerText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getHeaderTextBuilder().mergeFrom(value);
} else {
headerText_ = value;
}
} else {
headerTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
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() {
bitField0_ = (bitField0_ & ~0x00000020);
headerText_ = null;
if (headerTextBuilder_ != null) {
headerTextBuilder_.dispose();
headerTextBuilder_ = null;
}
onChanged();
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_;
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;
* @return Whether the descriptionText field is set.
*/
public boolean hasDescriptionText() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Full description for the alert as plain-text. The information in the
* description should add to the information of the header.
*
*
* optional .transit_realtime.TranslatedString description_text = 11;
* @return The descriptionText.
*/
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;
} else {
descriptionTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
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();
} else {
descriptionTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
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) != 0) &&
descriptionText_ != null &&
descriptionText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getDescriptionTextBuilder().mergeFrom(value);
} else {
descriptionText_ = value;
}
} else {
descriptionTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
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() {
bitField0_ = (bitField0_ & ~0x00000040);
descriptionText_ = null;
if (descriptionTextBuilder_ != null) {
descriptionTextBuilder_.dispose();
descriptionTextBuilder_ = null;
}
onChanged();
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_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsHeaderText_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> ttsHeaderTextBuilder_;
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return Whether the ttsHeaderText field is set.
*/
public boolean hasTtsHeaderText() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
* @return The ttsHeaderText.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsHeaderText() {
if (ttsHeaderTextBuilder_ == null) {
return ttsHeaderText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
} else {
return ttsHeaderTextBuilder_.getMessage();
}
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public Builder setTtsHeaderText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (ttsHeaderTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttsHeaderText_ = value;
} else {
ttsHeaderTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public Builder setTtsHeaderText(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (ttsHeaderTextBuilder_ == null) {
ttsHeaderText_ = builderForValue.build();
} else {
ttsHeaderTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public Builder mergeTtsHeaderText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (ttsHeaderTextBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
ttsHeaderText_ != null &&
ttsHeaderText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getTtsHeaderTextBuilder().mergeFrom(value);
} else {
ttsHeaderText_ = value;
}
} else {
ttsHeaderTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public Builder clearTtsHeaderText() {
bitField0_ = (bitField0_ & ~0x00000080);
ttsHeaderText_ = null;
if (ttsHeaderTextBuilder_ != null) {
ttsHeaderTextBuilder_.dispose();
ttsHeaderTextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getTtsHeaderTextBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getTtsHeaderTextFieldBuilder().getBuilder();
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsHeaderTextOrBuilder() {
if (ttsHeaderTextBuilder_ != null) {
return ttsHeaderTextBuilder_.getMessageOrBuilder();
} else {
return ttsHeaderText_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsHeaderText_;
}
}
/**
*
* Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
*
*
* optional .transit_realtime.TranslatedString tts_header_text = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getTtsHeaderTextFieldBuilder() {
if (ttsHeaderTextBuilder_ == null) {
ttsHeaderTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getTtsHeaderText(),
getParentForChildren(),
isClean());
ttsHeaderText_ = null;
}
return ttsHeaderTextBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString ttsDescriptionText_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> ttsDescriptionTextBuilder_;
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return Whether the ttsDescriptionText field is set.
*/
public boolean hasTtsDescriptionText() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
* @return The ttsDescriptionText.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getTtsDescriptionText() {
if (ttsDescriptionTextBuilder_ == null) {
return ttsDescriptionText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
} else {
return ttsDescriptionTextBuilder_.getMessage();
}
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public Builder setTtsDescriptionText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (ttsDescriptionTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttsDescriptionText_ = value;
} else {
ttsDescriptionTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public Builder setTtsDescriptionText(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (ttsDescriptionTextBuilder_ == null) {
ttsDescriptionText_ = builderForValue.build();
} else {
ttsDescriptionTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public Builder mergeTtsDescriptionText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (ttsDescriptionTextBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0) &&
ttsDescriptionText_ != null &&
ttsDescriptionText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getTtsDescriptionTextBuilder().mergeFrom(value);
} else {
ttsDescriptionText_ = value;
}
} else {
ttsDescriptionTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public Builder clearTtsDescriptionText() {
bitField0_ = (bitField0_ & ~0x00000100);
ttsDescriptionText_ = null;
if (ttsDescriptionTextBuilder_ != null) {
ttsDescriptionTextBuilder_.dispose();
ttsDescriptionTextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getTtsDescriptionTextBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getTtsDescriptionTextFieldBuilder().getBuilder();
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getTtsDescriptionTextOrBuilder() {
if (ttsDescriptionTextBuilder_ != null) {
return ttsDescriptionTextBuilder_.getMessageOrBuilder();
} else {
return ttsDescriptionText_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : ttsDescriptionText_;
}
}
/**
*
* Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
*
*
* optional .transit_realtime.TranslatedString tts_description_text = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getTtsDescriptionTextFieldBuilder() {
if (ttsDescriptionTextBuilder_ == null) {
ttsDescriptionTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getTtsDescriptionText(),
getParentForChildren(),
isClean());
ttsDescriptionText_ = null;
}
return ttsDescriptionTextBuilder_;
}
private int severityLevel_ = 1;
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return Whether the severityLevel field is set.
*/
@java.lang.Override public boolean hasSeverityLevel() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return The severityLevel.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel getSeverityLevel() {
com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel result = com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.forNumber(severityLevel_);
return result == null ? com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel.UNKNOWN_SEVERITY : result;
}
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @param value The severityLevel to set.
* @return This builder for chaining.
*/
public Builder setSeverityLevel(com.google.transit.realtime.GtfsRealtime.Alert.SeverityLevel value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
severityLevel_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.Alert.SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
* @return This builder for chaining.
*/
public Builder clearSeverityLevel() {
bitField0_ = (bitField0_ & ~0x00000200);
severityLevel_ = 1;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedImage image_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder> imageBuilder_;
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
* @return The image.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage getImage() {
if (imageBuilder_ == null) {
return image_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
} else {
return imageBuilder_.getMessage();
}
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public Builder setImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public Builder setImage(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public Builder mergeImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0) &&
image_ != null &&
image_ != com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000400);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder getImageBuilder() {
bitField0_ |= 0x00000400;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder getImageOrBuilder() {
if (imageBuilder_ != null) {
return imageBuilder_.getMessageOrBuilder();
} else {
return image_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance() : image_;
}
}
/**
*
* TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
* The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedImage image = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder>(
getImage(),
getParentForChildren(),
isClean());
image_ = null;
}
return imageBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString imageAlternativeText_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> imageAlternativeTextBuilder_;
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return Whether the imageAlternativeText field is set.
*/
public boolean hasImageAlternativeText() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
* @return The imageAlternativeText.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getImageAlternativeText() {
if (imageAlternativeTextBuilder_ == null) {
return imageAlternativeText_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
} else {
return imageAlternativeTextBuilder_.getMessage();
}
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public Builder setImageAlternativeText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (imageAlternativeTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
imageAlternativeText_ = value;
} else {
imageAlternativeTextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public Builder setImageAlternativeText(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (imageAlternativeTextBuilder_ == null) {
imageAlternativeText_ = builderForValue.build();
} else {
imageAlternativeTextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public Builder mergeImageAlternativeText(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (imageAlternativeTextBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0) &&
imageAlternativeText_ != null &&
imageAlternativeText_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getImageAlternativeTextBuilder().mergeFrom(value);
} else {
imageAlternativeText_ = value;
}
} else {
imageAlternativeTextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public Builder clearImageAlternativeText() {
bitField0_ = (bitField0_ & ~0x00000800);
imageAlternativeText_ = null;
if (imageAlternativeTextBuilder_ != null) {
imageAlternativeTextBuilder_.dispose();
imageAlternativeTextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getImageAlternativeTextBuilder() {
bitField0_ |= 0x00000800;
onChanged();
return getImageAlternativeTextFieldBuilder().getBuilder();
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getImageAlternativeTextOrBuilder() {
if (imageAlternativeTextBuilder_ != null) {
return imageAlternativeTextBuilder_.getMessageOrBuilder();
} else {
return imageAlternativeText_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : imageAlternativeText_;
}
}
/**
*
* Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
* or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString image_alternative_text = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getImageAlternativeTextFieldBuilder() {
if (imageAlternativeTextBuilder_ == null) {
imageAlternativeTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getImageAlternativeText(),
getParentForChildren(),
isClean());
imageAlternativeText_ = null;
}
return imageAlternativeTextBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString causeDetail_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> causeDetailBuilder_;
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return Whether the causeDetail field is set.
*/
public boolean hasCauseDetail() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
* @return The causeDetail.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getCauseDetail() {
if (causeDetailBuilder_ == null) {
return causeDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
} else {
return causeDetailBuilder_.getMessage();
}
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public Builder setCauseDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (causeDetailBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
causeDetail_ = value;
} else {
causeDetailBuilder_.setMessage(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public Builder setCauseDetail(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (causeDetailBuilder_ == null) {
causeDetail_ = builderForValue.build();
} else {
causeDetailBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public Builder mergeCauseDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (causeDetailBuilder_ == null) {
if (((bitField0_ & 0x00001000) != 0) &&
causeDetail_ != null &&
causeDetail_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getCauseDetailBuilder().mergeFrom(value);
} else {
causeDetail_ = value;
}
} else {
causeDetailBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public Builder clearCauseDetail() {
bitField0_ = (bitField0_ & ~0x00001000);
causeDetail_ = null;
if (causeDetailBuilder_ != null) {
causeDetailBuilder_.dispose();
causeDetailBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getCauseDetailBuilder() {
bitField0_ |= 0x00001000;
onChanged();
return getCauseDetailFieldBuilder().getBuilder();
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getCauseDetailOrBuilder() {
if (causeDetailBuilder_ != null) {
return causeDetailBuilder_.getMessageOrBuilder();
} else {
return causeDetail_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : causeDetail_;
}
}
/**
*
* Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString cause_detail = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getCauseDetailFieldBuilder() {
if (causeDetailBuilder_ == null) {
causeDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getCauseDetail(),
getParentForChildren(),
isClean());
causeDetail_ = null;
}
return causeDetailBuilder_;
}
private com.google.transit.realtime.GtfsRealtime.TranslatedString effectDetail_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder> effectDetailBuilder_;
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return Whether the effectDetail field is set.
*/
public boolean hasEffectDetail() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
* @return The effectDetail.
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString getEffectDetail() {
if (effectDetailBuilder_ == null) {
return effectDetail_ == null ? com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
} else {
return effectDetailBuilder_.getMessage();
}
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public Builder setEffectDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (effectDetailBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
effectDetail_ = value;
} else {
effectDetailBuilder_.setMessage(value);
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public Builder setEffectDetail(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder builderForValue) {
if (effectDetailBuilder_ == null) {
effectDetail_ = builderForValue.build();
} else {
effectDetailBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public Builder mergeEffectDetail(com.google.transit.realtime.GtfsRealtime.TranslatedString value) {
if (effectDetailBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0) &&
effectDetail_ != null &&
effectDetail_ != com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) {
getEffectDetailBuilder().mergeFrom(value);
} else {
effectDetail_ = value;
}
} else {
effectDetailBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public Builder clearEffectDetail() {
bitField0_ = (bitField0_ & ~0x00002000);
effectDetail_ = null;
if (effectDetailBuilder_ != null) {
effectDetailBuilder_.dispose();
effectDetailBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder getEffectDetailBuilder() {
bitField0_ |= 0x00002000;
onChanged();
return getEffectDetailFieldBuilder().getBuilder();
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder getEffectDetailOrBuilder() {
if (effectDetailBuilder_ != null) {
return effectDetailBuilder_.getMessageOrBuilder();
} else {
return effectDetail_ == null ?
com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance() : effectDetail_;
}
}
/**
*
* Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional .transit_realtime.TranslatedString effect_detail = 18;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>
getEffectDetailFieldBuilder() {
if (effectDetailBuilder_ == null) {
effectDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder>(
getEffectDetail(),
getParentForChildren(),
isClean());
effectDetail_ = null;
}
return effectDetailBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.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() {
@java.lang.Override
public Alert parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Alert getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TimeRangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TimeRange)
com.google.protobuf.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;
* @return Whether the start field is set.
*/
boolean hasStart();
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
* @return The start.
*/
long getStart();
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
* @return Whether the end field is set.
*/
boolean hasEnd();
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
* @return The end.
*/
long getEnd();
}
/**
*
* A time interval. The interval is considered active at time 't' if 't' is
* greater than or equal to the start time and less than the end time.
*
*
* Protobuf type {@code transit_realtime.TimeRange}
*/
public static final class TimeRange extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TimeRange> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TimeRange)
TimeRangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use TimeRange.newBuilder() to construct.
private TimeRange(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TimeRange() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TimeRange();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
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_ = 0L;
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
* @return Whether the start field is set.
*/
@java.lang.Override
public boolean hasStart() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
* @return The start.
*/
@java.lang.Override
public long getStart() {
return start_;
}
public static final int END_FIELD_NUMBER = 2;
private long end_ = 0L;
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
* @return Whether the end field is set.
*/
@java.lang.Override
public boolean hasEnd() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
* @return The end.
*/
@java.lang.Override
public long getEnd() {
return end_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeUInt64(1, start_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeUInt64(2, end_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, start_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, end_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TimeRange)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TimeRange other = (com.google.transit.realtime.GtfsRealtime.TimeRange) obj;
if (hasStart() != other.hasStart()) return false;
if (hasStart()) {
if (getStart()
!= other.getStart()) return false;
}
if (hasEnd() != other.hasEnd()) return false;
if (hasEnd()) {
if (getEnd()
!= other.getEnd()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasStart()) {
hash = (37 * hash) + START_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStart());
}
if (hasEnd()) {
hash = (37 * hash) + END_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEnd());
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TimeRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TimeRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.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;
}
@java.lang.Override
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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
start_ = 0L;
end_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TimeRange_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TimeRange getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TimeRange.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TimeRange build() {
com.google.transit.realtime.GtfsRealtime.TimeRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TimeRange buildPartial() {
com.google.transit.realtime.GtfsRealtime.TimeRange result = new com.google.transit.realtime.GtfsRealtime.TimeRange(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TimeRange result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.start_ = start_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.end_ = end_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TimeRange) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TimeRange)other);
} 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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
start_ = input.readUInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
end_ = input.readUInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long start_ ;
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
* @return Whether the start field is set.
*/
@java.lang.Override
public boolean hasStart() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Start time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval starts at minus infinity.
*
*
* optional uint64 start = 1;
* @return The start.
*/
@java.lang.Override
public long getStart() {
return start_;
}
/**
*
* 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;
* @param value The start to set.
* @return This builder for chaining.
*/
public Builder setStart(long value) {
start_ = value;
bitField0_ |= 0x00000001;
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;
* @return This builder for chaining.
*/
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;
* @return Whether the end field is set.
*/
@java.lang.Override
public boolean hasEnd() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* End time, in POSIX time (i.e., number of seconds since January 1st 1970
* 00:00:00 UTC).
* If missing, the interval ends at plus infinity.
*
*
* optional uint64 end = 2;
* @return The end.
*/
@java.lang.Override
public long getEnd() {
return end_;
}
/**
*
* 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;
* @param value The end to set.
* @return This builder for chaining.
*/
public Builder setEnd(long value) {
end_ = value;
bitField0_ |= 0x00000002;
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;
* @return This builder for chaining.
*/
public Builder clearEnd() {
bitField0_ = (bitField0_ & ~0x00000002);
end_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.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() {
@java.lang.Override
public TimeRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.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;
* @return Whether the latitude field is set.
*/
boolean hasLatitude();
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return The latitude.
*/
float getLatitude();
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return Whether the longitude field is set.
*/
boolean hasLongitude();
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return The longitude.
*/
float getLongitude();
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return Whether the bearing field is set.
*/
boolean hasBearing();
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return The bearing.
*/
float getBearing();
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return Whether the odometer field is set.
*/
boolean hasOdometer();
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return The odometer.
*/
double getOdometer();
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return Whether the speed field is set.
*/
boolean hasSpeed();
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return The speed.
*/
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 {
private static final long serialVersionUID = 0L;
// Use Position.newBuilder() to construct.
private Position(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Position() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Position();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
protected com.google.protobuf.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_ = 0F;
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return Whether the latitude field is set.
*/
@java.lang.Override
public boolean hasLatitude() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return The latitude.
*/
@java.lang.Override
public float getLatitude() {
return latitude_;
}
public static final int LONGITUDE_FIELD_NUMBER = 2;
private float longitude_ = 0F;
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return Whether the longitude field is set.
*/
@java.lang.Override
public boolean hasLongitude() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return The longitude.
*/
@java.lang.Override
public float getLongitude() {
return longitude_;
}
public static final int BEARING_FIELD_NUMBER = 3;
private float bearing_ = 0F;
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return Whether the bearing field is set.
*/
@java.lang.Override
public boolean hasBearing() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return The bearing.
*/
@java.lang.Override
public float getBearing() {
return bearing_;
}
public static final int ODOMETER_FIELD_NUMBER = 4;
private double odometer_ = 0D;
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return Whether the odometer field is set.
*/
@java.lang.Override
public boolean hasOdometer() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return The odometer.
*/
@java.lang.Override
public double getOdometer() {
return odometer_;
}
public static final int SPEED_FIELD_NUMBER = 5;
private float speed_ = 0F;
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return Whether the speed field is set.
*/
@java.lang.Override
public boolean hasSpeed() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return The speed.
*/
@java.lang.Override
public float getSpeed() {
return speed_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasLatitude()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasLongitude()) {
memoizedIsInitialized = 0;
return false;
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeFloat(1, latitude_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeFloat(2, longitude_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeFloat(3, bearing_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeDouble(4, odometer_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeFloat(5, speed_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, latitude_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, longitude_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, bearing_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, odometer_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, speed_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Position)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.Position other = (com.google.transit.realtime.GtfsRealtime.Position) obj;
if (hasLatitude() != other.hasLatitude()) return false;
if (hasLatitude()) {
if (java.lang.Float.floatToIntBits(getLatitude())
!= java.lang.Float.floatToIntBits(
other.getLatitude())) return false;
}
if (hasLongitude() != other.hasLongitude()) return false;
if (hasLongitude()) {
if (java.lang.Float.floatToIntBits(getLongitude())
!= java.lang.Float.floatToIntBits(
other.getLongitude())) return false;
}
if (hasBearing() != other.hasBearing()) return false;
if (hasBearing()) {
if (java.lang.Float.floatToIntBits(getBearing())
!= java.lang.Float.floatToIntBits(
other.getBearing())) return false;
}
if (hasOdometer() != other.hasOdometer()) return false;
if (hasOdometer()) {
if (java.lang.Double.doubleToLongBits(getOdometer())
!= java.lang.Double.doubleToLongBits(
other.getOdometer())) return false;
}
if (hasSpeed() != other.hasSpeed()) return false;
if (hasSpeed()) {
if (java.lang.Float.floatToIntBits(getSpeed())
!= java.lang.Float.floatToIntBits(
other.getSpeed())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (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) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Position parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Position prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A 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;
}
@java.lang.Override
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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
latitude_ = 0F;
longitude_ = 0F;
bearing_ = 0F;
odometer_ = 0D;
speed_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Position_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Position getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Position build() {
com.google.transit.realtime.GtfsRealtime.Position result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Position buildPartial() {
com.google.transit.realtime.GtfsRealtime.Position result = new com.google.transit.realtime.GtfsRealtime.Position(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Position result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.latitude_ = latitude_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.longitude_ = longitude_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.bearing_ = bearing_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.odometer_ = odometer_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.speed_ = speed_;
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.Position) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.Position)other);
} 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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasLatitude()) {
return false;
}
if (!hasLongitude()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 13: {
latitude_ = input.readFloat();
bitField0_ |= 0x00000001;
break;
} // case 13
case 21: {
longitude_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
case 29: {
bearing_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 33: {
odometer_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 45: {
speed_ = input.readFloat();
bitField0_ |= 0x00000010;
break;
} // case 45
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private float latitude_ ;
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return Whether the latitude field is set.
*/
@java.lang.Override
public boolean hasLatitude() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return The latitude.
*/
@java.lang.Override
public float getLatitude() {
return latitude_;
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @param value The latitude to set.
* @return This builder for chaining.
*/
public Builder setLatitude(float value) {
latitude_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Degrees North, in the WGS-84 coordinate system.
*
*
* required float latitude = 1;
* @return This builder for chaining.
*/
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;
* @return Whether the longitude field is set.
*/
@java.lang.Override
public boolean hasLongitude() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return The longitude.
*/
@java.lang.Override
public float getLongitude() {
return longitude_;
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @param value The longitude to set.
* @return This builder for chaining.
*/
public Builder setLongitude(float value) {
longitude_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Degrees East, in the WGS-84 coordinate system.
*
*
* required float longitude = 2;
* @return This builder for chaining.
*/
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;
* @return Whether the bearing field is set.
*/
@java.lang.Override
public boolean hasBearing() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return The bearing.
*/
@java.lang.Override
public float getBearing() {
return bearing_;
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @param value The bearing to set.
* @return This builder for chaining.
*/
public Builder setBearing(float value) {
bearing_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
* This can be the compass bearing, or the direction towards the next stop
* or intermediate location.
* This should not be direction deduced from the sequence of previous
* positions, which can be computed from previous data.
*
*
* optional float bearing = 3;
* @return This builder for chaining.
*/
public Builder clearBearing() {
bitField0_ = (bitField0_ & ~0x00000004);
bearing_ = 0F;
onChanged();
return this;
}
private double odometer_ ;
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return Whether the odometer field is set.
*/
@java.lang.Override
public boolean hasOdometer() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return The odometer.
*/
@java.lang.Override
public double getOdometer() {
return odometer_;
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @param value The odometer to set.
* @return This builder for chaining.
*/
public Builder setOdometer(double value) {
odometer_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Odometer value, in meters.
*
*
* optional double odometer = 4;
* @return This builder for chaining.
*/
public Builder clearOdometer() {
bitField0_ = (bitField0_ & ~0x00000008);
odometer_ = 0D;
onChanged();
return this;
}
private float speed_ ;
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return Whether the speed field is set.
*/
@java.lang.Override
public boolean hasSpeed() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return The speed.
*/
@java.lang.Override
public float getSpeed() {
return speed_;
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @param value The speed to set.
* @return This builder for chaining.
*/
public Builder setSpeed(float value) {
speed_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Momentary speed measured by the vehicle, in meters per second.
*
*
* optional float speed = 5;
* @return This builder for chaining.
*/
public Builder clearSpeed() {
bitField0_ = (bitField0_ & ~0x00000010);
speed_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.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() {
@java.lang.Override
public Position parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.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. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
boolean hasTripId();
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
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. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
com.google.protobuf.ByteString
getTripIdBytes();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return Whether the routeId field is set.
*/
boolean hasRouteId();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The routeId.
*/
java.lang.String getRouteId();
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The bytes for routeId.
*/
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.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
boolean hasDirectionId();
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
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;
* @return Whether the startTime field is set.
*/
boolean hasStartTime();
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The startTime.
*/
java.lang.String getStartTime();
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The bytes for startTime.
*/
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;
* @return Whether the startDate field is set.
*/
boolean hasStartDate();
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return The startDate.
*/
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;
* @return The bytes for startDate.
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return Whether the scheduleRelationship field is set.
*/
boolean hasScheduleRelationship();
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return The scheduleRelationship.
*/
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 {
private static final long serialVersionUID = 0L;
// Use TripDescriptor.newBuilder() to construct.
private TripDescriptor(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TripDescriptor() {
tripId_ = "";
routeId_ = "";
startTime_ = "";
startDate_ = "";
scheduleRelationship_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TripDescriptor();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.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.
* NOTE: Currently, behavior is unspecified for feeds that use this mode. There are discussions on the GTFS GitHub
* [(1)](https://github.com/google/transit/issues/106) [(2)](https://github.com/google/transit/pull/221)
* [(3)](https://github.com/google/transit/pull/219) around fully specifying or deprecating ADDED trips and the
* documentation will be updated when those discussions are finalized.
*
*
* ADDED = 1;
*/
ADDED(1),
/**
*
* A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
* Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
*
*
* UNSCHEDULED = 2;
*/
UNSCHEDULED(2),
/**
*
* A trip that existed in the schedule but was removed.
*
*
* CANCELED = 3;
*/
CANCELED(3),
/**
*
* Should not be used - for backwards-compatibility only.
*
*
* REPLACEMENT = 5 [deprecated = true];
*/
@java.lang.Deprecated
REPLACEMENT(5),
/**
*
* An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
* respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
* and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
* date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
* (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
* identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
* TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
* TripUpdate with the value of CANCELED or DELETED. Trips defined in GTFS frequencies.txt with exact_times that is
* empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
* the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
* must also be set to DUPLICATED.
* Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
* the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
* to transition to the DUPLICATED enumeration.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* DUPLICATED = 6;
*/
DUPLICATED(6),
/**
*
* A trip that existed in the schedule but was removed and must not be shown to users.
* DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove
* information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to
* riders, e.g. a trip that is entirely being replaced by another trip.
* This designation becomes particularly important if several trips are cancelled and replaced with substitute service.
* If consumers were to show explicit information about the cancellations it would distract from the more important
* real-time predictions.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* DELETED = 7;
*/
DELETED(7),
;
/**
*
* Trip that is running in accordance with its GTFS schedule, or is close
* enough to the scheduled trip to be associated with it.
*
*
* SCHEDULED = 0;
*/
public static final int SCHEDULED_VALUE = 0;
/**
*
* An extra trip that was added in addition to a running schedule, for
* example, to replace a broken vehicle or to respond to sudden passenger
* load.
* NOTE: Currently, behavior is unspecified for feeds that use this mode. There are discussions on the GTFS GitHub
* [(1)](https://github.com/google/transit/issues/106) [(2)](https://github.com/google/transit/pull/221)
* [(3)](https://github.com/google/transit/pull/219) around fully specifying or deprecating ADDED trips and the
* documentation will be updated when those discussions are finalized.
*
*
* ADDED = 1;
*/
public static final int ADDED_VALUE = 1;
/**
*
* A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
* Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
*
*
* UNSCHEDULED = 2;
*/
public static final int UNSCHEDULED_VALUE = 2;
/**
*
* A trip that existed in the schedule but was removed.
*
*
* CANCELED = 3;
*/
public static final int CANCELED_VALUE = 3;
/**
*
* Should not be used - for backwards-compatibility only.
*
*
* REPLACEMENT = 5 [deprecated = true];
*/
@java.lang.Deprecated public static final int REPLACEMENT_VALUE = 5;
/**
*
* An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
* respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
* and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
* date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
* (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
* identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
* TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
* TripUpdate with the value of CANCELED or DELETED. Trips defined in GTFS frequencies.txt with exact_times that is
* empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
* the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
* must also be set to DUPLICATED.
* Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
* the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
* to transition to the DUPLICATED enumeration.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* DUPLICATED = 6;
*/
public static final int DUPLICATED_VALUE = 6;
/**
*
* A trip that existed in the schedule but was removed and must not be shown to users.
* DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove
* information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to
* riders, e.g. a trip that is entirely being replaced by another trip.
* This designation becomes particularly important if several trips are cancelled and replaced with substitute service.
* If consumers were to show explicit information about the cancellations it would distract from the more important
* real-time predictions.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* DELETED = 7;
*/
public static final int DELETED_VALUE = 7;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ScheduleRelationship valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ScheduleRelationship forNumber(int value) {
switch (value) {
case 0: return SCHEDULED;
case 1: return ADDED;
case 2: return UNSCHEDULED;
case 3: return CANCELED;
case 5: return REPLACEMENT;
case 6: return DUPLICATED;
case 7: return DELETED;
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;
@SuppressWarnings("serial")
private volatile java.lang.Object tripId_ = "";
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
@java.lang.Override
public boolean hasTripId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
@java.lang.Override
public java.lang.String getTripId() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tripId_ = s;
}
return s;
}
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTripIdBytes() {
java.lang.Object ref = tripId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tripId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_ID_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object routeId_ = "";
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return Whether the routeId field is set.
*/
@java.lang.Override
public boolean hasRouteId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The routeId.
*/
@java.lang.Override
public java.lang.String getRouteId() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
routeId_ = s;
}
return s;
}
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The bytes for routeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRouteIdBytes() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DIRECTION_ID_FIELD_NUMBER = 6;
private int directionId_ = 0;
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
@java.lang.Override
public boolean hasDirectionId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
@java.lang.Override
public int getDirectionId() {
return directionId_;
}
public static final int START_TIME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object startTime_ = "";
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return Whether the startTime field is set.
*/
@java.lang.Override
public boolean hasStartTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The startTime.
*/
@java.lang.Override
public java.lang.String getStartTime() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startTime_ = s;
}
return s;
}
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The bytes for startTime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartTimeBytes() {
java.lang.Object ref = startTime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_DATE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object startDate_ = "";
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return Whether the startDate field is set.
*/
@java.lang.Override
public boolean hasStartDate() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return The startDate.
*/
@java.lang.Override
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startDate_ = s;
}
return s;
}
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return The bytes for startDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCHEDULE_RELATIONSHIP_FIELD_NUMBER = 4;
private int scheduleRelationship_ = 0;
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return The scheduleRelationship.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tripId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, startTime_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, startDate_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeEnum(4, scheduleRelationship_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, routeId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeUInt32(6, directionId_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tripId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, startTime_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, startDate_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, scheduleRelationship_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, routeId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, directionId_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TripDescriptor other = (com.google.transit.realtime.GtfsRealtime.TripDescriptor) obj;
if (hasTripId() != other.hasTripId()) return false;
if (hasTripId()) {
if (!getTripId()
.equals(other.getTripId())) return false;
}
if (hasRouteId() != other.hasRouteId()) return false;
if (hasRouteId()) {
if (!getRouteId()
.equals(other.getRouteId())) return false;
}
if (hasDirectionId() != other.hasDirectionId()) return false;
if (hasDirectionId()) {
if (getDirectionId()
!= other.getDirectionId()) return false;
}
if (hasStartTime() != other.hasStartTime()) return false;
if (hasStartTime()) {
if (!getStartTime()
.equals(other.getStartTime())) return false;
}
if (hasStartDate() != other.hasStartDate()) return false;
if (hasStartDate()) {
if (!getStartDate()
.equals(other.getStartDate())) return false;
}
if (hasScheduleRelationship() != other.hasScheduleRelationship()) return false;
if (hasScheduleRelationship()) {
if (scheduleRelationship_ != other.scheduleRelationship_) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTripId()) {
hash = (37 * hash) + TRIP_ID_FIELD_NUMBER;
hash = (53 * hash) + getTripId().hashCode();
}
if (hasRouteId()) {
hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
hash = (53 * hash) + getRouteId().hashCode();
}
if (hasDirectionId()) {
hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
hash = (53 * hash) + getDirectionId();
}
if (hasStartTime()) {
hash = (37 * hash) + START_TIME_FIELD_NUMBER;
hash = (53 * hash) + getStartTime().hashCode();
}
if (hasStartDate()) {
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
}
if (hasScheduleRelationship()) {
hash = (37 * hash) + SCHEDULE_RELATIONSHIP_FIELD_NUMBER;
hash = (53 * hash) + scheduleRelationship_;
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TripDescriptor prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A descriptor that identifies an instance of a GTFS trip, or all instances of
* a trip along a route.
* - To specify a single trip instance, the trip_id (and if necessary,
* start_time) is set. If route_id is also set, then it should be same as one
* that the given trip corresponds to.
* - To specify all the trips along a given route, only the route_id should be
* set. Note that if the trip_id is not known, then stop sequence ids in
* TripUpdate are not sufficient, and stop_ids must be provided as well. In
* addition, absolute arrival/departure times must be provided.
*
*
* Protobuf type {@code transit_realtime.TripDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TripDescriptor)
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.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);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TripDescriptor.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tripId_ = "";
routeId_ = "";
directionId_ = 0;
startTime_ = "";
startDate_ = "";
scheduleRelationship_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TripDescriptor_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor build() {
com.google.transit.realtime.GtfsRealtime.TripDescriptor result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor buildPartial() {
com.google.transit.realtime.GtfsRealtime.TripDescriptor result = new com.google.transit.realtime.GtfsRealtime.TripDescriptor(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TripDescriptor result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tripId_ = tripId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.routeId_ = routeId_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.directionId_ = directionId_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.startTime_ = startTime_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.startDate_ = startDate_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.scheduleRelationship_ = scheduleRelationship_;
to_bitField0_ |= 0x00000020;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TripDescriptor) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TripDescriptor)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TripDescriptor other) {
if (other == com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) return this;
if (other.hasTripId()) {
tripId_ = other.tripId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasRouteId()) {
routeId_ = other.routeId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasDirectionId()) {
setDirectionId(other.getDirectionId());
}
if (other.hasStartTime()) {
startTime_ = other.startTime_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasStartDate()) {
startDate_ = other.startDate_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasScheduleRelationship()) {
setScheduleRelationship(other.getScheduleRelationship());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
tripId_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
startTime_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 18
case 26: {
startDate_ = input.readBytes();
bitField0_ |= 0x00000010;
break;
} // case 26
case 32: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship tmpValue =
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(4, tmpRaw);
} else {
scheduleRelationship_ = tmpRaw;
bitField0_ |= 0x00000020;
}
break;
} // case 32
case 42: {
routeId_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 42
case 48: {
directionId_ = input.readUInt32();
bitField0_ |= 0x00000004;
break;
} // case 48
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object tripId_ = "";
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return Whether the tripId field is set.
*/
public boolean hasTripId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The tripId.
*/
public java.lang.String getTripId() {
java.lang.Object ref = tripId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tripId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return The bytes for tripId.
*/
public com.google.protobuf.ByteString
getTripIdBytes() {
java.lang.Object ref = tripId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tripId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @param value The tripId to set.
* @return This builder for chaining.
*/
public Builder setTripId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
tripId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @return This builder for chaining.
*/
public Builder clearTripId() {
tripId_ = getDefaultInstance().getTripId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The trip_id from the GTFS feed that this selector refers to.
* For non frequency-based trips, this field is enough to uniquely identify
* the trip. For frequency-based trip, start_time and start_date might also be
* necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
* static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
* identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
*
*
* optional string trip_id = 1;
* @param value The bytes for tripId to set.
* @return This builder for chaining.
*/
public Builder setTripIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
tripId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object routeId_ = "";
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return Whether the routeId field is set.
*/
public boolean hasRouteId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The routeId.
*/
public java.lang.String getRouteId() {
java.lang.Object ref = routeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
routeId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return The bytes for routeId.
*/
public com.google.protobuf.ByteString
getRouteIdBytes() {
java.lang.Object ref = routeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @param value The routeId to set.
* @return This builder for chaining.
*/
public Builder setRouteId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
routeId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @return This builder for chaining.
*/
public Builder clearRouteId() {
routeId_ = getDefaultInstance().getRouteId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The route_id from the GTFS that this selector refers to.
*
*
* optional string route_id = 5;
* @param value The bytes for routeId to set.
* @return This builder for chaining.
*/
public Builder setRouteIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
routeId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int directionId_ ;
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
@java.lang.Override
public boolean hasDirectionId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
@java.lang.Override
public int getDirectionId() {
return directionId_;
}
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @param value The directionId to set.
* @return This builder for chaining.
*/
public Builder setDirectionId(int value) {
directionId_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The direction_id from the GTFS feed trips.txt file, indicating the
* direction of travel for trips this selector refers to.
*
*
* optional uint32 direction_id = 6;
* @return This builder for chaining.
*/
public Builder clearDirectionId() {
bitField0_ = (bitField0_ & ~0x00000004);
directionId_ = 0;
onChanged();
return this;
}
private java.lang.Object startTime_ = "";
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return Whether the startTime field is set.
*/
public boolean hasStartTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The startTime.
*/
public java.lang.String getStartTime() {
java.lang.Object ref = startTime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startTime_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return The bytes for startTime.
*/
public com.google.protobuf.ByteString
getStartTimeBytes() {
java.lang.Object ref = startTime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startTime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @param value The startTime to set.
* @return This builder for chaining.
*/
public Builder setStartTime(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
startTime_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @return This builder for chaining.
*/
public Builder clearStartTime() {
startTime_ = getDefaultInstance().getStartTime();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* The initially scheduled start time of this trip instance.
* When the trip_id corresponds to a non-frequency-based trip, this field
* should either be omitted or be equal to the value in the GTFS feed. When
* the trip_id correponds to a frequency-based trip, the start_time must be
* specified for trip updates and vehicle positions. If the trip corresponds
* to exact_times=1 GTFS record, then start_time must be some multiple
* (including zero) of headway_secs later than frequencies.txt start_time for
* the corresponding time period. If the trip corresponds to exact_times=0,
* then its start_time may be arbitrary, and is initially expected to be the
* first departure of the trip. Once established, the start_time of this
* frequency-based trip should be considered immutable, even if the first
* departure time changes -- that time change may instead be reflected in a
* StopTimeUpdate.
* Format and semantics of the field is same as that of
* GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
*
*
* optional string start_time = 2;
* @param value The bytes for startTime to set.
* @return This builder for chaining.
*/
public Builder setStartTimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
startTime_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object startDate_ = "";
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return Whether the startDate field is set.
*/
public boolean hasStartDate() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return The startDate.
*/
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
startDate_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return The bytes for startDate.
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @param value The startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDate(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
startDate_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @return This builder for chaining.
*/
public Builder clearStartDate() {
startDate_ = getDefaultInstance().getStartDate();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* The scheduled start date of this trip instance.
* Must be provided to disambiguate trips that are so late as to collide with
* a scheduled trip on a next day. For example, for a train that departs 8:00
* and 20:00 every day, and is 12 hours late, there would be two distinct
* trips on the same time.
* This field can be provided but is not mandatory for schedules in which such
* collisions are impossible - for example, a service running on hourly
* schedule where a vehicle that is one hour late is not considered to be
* related to schedule anymore.
* In YYYYMMDD format.
*
*
* optional string start_date = 3;
* @param value The bytes for startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
startDate_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int scheduleRelationship_ = 0;
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return Whether the scheduleRelationship field is set.
*/
@java.lang.Override public boolean hasScheduleRelationship() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return The scheduleRelationship.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship getScheduleRelationship() {
com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship result = com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.forNumber(scheduleRelationship_);
return result == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship.SCHEDULED : result;
}
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @param value The scheduleRelationship to set.
* @return This builder for chaining.
*/
public Builder setScheduleRelationship(com.google.transit.realtime.GtfsRealtime.TripDescriptor.ScheduleRelationship value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
scheduleRelationship_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.TripDescriptor.ScheduleRelationship schedule_relationship = 4;
* @return This builder for chaining.
*/
public Builder clearScheduleRelationship() {
bitField0_ = (bitField0_ & ~0x00000020);
scheduleRelationship_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TripDescriptor)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TripDescriptor)
private static final com.google.transit.realtime.GtfsRealtime.TripDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TripDescriptor();
}
public static com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TripDescriptor parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VehicleDescriptorOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.VehicleDescriptor)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
boolean hasId();
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
boolean hasLabel();
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The label.
*/
java.lang.String getLabel();
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
com.google.protobuf.ByteString
getLabelBytes();
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return Whether the licensePlate field is set.
*/
boolean hasLicensePlate();
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The licensePlate.
*/
java.lang.String getLicensePlate();
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The bytes for licensePlate.
*/
com.google.protobuf.ByteString
getLicensePlateBytes();
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return Whether the wheelchairAccessible field is set.
*/
boolean hasWheelchairAccessible();
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return The wheelchairAccessible.
*/
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible();
}
/**
*
* Identification information for the vehicle performing the trip.
*
*
* Protobuf type {@code transit_realtime.VehicleDescriptor}
*/
public static final class VehicleDescriptor extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
VehicleDescriptor> implements
// @@protoc_insertion_point(message_implements:transit_realtime.VehicleDescriptor)
VehicleDescriptorOrBuilder {
private static final long serialVersionUID = 0L;
// Use VehicleDescriptor.newBuilder() to construct.
private VehicleDescriptor(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private VehicleDescriptor() {
id_ = "";
label_ = "";
licensePlate_ = "";
wheelchairAccessible_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new VehicleDescriptor();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
}
/**
* Protobuf enum {@code transit_realtime.VehicleDescriptor.WheelchairAccessible}
*/
public enum WheelchairAccessible
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The trip doesn't have information about wheelchair accessibility.
* This is the **default** behavior. If the static GTFS contains a
* _wheelchair_accessible_ value, it won't be overwritten.
*
*
* NO_VALUE = 0;
*/
NO_VALUE(0),
/**
*
* The trip has no accessibility value present.
* This value will overwrite the value from the GTFS.
*
*
* UNKNOWN = 1;
*/
UNKNOWN(1),
/**
*
* The trip is wheelchair accessible.
* This value will overwrite the value from the GTFS.
*
*
* WHEELCHAIR_ACCESSIBLE = 2;
*/
WHEELCHAIR_ACCESSIBLE(2),
/**
*
* The trip is **not** wheelchair accessible.
* This value will overwrite the value from the GTFS.
*
*
* WHEELCHAIR_INACCESSIBLE = 3;
*/
WHEELCHAIR_INACCESSIBLE(3),
;
/**
*
* The trip doesn't have information about wheelchair accessibility.
* This is the **default** behavior. If the static GTFS contains a
* _wheelchair_accessible_ value, it won't be overwritten.
*
*
* NO_VALUE = 0;
*/
public static final int NO_VALUE_VALUE = 0;
/**
*
* The trip has no accessibility value present.
* This value will overwrite the value from the GTFS.
*
*
* UNKNOWN = 1;
*/
public static final int UNKNOWN_VALUE = 1;
/**
*
* The trip is wheelchair accessible.
* This value will overwrite the value from the GTFS.
*
*
* WHEELCHAIR_ACCESSIBLE = 2;
*/
public static final int WHEELCHAIR_ACCESSIBLE_VALUE = 2;
/**
*
* The trip is **not** wheelchair accessible.
* This value will overwrite the value from the GTFS.
*
*
* WHEELCHAIR_INACCESSIBLE = 3;
*/
public static final int WHEELCHAIR_INACCESSIBLE_VALUE = 3;
public final int getNumber() {
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WheelchairAccessible valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static WheelchairAccessible forNumber(int value) {
switch (value) {
case 0: return NO_VALUE;
case 1: return UNKNOWN;
case 2: return WHEELCHAIR_ACCESSIBLE;
case 3: return WHEELCHAIR_INACCESSIBLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
WheelchairAccessible> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WheelchairAccessible findValueByNumber(int number) {
return WheelchairAccessible.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().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.VehicleDescriptor.getDescriptor().getEnumTypes().get(0);
}
private static final WheelchairAccessible[] VALUES = values();
public static WheelchairAccessible valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private WheelchairAccessible(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:transit_realtime.VehicleDescriptor.WheelchairAccessible)
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
}
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABEL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object label_ = "";
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
@java.lang.Override
public boolean hasLabel() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The label.
*/
@java.lang.Override
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
label_ = s;
}
return s;
}
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LICENSE_PLATE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object licensePlate_ = "";
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return Whether the licensePlate field is set.
*/
@java.lang.Override
public boolean hasLicensePlate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The licensePlate.
*/
@java.lang.Override
public java.lang.String getLicensePlate() {
java.lang.Object ref = licensePlate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
licensePlate_ = s;
}
return s;
}
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The bytes for licensePlate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLicensePlateBytes() {
java.lang.Object ref = licensePlate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
licensePlate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WHEELCHAIR_ACCESSIBLE_FIELD_NUMBER = 4;
private int wheelchairAccessible_ = 0;
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return Whether the wheelchairAccessible field is set.
*/
@java.lang.Override public boolean hasWheelchairAccessible() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return The wheelchairAccessible.
*/
@java.lang.Override public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible() {
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible result = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(wheelchairAccessible_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.NO_VALUE : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, licensePlate_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeEnum(4, wheelchairAccessible_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, licensePlate_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, wheelchairAccessible_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other = (com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (hasLabel() != other.hasLabel()) return false;
if (hasLabel()) {
if (!getLabel()
.equals(other.getLabel())) return false;
}
if (hasLicensePlate() != other.hasLicensePlate()) return false;
if (hasLicensePlate()) {
if (!getLicensePlate()
.equals(other.getLicensePlate())) return false;
}
if (hasWheelchairAccessible() != other.hasWheelchairAccessible()) return false;
if (hasWheelchairAccessible()) {
if (wheelchairAccessible_ != other.wheelchairAccessible_) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
if (hasLabel()) {
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
}
if (hasLicensePlate()) {
hash = (37 * hash) + LICENSE_PLATE_FIELD_NUMBER;
hash = (53 * hash) + getLicensePlate().hashCode();
}
if (hasWheelchairAccessible()) {
hash = (37 * hash) + WHEELCHAIR_ACCESSIBLE_FIELD_NUMBER;
hash = (53 * hash) + wheelchairAccessible_;
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Identification information for the vehicle performing the trip.
*
*
* Protobuf type {@code transit_realtime.VehicleDescriptor}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.VehicleDescriptor)
com.google.transit.realtime.GtfsRealtime.VehicleDescriptorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.class, com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
label_ = "";
licensePlate_ = "";
wheelchairAccessible_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_VehicleDescriptor_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor build() {
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor buildPartial() {
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.label_ = label_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.licensePlate_ = licensePlate_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.wheelchairAccessible_ = wheelchairAccessible_;
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.VehicleDescriptor) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor other) {
if (other == com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.getDefaultInstance()) return this;
if (other.hasId()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasLabel()) {
label_ = other.label_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasLicensePlate()) {
licensePlate_ = other.licensePlate_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasWheelchairAccessible()) {
setWheelchairAccessible(other.getWheelchairAccessible());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
label_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
licensePlate_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
int tmpRaw = input.readEnum();
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible tmpValue =
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(4, tmpRaw);
} else {
wheelchairAccessible_ = tmpRaw;
bitField0_ |= 0x00000008;
}
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
id_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*
*
* optional string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return Whether the label field is set.
*/
public boolean hasLabel() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The label.
*/
public java.lang.String getLabel() {
java.lang.Object ref = label_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
label_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return The bytes for label.
*/
public com.google.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*
*
* optional string label = 2;
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
label_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object licensePlate_ = "";
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return Whether the licensePlate field is set.
*/
public boolean hasLicensePlate() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The licensePlate.
*/
public java.lang.String getLicensePlate() {
java.lang.Object ref = licensePlate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
licensePlate_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return The bytes for licensePlate.
*/
public com.google.protobuf.ByteString
getLicensePlateBytes() {
java.lang.Object ref = licensePlate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
licensePlate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @param value The licensePlate to set.
* @return This builder for chaining.
*/
public Builder setLicensePlate(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
licensePlate_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @return This builder for chaining.
*/
public Builder clearLicensePlate() {
licensePlate_ = getDefaultInstance().getLicensePlate();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The license plate of the vehicle.
*
*
* optional string license_plate = 3;
* @param value The bytes for licensePlate to set.
* @return This builder for chaining.
*/
public Builder setLicensePlateBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
licensePlate_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int wheelchairAccessible_ = 0;
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return Whether the wheelchairAccessible field is set.
*/
@java.lang.Override public boolean hasWheelchairAccessible() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return The wheelchairAccessible.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible getWheelchairAccessible() {
com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible result = com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.forNumber(wheelchairAccessible_);
return result == null ? com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible.NO_VALUE : result;
}
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @param value The wheelchairAccessible to set.
* @return This builder for chaining.
*/
public Builder setWheelchairAccessible(com.google.transit.realtime.GtfsRealtime.VehicleDescriptor.WheelchairAccessible value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
wheelchairAccessible_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .transit_realtime.VehicleDescriptor.WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
* @return This builder for chaining.
*/
public Builder clearWheelchairAccessible() {
bitField0_ = (bitField0_ & ~0x00000008);
wheelchairAccessible_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.VehicleDescriptor)
}
// @@protoc_insertion_point(class_scope:transit_realtime.VehicleDescriptor)
private static final com.google.transit.realtime.GtfsRealtime.VehicleDescriptor DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.VehicleDescriptor();
}
public static com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VehicleDescriptor parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.VehicleDescriptor getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EntitySelectorOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.EntitySelector)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return Whether the agencyId field is set.
*/
boolean hasAgencyId();
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The agencyId.
*/
java.lang.String getAgencyId();
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The bytes for agencyId.
*/
com.google.protobuf.ByteString
getAgencyIdBytes();
/**
* optional string route_id = 2;
* @return Whether the routeId field is set.
*/
boolean hasRouteId();
/**
* optional string route_id = 2;
* @return The routeId.
*/
java.lang.String getRouteId();
/**
* optional string route_id = 2;
* @return The bytes for routeId.
*/
com.google.protobuf.ByteString
getRouteIdBytes();
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return Whether the routeType field is set.
*/
boolean hasRouteType();
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return The routeType.
*/
int getRouteType();
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return Whether the trip field is set.
*/
boolean hasTrip();
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return The trip.
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip();
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder();
/**
* optional string stop_id = 5;
* @return Whether the stopId field is set.
*/
boolean hasStopId();
/**
* optional string stop_id = 5;
* @return The stopId.
*/
java.lang.String getStopId();
/**
* optional string stop_id = 5;
* @return The bytes for stopId.
*/
com.google.protobuf.ByteString
getStopIdBytes();
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
boolean hasDirectionId();
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
int getDirectionId();
}
/**
*
* A selector for an entity in a GTFS feed.
*
*
* Protobuf type {@code transit_realtime.EntitySelector}
*/
public static final class EntitySelector extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
EntitySelector> implements
// @@protoc_insertion_point(message_implements:transit_realtime.EntitySelector)
EntitySelectorOrBuilder {
private static final long serialVersionUID = 0L;
// Use EntitySelector.newBuilder() to construct.
private EntitySelector(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private EntitySelector() {
agencyId_ = "";
routeId_ = "";
stopId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EntitySelector();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
}
private int bitField0_;
public static final int AGENCY_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object agencyId_ = "";
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return Whether the agencyId field is set.
*/
@java.lang.Override
public boolean hasAgencyId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The agencyId.
*/
@java.lang.Override
public java.lang.String getAgencyId() {
java.lang.Object ref = agencyId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
agencyId_ = s;
}
return s;
}
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The bytes for agencyId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAgencyIdBytes() {
java.lang.Object ref = agencyId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
agencyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object routeId_ = "";
/**
* optional string route_id = 2;
* @return Whether the routeId field is set.
*/
@java.lang.Override
public boolean hasRouteId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string route_id = 2;
* @return The routeId.
*/
@java.lang.Override
public java.lang.String getRouteId() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
routeId_ = s;
}
return s;
}
}
/**
* optional string route_id = 2;
* @return The bytes for routeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRouteIdBytes() {
java.lang.Object ref = routeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_TYPE_FIELD_NUMBER = 3;
private int routeType_ = 0;
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return Whether the routeType field is set.
*/
@java.lang.Override
public boolean hasRouteType() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return The routeType.
*/
@java.lang.Override
public int getRouteType() {
return routeType_;
}
public static final int TRIP_FIELD_NUMBER = 4;
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return Whether the trip field is set.
*/
@java.lang.Override
public boolean hasTrip() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return The trip.
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
public static final int STOP_ID_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object stopId_ = "";
/**
* optional string stop_id = 5;
* @return Whether the stopId field is set.
*/
@java.lang.Override
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string stop_id = 5;
* @return The stopId.
*/
@java.lang.Override
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
}
}
/**
* optional string stop_id = 5;
* @return The bytes for stopId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DIRECTION_ID_FIELD_NUMBER = 6;
private int directionId_ = 0;
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
@java.lang.Override
public boolean hasDirectionId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
@java.lang.Override
public int getDirectionId() {
return directionId_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (hasTrip()) {
if (!getTrip().isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, agencyId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, routeId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt32(3, routeType_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(4, getTrip());
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stopId_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeUInt32(6, directionId_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, agencyId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, routeId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, routeType_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getTrip());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stopId_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, directionId_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.EntitySelector other = (com.google.transit.realtime.GtfsRealtime.EntitySelector) obj;
if (hasAgencyId() != other.hasAgencyId()) return false;
if (hasAgencyId()) {
if (!getAgencyId()
.equals(other.getAgencyId())) return false;
}
if (hasRouteId() != other.hasRouteId()) return false;
if (hasRouteId()) {
if (!getRouteId()
.equals(other.getRouteId())) return false;
}
if (hasRouteType() != other.hasRouteType()) return false;
if (hasRouteType()) {
if (getRouteType()
!= other.getRouteType()) return false;
}
if (hasTrip() != other.hasTrip()) return false;
if (hasTrip()) {
if (!getTrip()
.equals(other.getTrip())) return false;
}
if (hasStopId() != other.hasStopId()) return false;
if (hasStopId()) {
if (!getStopId()
.equals(other.getStopId())) return false;
}
if (hasDirectionId() != other.hasDirectionId()) return false;
if (hasDirectionId()) {
if (getDirectionId()
!= other.getDirectionId()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasAgencyId()) {
hash = (37 * hash) + AGENCY_ID_FIELD_NUMBER;
hash = (53 * hash) + getAgencyId().hashCode();
}
if (hasRouteId()) {
hash = (37 * hash) + ROUTE_ID_FIELD_NUMBER;
hash = (53 * hash) + getRouteId().hashCode();
}
if (hasRouteType()) {
hash = (37 * hash) + ROUTE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getRouteType();
}
if (hasTrip()) {
hash = (37 * hash) + TRIP_FIELD_NUMBER;
hash = (53 * hash) + getTrip().hashCode();
}
if (hasStopId()) {
hash = (37 * hash) + STOP_ID_FIELD_NUMBER;
hash = (53 * hash) + getStopId().hashCode();
}
if (hasDirectionId()) {
hash = (37 * hash) + DIRECTION_ID_FIELD_NUMBER;
hash = (53 * hash) + getDirectionId();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.EntitySelector prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A selector for an entity in a GTFS feed.
*
*
* Protobuf type {@code transit_realtime.EntitySelector}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.EntitySelector, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.EntitySelector)
com.google.transit.realtime.GtfsRealtime.EntitySelectorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.EntitySelector.class, com.google.transit.realtime.GtfsRealtime.EntitySelector.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.EntitySelector.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTripFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
agencyId_ = "";
routeId_ = "";
routeType_ = 0;
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
stopId_ = "";
directionId_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_EntitySelector_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelector build() {
com.google.transit.realtime.GtfsRealtime.EntitySelector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelector buildPartial() {
com.google.transit.realtime.GtfsRealtime.EntitySelector result = new com.google.transit.realtime.GtfsRealtime.EntitySelector(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.EntitySelector result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.agencyId_ = agencyId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.routeId_ = routeId_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.routeType_ = routeType_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.trip_ = tripBuilder_ == null
? trip_
: tripBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.stopId_ = stopId_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.directionId_ = directionId_;
to_bitField0_ |= 0x00000020;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.EntitySelector) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.EntitySelector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.EntitySelector other) {
if (other == com.google.transit.realtime.GtfsRealtime.EntitySelector.getDefaultInstance()) return this;
if (other.hasAgencyId()) {
agencyId_ = other.agencyId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasRouteId()) {
routeId_ = other.routeId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasRouteType()) {
setRouteType(other.getRouteType());
}
if (other.hasTrip()) {
mergeTrip(other.getTrip());
}
if (other.hasStopId()) {
stopId_ = other.stopId_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasDirectionId()) {
setDirectionId(other.getDirectionId());
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (hasTrip()) {
if (!getTrip().isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
agencyId_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
routeId_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
routeType_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
input.readMessage(
getTripFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
stopId_ = input.readBytes();
bitField0_ |= 0x00000010;
break;
} // case 42
case 48: {
directionId_ = input.readUInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object agencyId_ = "";
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return Whether the agencyId field is set.
*/
public boolean hasAgencyId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The agencyId.
*/
public java.lang.String getAgencyId() {
java.lang.Object ref = agencyId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
agencyId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return The bytes for agencyId.
*/
public com.google.protobuf.ByteString
getAgencyIdBytes() {
java.lang.Object ref = agencyId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
agencyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @param value The agencyId to set.
* @return This builder for chaining.
*/
public Builder setAgencyId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
agencyId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @return This builder for chaining.
*/
public Builder clearAgencyId() {
agencyId_ = getDefaultInstance().getAgencyId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The values of the fields should correspond to the appropriate fields in the
* GTFS feed.
* At least one specifier must be given. If several are given, then the
* matching has to apply to all the given specifiers.
*
*
* optional string agency_id = 1;
* @param value The bytes for agencyId to set.
* @return This builder for chaining.
*/
public Builder setAgencyIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
agencyId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object routeId_ = "";
/**
* optional string route_id = 2;
* @return Whether the routeId field is set.
*/
public boolean hasRouteId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string route_id = 2;
* @return The routeId.
*/
public java.lang.String getRouteId() {
java.lang.Object ref = routeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
routeId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string route_id = 2;
* @return The bytes for routeId.
*/
public com.google.protobuf.ByteString
getRouteIdBytes() {
java.lang.Object ref = routeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string route_id = 2;
* @param value The routeId to set.
* @return This builder for chaining.
*/
public Builder setRouteId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
routeId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* optional string route_id = 2;
* @return This builder for chaining.
*/
public Builder clearRouteId() {
routeId_ = getDefaultInstance().getRouteId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* optional string route_id = 2;
* @param value The bytes for routeId to set.
* @return This builder for chaining.
*/
public Builder setRouteIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
routeId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int routeType_ ;
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return Whether the routeType field is set.
*/
@java.lang.Override
public boolean hasRouteType() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return The routeType.
*/
@java.lang.Override
public int getRouteType() {
return routeType_;
}
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @param value The routeType to set.
* @return This builder for chaining.
*/
public Builder setRouteType(int value) {
routeType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* corresponds to route_type in GTFS.
*
*
* optional int32 route_type = 3;
* @return This builder for chaining.
*/
public Builder clearRouteType() {
bitField0_ = (bitField0_ & ~0x00000004);
routeType_ = 0;
onChanged();
return this;
}
private com.google.transit.realtime.GtfsRealtime.TripDescriptor trip_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TripDescriptor, com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder, com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder> tripBuilder_;
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return Whether the trip field is set.
*/
public boolean hasTrip() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
* @return The trip.
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor getTrip() {
if (tripBuilder_ == null) {
return trip_ == null ? com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
} else {
return tripBuilder_.getMessage();
}
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public Builder setTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trip_ = value;
} else {
tripBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public Builder setTrip(
com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder builderForValue) {
if (tripBuilder_ == null) {
trip_ = builderForValue.build();
} else {
tripBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public Builder mergeTrip(com.google.transit.realtime.GtfsRealtime.TripDescriptor value) {
if (tripBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
trip_ != null &&
trip_ != com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance()) {
getTripBuilder().mergeFrom(value);
} else {
trip_ = value;
}
} else {
tripBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public Builder clearTrip() {
bitField0_ = (bitField0_ & ~0x00000008);
trip_ = null;
if (tripBuilder_ != null) {
tripBuilder_.dispose();
tripBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptor.Builder getTripBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getTripFieldBuilder().getBuilder();
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
public com.google.transit.realtime.GtfsRealtime.TripDescriptorOrBuilder getTripOrBuilder() {
if (tripBuilder_ != null) {
return tripBuilder_.getMessageOrBuilder();
} else {
return trip_ == null ?
com.google.transit.realtime.GtfsRealtime.TripDescriptor.getDefaultInstance() : trip_;
}
}
/**
* optional .transit_realtime.TripDescriptor trip = 4;
*/
private com.google.protobuf.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 java.lang.Object stopId_ = "";
/**
* optional string stop_id = 5;
* @return Whether the stopId field is set.
*/
public boolean hasStopId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string stop_id = 5;
* @return The stopId.
*/
public java.lang.String getStopId() {
java.lang.Object ref = stopId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
stopId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string stop_id = 5;
* @return The bytes for stopId.
*/
public com.google.protobuf.ByteString
getStopIdBytes() {
java.lang.Object ref = stopId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stopId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string stop_id = 5;
* @param value The stopId to set.
* @return This builder for chaining.
*/
public Builder setStopId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* optional string stop_id = 5;
* @return This builder for chaining.
*/
public Builder clearStopId() {
stopId_ = getDefaultInstance().getStopId();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
* optional string stop_id = 5;
* @param value The bytes for stopId to set.
* @return This builder for chaining.
*/
public Builder setStopIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
stopId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int directionId_ ;
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return Whether the directionId field is set.
*/
@java.lang.Override
public boolean hasDirectionId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return The directionId.
*/
@java.lang.Override
public int getDirectionId() {
return directionId_;
}
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @param value The directionId to set.
* @return This builder for chaining.
*/
public Builder setDirectionId(int value) {
directionId_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Corresponds to trip direction_id in GTFS trips.txt. If provided the
* route_id must also be provided.
*
*
* optional uint32 direction_id = 6;
* @return This builder for chaining.
*/
public Builder clearDirectionId() {
bitField0_ = (bitField0_ & ~0x00000020);
directionId_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.EntitySelector)
}
// @@protoc_insertion_point(class_scope:transit_realtime.EntitySelector)
private static final com.google.transit.realtime.GtfsRealtime.EntitySelector DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.EntitySelector();
}
public static com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EntitySelector parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.EntitySelector getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TranslatedStringOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedString)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
java.util.List
getTranslationList();
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index);
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
int getTranslationCount();
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
getTranslationOrBuilderList();
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
int index);
}
/**
*
* An internationalized message containing per-language versions of a snippet of
* text or a URL.
* One of the strings from a message will be picked up. The resolution proceeds
* as follows:
* 1. If the UI language matches the language code of a translation,
* the first matching translation is picked.
* 2. If a default UI language (e.g., English) matches the language code of a
* translation, the first matching translation is picked.
* 3. If some translation has an unspecified language code, that translation is
* picked.
*
*
* Protobuf type {@code transit_realtime.TranslatedString}
*/
public static final class TranslatedString extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TranslatedString> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TranslatedString)
TranslatedStringOrBuilder {
private static final long serialVersionUID = 0L;
// Use TranslatedString.newBuilder() to construct.
private TranslatedString(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TranslatedString() {
translation_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TranslatedString();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedString.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder.class);
}
public interface TranslationOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedString.Translation)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return Whether the text field is set.
*/
boolean hasText();
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The text.
*/
java.lang.String getText();
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return Whether the language field is set.
*/
boolean hasLanguage();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The language.
*/
java.lang.String getLanguage();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The bytes for language.
*/
com.google.protobuf.ByteString
getLanguageBytes();
}
/**
* Protobuf type {@code transit_realtime.TranslatedString.Translation}
*/
public static final class Translation extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Translation> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TranslatedString.Translation)
TranslationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Translation.newBuilder() to construct.
private Translation(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Translation() {
text_ = "";
language_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Translation();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder.class);
}
private int bitField0_;
public static final int TEXT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
text_ = s;
}
return s;
}
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LANGUAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object language_ = "";
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return Whether the language field is set.
*/
@java.lang.Override
public boolean hasLanguage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The language.
*/
@java.lang.Override
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
language_ = s;
}
return s;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The bytes for language.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasText()) {
memoizedIsInitialized = 0;
return false;
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, language_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, language_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation other = (com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation) obj;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText()
.equals(other.getText())) return false;
}
if (hasLanguage() != other.hasLanguage()) return false;
if (hasLanguage()) {
if (!getLanguage()
.equals(other.getLanguage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
if (hasLanguage()) {
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code transit_realtime.TranslatedString.Translation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedString.Translation)
com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
text_ = "";
language_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_Translation_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation build() {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation buildPartial() {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result = new com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.text_ = text_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.language_ = language_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation other) {
if (other == com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance()) return this;
if (other.hasText()) {
text_ = other.text_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasLanguage()) {
language_ = other.language_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasText()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
text_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
language_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object text_ = "";
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return Whether the text field is set.
*/
public boolean hasText() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
text_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* A UTF-8 string containing the message.
*
*
* required string text = 1;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return Whether the language field is set.
*/
public boolean hasLanguage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The language.
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
language_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return The bytes for language.
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @param value The language to set.
* @return This builder for chaining.
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
language_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @return This builder for chaining.
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 2;
* @param value The bytes for language to set.
* @return This builder for chaining.
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
language_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedString.Translation)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TranslatedString.Translation)
private static final com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation();
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Translation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TRANSLATION_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List translation_;
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
@java.lang.Override
public java.util.List getTranslationList() {
return translation_;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
getTranslationOrBuilderList() {
return translation_;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
@java.lang.Override
public int getTranslationCount() {
return translation_.size();
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index) {
return translation_.get(index);
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
int index) {
return translation_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
for (int i = 0; i < getTranslationCount(); i++) {
if (!getTranslation(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
for (int i = 0; i < translation_.size(); i++) {
output.writeMessage(1, translation_.get(i));
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < translation_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, translation_.get(i));
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TranslatedString other = (com.google.transit.realtime.GtfsRealtime.TranslatedString) obj;
if (!getTranslationList()
.equals(other.getTranslationList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTranslationCount() > 0) {
hash = (37 * hash) + TRANSLATION_FIELD_NUMBER;
hash = (53 * hash) + getTranslationList().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedString prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* An internationalized message containing per-language versions of a snippet of
* text or a URL.
* One of the strings from a message will be picked up. The resolution proceeds
* as follows:
* 1. If the UI language matches the language code of a translation,
* the first matching translation is picked.
* 2. If a default UI language (e.g., English) matches the language code of a
* translation, the first matching translation is picked.
* 3. If some translation has an unspecified language code, that translation is
* picked.
*
*
* Protobuf type {@code transit_realtime.TranslatedString}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TranslatedString, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedString)
com.google.transit.realtime.GtfsRealtime.TranslatedStringOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedString.class, com.google.transit.realtime.GtfsRealtime.TranslatedString.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TranslatedString.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (translationBuilder_ == null) {
translation_ = java.util.Collections.emptyList();
} else {
translation_ = null;
translationBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedString_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString build() {
com.google.transit.realtime.GtfsRealtime.TranslatedString result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString buildPartial() {
com.google.transit.realtime.GtfsRealtime.TranslatedString result = new com.google.transit.realtime.GtfsRealtime.TranslatedString(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TranslatedString result) {
if (translationBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
translation_ = java.util.Collections.unmodifiableList(translation_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.translation_ = translation_;
} else {
result.translation_ = translationBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedString result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedString) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedString)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedString other) {
if (other == com.google.transit.realtime.GtfsRealtime.TranslatedString.getDefaultInstance()) return this;
if (translationBuilder_ == null) {
if (!other.translation_.isEmpty()) {
if (translation_.isEmpty()) {
translation_ = other.translation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTranslationIsMutable();
translation_.addAll(other.translation_);
}
onChanged();
}
} else {
if (!other.translation_.isEmpty()) {
if (translationBuilder_.isEmpty()) {
translationBuilder_.dispose();
translationBuilder_ = null;
translation_ = other.translation_;
bitField0_ = (bitField0_ & ~0x00000001);
translationBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTranslationFieldBuilder() : null;
} else {
translationBuilder_.addAllMessages(other.translation_);
}
}
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
for (int i = 0; i < getTranslationCount(); i++) {
if (!getTranslation(i).isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.PARSER,
extensionRegistry);
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
translation_.add(m);
} else {
translationBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List translation_ =
java.util.Collections.emptyList();
private void ensureTranslationIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
translation_ = new java.util.ArrayList(translation_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder> translationBuilder_;
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public java.util.List getTranslationList() {
if (translationBuilder_ == null) {
return java.util.Collections.unmodifiableList(translation_);
} else {
return translationBuilder_.getMessageList();
}
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public int getTranslationCount() {
if (translationBuilder_ == null) {
return translation_.size();
} else {
return translationBuilder_.getCount();
}
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation getTranslation(int index) {
if (translationBuilder_ == null) {
return translation_.get(index);
} else {
return translationBuilder_.getMessage(index);
}
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder setTranslation(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
if (translationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTranslationIsMutable();
translation_.set(index, value);
onChanged();
} else {
translationBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder setTranslation(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
translation_.set(index, builderForValue.build());
onChanged();
} else {
translationBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder addTranslation(com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
if (translationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTranslationIsMutable();
translation_.add(value);
onChanged();
} else {
translationBuilder_.addMessage(value);
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder addTranslation(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation value) {
if (translationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTranslationIsMutable();
translation_.add(index, value);
onChanged();
} else {
translationBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder addTranslation(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
translation_.add(builderForValue.build());
onChanged();
} else {
translationBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder addTranslation(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder builderForValue) {
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
translation_.add(index, builderForValue.build());
onChanged();
} else {
translationBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder addAllTranslation(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation> values) {
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, translation_);
onChanged();
} else {
translationBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder clearTranslation() {
if (translationBuilder_ == null) {
translation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
translationBuilder_.clear();
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public Builder removeTranslation(int index) {
if (translationBuilder_ == null) {
ensureTranslationIsMutable();
translation_.remove(index);
onChanged();
} else {
translationBuilder_.remove(index);
}
return this;
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder getTranslationBuilder(
int index) {
return getTranslationFieldBuilder().getBuilder(index);
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder getTranslationOrBuilder(
int index) {
if (translationBuilder_ == null) {
return translation_.get(index); } else {
return translationBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
getTranslationOrBuilderList() {
if (translationBuilder_ != null) {
return translationBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(translation_);
}
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder addTranslationBuilder() {
return getTranslationFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance());
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder addTranslationBuilder(
int index) {
return getTranslationFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.getDefaultInstance());
}
/**
*
* At least one translation must be provided.
*
*
* repeated .transit_realtime.TranslatedString.Translation translation = 1;
*/
public java.util.List
getTranslationBuilderList() {
return getTranslationFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>
getTranslationFieldBuilder() {
if (translationBuilder_ == null) {
translationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation, com.google.transit.realtime.GtfsRealtime.TranslatedString.Translation.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedString.TranslationOrBuilder>(
translation_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
translation_ = null;
}
return translationBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedString)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TranslatedString)
private static final com.google.transit.realtime.GtfsRealtime.TranslatedString DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedString();
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TranslatedString parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedString getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TranslatedImageOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedImage)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
java.util.List
getLocalizedImageList();
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index);
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
int getLocalizedImageCount();
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
getLocalizedImageOrBuilderList();
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
int index);
}
/**
*
* An internationalized image containing per-language versions of a URL linking to an image
* along with meta information
* Only one of the images from a message will be retained by consumers. The resolution proceeds
* as follows:
* 1. If the UI language matches the language code of a translation,
* the first matching translation is picked.
* 2. If a default UI language (e.g., English) matches the language code of a
* translation, the first matching translation is picked.
* 3. If some translation has an unspecified language code, that translation is
* picked.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TranslatedImage}
*/
public static final class TranslatedImage extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
TranslatedImage> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TranslatedImage)
TranslatedImageOrBuilder {
private static final long serialVersionUID = 0L;
// Use TranslatedImage.newBuilder() to construct.
private TranslatedImage(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private TranslatedImage() {
localizedImage_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TranslatedImage();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder.class);
}
public interface LocalizedImageOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.TranslatedImage.LocalizedImage)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return Whether the url field is set.
*/
boolean hasUrl();
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return Whether the mediaType field is set.
*/
boolean hasMediaType();
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The mediaType.
*/
java.lang.String getMediaType();
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The bytes for mediaType.
*/
com.google.protobuf.ByteString
getMediaTypeBytes();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return Whether the language field is set.
*/
boolean hasLanguage();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The language.
*/
java.lang.String getLanguage();
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The bytes for language.
*/
com.google.protobuf.ByteString
getLanguageBytes();
}
/**
* Protobuf type {@code transit_realtime.TranslatedImage.LocalizedImage}
*/
public static final class LocalizedImage extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
LocalizedImage> implements
// @@protoc_insertion_point(message_implements:transit_realtime.TranslatedImage.LocalizedImage)
LocalizedImageOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalizedImage.newBuilder() to construct.
private LocalizedImage(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private LocalizedImage() {
url_ = "";
mediaType_ = "";
language_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LocalizedImage();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder.class);
}
private int bitField0_;
public static final int URL_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return Whether the url field is set.
*/
@java.lang.Override
public boolean hasUrl() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
url_ = s;
}
return s;
}
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MEDIA_TYPE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object mediaType_ = "";
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return Whether the mediaType field is set.
*/
@java.lang.Override
public boolean hasMediaType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The mediaType.
*/
@java.lang.Override
public java.lang.String getMediaType() {
java.lang.Object ref = mediaType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mediaType_ = s;
}
return s;
}
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The bytes for mediaType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMediaTypeBytes() {
java.lang.Object ref = mediaType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mediaType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LANGUAGE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object language_ = "";
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return Whether the language field is set.
*/
@java.lang.Override
public boolean hasLanguage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The language.
*/
@java.lang.Override
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
language_ = s;
}
return s;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The bytes for language.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasUrl()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasMediaType()) {
memoizedIsInitialized = 0;
return false;
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mediaType_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, language_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mediaType_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, language_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage other = (com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage) obj;
if (hasUrl() != other.hasUrl()) return false;
if (hasUrl()) {
if (!getUrl()
.equals(other.getUrl())) return false;
}
if (hasMediaType() != other.hasMediaType()) return false;
if (hasMediaType()) {
if (!getMediaType()
.equals(other.getMediaType())) return false;
}
if (hasLanguage() != other.hasLanguage()) return false;
if (hasLanguage()) {
if (!getLanguage()
.equals(other.getLanguage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasUrl()) {
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
}
if (hasMediaType()) {
hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMediaType().hashCode();
}
if (hasLanguage()) {
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code transit_realtime.TranslatedImage.LocalizedImage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedImage.LocalizedImage)
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
url_ = "";
mediaType_ = "";
language_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage build() {
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage buildPartial() {
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result = new com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.url_ = url_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mediaType_ = mediaType_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.language_ = language_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage other) {
if (other == com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance()) return this;
if (other.hasUrl()) {
url_ = other.url_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasMediaType()) {
mediaType_ = other.mediaType_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasLanguage()) {
language_ = other.language_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasUrl()) {
return false;
}
if (!hasMediaType()) {
return false;
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
url_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
mediaType_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
language_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object url_ = "";
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return Whether the url field is set.
*/
public boolean hasUrl() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
url_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
url_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* String containing an URL linking to an image
* The image linked must be less than 2MB.
* If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
* The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
*
*
* required string url = 1;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
url_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object mediaType_ = "";
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return Whether the mediaType field is set.
*/
public boolean hasMediaType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The mediaType.
*/
public java.lang.String getMediaType() {
java.lang.Object ref = mediaType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mediaType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return The bytes for mediaType.
*/
public com.google.protobuf.ByteString
getMediaTypeBytes() {
java.lang.Object ref = mediaType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mediaType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @param value The mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mediaType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @return This builder for chaining.
*/
public Builder clearMediaType() {
mediaType_ = getDefaultInstance().getMediaType();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* IANA media type as to specify the type of image to be displayed.
* The type must start with "image/"
*
*
* required string media_type = 2;
* @param value The bytes for mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mediaType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return Whether the language field is set.
*/
public boolean hasLanguage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The language.
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
language_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return The bytes for language.
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @param value The language to set.
* @return This builder for chaining.
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
language_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @return This builder for chaining.
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* BCP-47 language code. Can be omitted if the language is unknown or if
* no i18n is done at all for the feed. At most one translation is
* allowed to have an unspecified language tag.
*
*
* optional string language = 3;
* @param value The bytes for language to set.
* @return This builder for chaining.
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
language_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedImage.LocalizedImage)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TranslatedImage.LocalizedImage)
private static final com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage();
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalizedImage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int LOCALIZED_IMAGE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List localizedImage_;
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
@java.lang.Override
public java.util.List getLocalizedImageList() {
return localizedImage_;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
@java.lang.Override
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
getLocalizedImageOrBuilderList() {
return localizedImage_;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
@java.lang.Override
public int getLocalizedImageCount() {
return localizedImage_.size();
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index) {
return localizedImage_.get(index);
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
int index) {
return localizedImage_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
for (int i = 0; i < getLocalizedImageCount(); i++) {
if (!getLocalizedImage(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
for (int i = 0; i < localizedImage_.size(); i++) {
output.writeMessage(1, localizedImage_.get(i));
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < localizedImage_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, localizedImage_.get(i));
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.TranslatedImage other = (com.google.transit.realtime.GtfsRealtime.TranslatedImage) obj;
if (!getLocalizedImageList()
.equals(other.getLocalizedImageList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getLocalizedImageCount() > 0) {
hash = (37 * hash) + LOCALIZED_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedImageList().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.TranslatedImage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* An internationalized image containing per-language versions of a URL linking to an image
* along with meta information
* Only one of the images from a message will be retained by consumers. The resolution proceeds
* as follows:
* 1. If the UI language matches the language code of a translation,
* the first matching translation is picked.
* 2. If a default UI language (e.g., English) matches the language code of a
* translation, the first matching translation is picked.
* 3. If some translation has an unspecified language code, that translation is
* picked.
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.TranslatedImage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.TranslatedImage, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.TranslatedImage)
com.google.transit.realtime.GtfsRealtime.TranslatedImageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.class, com.google.transit.realtime.GtfsRealtime.TranslatedImage.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.TranslatedImage.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (localizedImageBuilder_ == null) {
localizedImage_ = java.util.Collections.emptyList();
} else {
localizedImage_ = null;
localizedImageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_TranslatedImage_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage build() {
com.google.transit.realtime.GtfsRealtime.TranslatedImage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage buildPartial() {
com.google.transit.realtime.GtfsRealtime.TranslatedImage result = new com.google.transit.realtime.GtfsRealtime.TranslatedImage(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.transit.realtime.GtfsRealtime.TranslatedImage result) {
if (localizedImageBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
localizedImage_ = java.util.Collections.unmodifiableList(localizedImage_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.localizedImage_ = localizedImage_;
} else {
result.localizedImage_ = localizedImageBuilder_.build();
}
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.TranslatedImage result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.TranslatedImage) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.TranslatedImage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.TranslatedImage other) {
if (other == com.google.transit.realtime.GtfsRealtime.TranslatedImage.getDefaultInstance()) return this;
if (localizedImageBuilder_ == null) {
if (!other.localizedImage_.isEmpty()) {
if (localizedImage_.isEmpty()) {
localizedImage_ = other.localizedImage_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLocalizedImageIsMutable();
localizedImage_.addAll(other.localizedImage_);
}
onChanged();
}
} else {
if (!other.localizedImage_.isEmpty()) {
if (localizedImageBuilder_.isEmpty()) {
localizedImageBuilder_.dispose();
localizedImageBuilder_ = null;
localizedImage_ = other.localizedImage_;
bitField0_ = (bitField0_ & ~0x00000001);
localizedImageBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLocalizedImageFieldBuilder() : null;
} else {
localizedImageBuilder_.addAllMessages(other.localizedImage_);
}
}
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
for (int i = 0; i < getLocalizedImageCount(); i++) {
if (!getLocalizedImage(i).isInitialized()) {
return false;
}
}
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage m =
input.readMessage(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.PARSER,
extensionRegistry);
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
localizedImage_.add(m);
} else {
localizedImageBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List localizedImage_ =
java.util.Collections.emptyList();
private void ensureLocalizedImageIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
localizedImage_ = new java.util.ArrayList(localizedImage_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder> localizedImageBuilder_;
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public java.util.List getLocalizedImageList() {
if (localizedImageBuilder_ == null) {
return java.util.Collections.unmodifiableList(localizedImage_);
} else {
return localizedImageBuilder_.getMessageList();
}
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public int getLocalizedImageCount() {
if (localizedImageBuilder_ == null) {
return localizedImage_.size();
} else {
return localizedImageBuilder_.getCount();
}
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage getLocalizedImage(int index) {
if (localizedImageBuilder_ == null) {
return localizedImage_.get(index);
} else {
return localizedImageBuilder_.getMessage(index);
}
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder setLocalizedImage(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
if (localizedImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocalizedImageIsMutable();
localizedImage_.set(index, value);
onChanged();
} else {
localizedImageBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder setLocalizedImage(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
localizedImage_.set(index, builderForValue.build());
onChanged();
} else {
localizedImageBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder addLocalizedImage(com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
if (localizedImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocalizedImageIsMutable();
localizedImage_.add(value);
onChanged();
} else {
localizedImageBuilder_.addMessage(value);
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder addLocalizedImage(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage value) {
if (localizedImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocalizedImageIsMutable();
localizedImage_.add(index, value);
onChanged();
} else {
localizedImageBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder addLocalizedImage(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
localizedImage_.add(builderForValue.build());
onChanged();
} else {
localizedImageBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder addLocalizedImage(
int index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder builderForValue) {
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
localizedImage_.add(index, builderForValue.build());
onChanged();
} else {
localizedImageBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder addAllLocalizedImage(
java.lang.Iterable extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage> values) {
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, localizedImage_);
onChanged();
} else {
localizedImageBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder clearLocalizedImage() {
if (localizedImageBuilder_ == null) {
localizedImage_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
localizedImageBuilder_.clear();
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public Builder removeLocalizedImage(int index) {
if (localizedImageBuilder_ == null) {
ensureLocalizedImageIsMutable();
localizedImage_.remove(index);
onChanged();
} else {
localizedImageBuilder_.remove(index);
}
return this;
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder getLocalizedImageBuilder(
int index) {
return getLocalizedImageFieldBuilder().getBuilder(index);
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder getLocalizedImageOrBuilder(
int index) {
if (localizedImageBuilder_ == null) {
return localizedImage_.get(index); } else {
return localizedImageBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public java.util.List extends com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
getLocalizedImageOrBuilderList() {
if (localizedImageBuilder_ != null) {
return localizedImageBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(localizedImage_);
}
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder addLocalizedImageBuilder() {
return getLocalizedImageFieldBuilder().addBuilder(
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance());
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder addLocalizedImageBuilder(
int index) {
return getLocalizedImageFieldBuilder().addBuilder(
index, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.getDefaultInstance());
}
/**
*
* At least one localized image must be provided.
*
*
* repeated .transit_realtime.TranslatedImage.LocalizedImage localized_image = 1;
*/
public java.util.List
getLocalizedImageBuilderList() {
return getLocalizedImageFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>
getLocalizedImageFieldBuilder() {
if (localizedImageBuilder_ == null) {
localizedImageBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImage.Builder, com.google.transit.realtime.GtfsRealtime.TranslatedImage.LocalizedImageOrBuilder>(
localizedImage_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
localizedImage_ = null;
}
return localizedImageBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.TranslatedImage)
}
// @@protoc_insertion_point(class_scope:transit_realtime.TranslatedImage)
private static final com.google.transit.realtime.GtfsRealtime.TranslatedImage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.TranslatedImage();
}
public static com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TranslatedImage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.TranslatedImage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ShapeOrBuilder extends
// @@protoc_insertion_point(interface_extends:transit_realtime.Shape)
com.google.protobuf.GeneratedMessageV3.
ExtendableMessageOrBuilder {
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return Whether the shapeId field is set.
*/
boolean hasShapeId();
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The shapeId.
*/
java.lang.String getShapeId();
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The bytes for shapeId.
*/
com.google.protobuf.ByteString
getShapeIdBytes();
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return Whether the encodedPolyline field is set.
*/
boolean hasEncodedPolyline();
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The encodedPolyline.
*/
java.lang.String getEncodedPolyline();
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The bytes for encodedPolyline.
*/
com.google.protobuf.ByteString
getEncodedPolylineBytes();
}
/**
*
* Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
* such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
* Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
* the location of Stops exactly, but all Stops on a trip should lie within a small distance of
* the shape for that trip, i.e. close to straight line segments connecting the shape points
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.Shape}
*/
public static final class Shape extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Shape> implements
// @@protoc_insertion_point(message_implements:transit_realtime.Shape)
ShapeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Shape.newBuilder() to construct.
private Shape(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Shape() {
shapeId_ = "";
encodedPolyline_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Shape();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Shape.class, com.google.transit.realtime.GtfsRealtime.Shape.Builder.class);
}
private int bitField0_;
public static final int SHAPE_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object shapeId_ = "";
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return Whether the shapeId field is set.
*/
@java.lang.Override
public boolean hasShapeId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The shapeId.
*/
@java.lang.Override
public java.lang.String getShapeId() {
java.lang.Object ref = shapeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
shapeId_ = s;
}
return s;
}
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The bytes for shapeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getShapeIdBytes() {
java.lang.Object ref = shapeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shapeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENCODED_POLYLINE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object encodedPolyline_ = "";
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return Whether the encodedPolyline field is set.
*/
@java.lang.Override
public boolean hasEncodedPolyline() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The encodedPolyline.
*/
@java.lang.Override
public java.lang.String getEncodedPolyline() {
java.lang.Object ref = encodedPolyline_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
encodedPolyline_ = s;
}
return s;
}
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The bytes for encodedPolyline.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEncodedPolylineBytes() {
java.lang.Object ref = encodedPolyline_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
encodedPolyline_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, shapeId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, encodedPolyline_);
}
extensionWriter.writeUntil(10000, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, shapeId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, encodedPolyline_);
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.transit.realtime.GtfsRealtime.Shape)) {
return super.equals(obj);
}
com.google.transit.realtime.GtfsRealtime.Shape other = (com.google.transit.realtime.GtfsRealtime.Shape) obj;
if (hasShapeId() != other.hasShapeId()) return false;
if (hasShapeId()) {
if (!getShapeId()
.equals(other.getShapeId())) return false;
}
if (hasEncodedPolyline() != other.hasEncodedPolyline()) return false;
if (hasEncodedPolyline()) {
if (!getEncodedPolyline()
.equals(other.getEncodedPolyline())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasShapeId()) {
hash = (37 * hash) + SHAPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getShapeId().hashCode();
}
if (hasEncodedPolyline()) {
hash = (37 * hash) + ENCODED_POLYLINE_FIELD_NUMBER;
hash = (53 * hash) + getEncodedPolyline().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.transit.realtime.GtfsRealtime.Shape parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.transit.realtime.GtfsRealtime.Shape prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
* such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
* Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
* the location of Stops exactly, but all Stops on a trip should lie within a small distance of
* the shape for that trip, i.e. close to straight line segments connecting the shape points
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* Protobuf type {@code transit_realtime.Shape}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
com.google.transit.realtime.GtfsRealtime.Shape, Builder> implements
// @@protoc_insertion_point(builder_implements:transit_realtime.Shape)
com.google.transit.realtime.GtfsRealtime.ShapeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.transit.realtime.GtfsRealtime.Shape.class, com.google.transit.realtime.GtfsRealtime.Shape.Builder.class);
}
// Construct using com.google.transit.realtime.GtfsRealtime.Shape.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
shapeId_ = "";
encodedPolyline_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.transit.realtime.GtfsRealtime.internal_static_transit_realtime_Shape_descriptor;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstanceForType() {
return com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance();
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Shape build() {
com.google.transit.realtime.GtfsRealtime.Shape result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Shape buildPartial() {
com.google.transit.realtime.GtfsRealtime.Shape result = new com.google.transit.realtime.GtfsRealtime.Shape(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.transit.realtime.GtfsRealtime.Shape result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.shapeId_ = shapeId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.encodedPolyline_ = encodedPolyline_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.transit.realtime.GtfsRealtime.Shape) {
return mergeFrom((com.google.transit.realtime.GtfsRealtime.Shape)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Shape other) {
if (other == com.google.transit.realtime.GtfsRealtime.Shape.getDefaultInstance()) return this;
if (other.hasShapeId()) {
shapeId_ = other.shapeId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasEncodedPolyline()) {
encodedPolyline_ = other.encodedPolyline_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
shapeId_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
encodedPolyline_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object shapeId_ = "";
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return Whether the shapeId field is set.
*/
public boolean hasShapeId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The shapeId.
*/
public java.lang.String getShapeId() {
java.lang.Object ref = shapeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
shapeId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return The bytes for shapeId.
*/
public com.google.protobuf.ByteString
getShapeIdBytes() {
java.lang.Object ref = shapeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shapeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @param value The shapeId to set.
* @return This builder for chaining.
*/
public Builder setShapeId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
shapeId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @return This builder for chaining.
*/
public Builder clearShapeId() {
shapeId_ = getDefaultInstance().getShapeId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string shape_id = 1;
* @param value The bytes for shapeId to set.
* @return This builder for chaining.
*/
public Builder setShapeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
shapeId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object encodedPolyline_ = "";
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return Whether the encodedPolyline field is set.
*/
public boolean hasEncodedPolyline() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The encodedPolyline.
*/
public java.lang.String getEncodedPolyline() {
java.lang.Object ref = encodedPolyline_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
encodedPolyline_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return The bytes for encodedPolyline.
*/
public com.google.protobuf.ByteString
getEncodedPolylineBytes() {
java.lang.Object ref = encodedPolyline_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
encodedPolyline_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @param value The encodedPolyline to set.
* @return This builder for chaining.
*/
public Builder setEncodedPolyline(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
encodedPolyline_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @return This builder for chaining.
*/
public Builder clearEncodedPolyline() {
encodedPolyline_ = getDefaultInstance().getEncodedPolyline();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Encoded polyline representation of the shape. This polyline must contain at least two points.
* For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
* This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
* See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*
*
* optional string encoded_polyline = 2;
* @param value The bytes for encodedPolyline to set.
* @return This builder for chaining.
*/
public Builder setEncodedPolylineBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
encodedPolyline_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:transit_realtime.Shape)
}
// @@protoc_insertion_point(class_scope:transit_realtime.Shape)
private static final com.google.transit.realtime.GtfsRealtime.Shape DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.transit.realtime.GtfsRealtime.Shape();
}
public static com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Shape parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.transit.realtime.GtfsRealtime.Shape getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_FeedMessage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_FeedMessage_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_FeedHeader_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_FeedHeader_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_FeedEntity_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_FeedEntity_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripUpdate_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripUpdate_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripUpdate_TripProperties_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripUpdate_TripProperties_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_VehiclePosition_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_VehiclePosition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_VehiclePosition_CarriageDetails_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_Alert_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_Alert_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TimeRange_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TimeRange_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_Position_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_Position_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TripDescriptor_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TripDescriptor_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_VehicleDescriptor_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_EntitySelector_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_EntitySelector_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TranslatedString_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TranslatedString_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TranslatedString_Translation_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TranslatedImage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TranslatedImage_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_transit_realtime_Shape_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_transit_realtime_Shape_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\023gtfs-realtime.proto\022\020transit_realtime\"" +
"y\n\013FeedMessage\022,\n\006header\030\001 \002(\0132\034.transit" +
"_realtime.FeedHeader\022,\n\006entity\030\002 \003(\0132\034.t" +
"ransit_realtime.FeedEntity*\006\010\350\007\020\320\017*\006\010\250F\020" +
"\220N\"\327\001\n\nFeedHeader\022\035\n\025gtfs_realtime_versi" +
"on\030\001 \002(\t\022Q\n\016incrementality\030\002 \001(\0162+.trans" +
"it_realtime.FeedHeader.Incrementality:\014F" +
"ULL_DATASET\022\021\n\ttimestamp\030\003 \001(\004\"4\n\016Increm" +
"entality\022\020\n\014FULL_DATASET\020\000\022\020\n\014DIFFERENTI" +
"AL\020\001*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"\372\001\n\nFeedEntity\022\n\n\002i" +
"d\030\001 \002(\t\022\031\n\nis_deleted\030\002 \001(\010:\005false\0221\n\013tr" +
"ip_update\030\003 \001(\0132\034.transit_realtime.TripU" +
"pdate\0222\n\007vehicle\030\004 \001(\0132!.transit_realtim" +
"e.VehiclePosition\022&\n\005alert\030\005 \001(\0132\027.trans" +
"it_realtime.Alert\022&\n\005shape\030\006 \001(\0132\027.trans" +
"it_realtime.Shape*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"\353\010\n\nTr" +
"ipUpdate\022.\n\004trip\030\001 \002(\0132 .transit_realtim" +
"e.TripDescriptor\0224\n\007vehicle\030\003 \001(\0132#.tran" +
"sit_realtime.VehicleDescriptor\022E\n\020stop_t" +
"ime_update\030\002 \003(\0132+.transit_realtime.Trip" +
"Update.StopTimeUpdate\022\021\n\ttimestamp\030\004 \001(\004" +
"\022\r\n\005delay\030\005 \001(\005\022D\n\017trip_properties\030\006 \001(\013" +
"2+.transit_realtime.TripUpdate.TripPrope" +
"rties\032Q\n\rStopTimeEvent\022\r\n\005delay\030\001 \001(\005\022\014\n" +
"\004time\030\002 \001(\003\022\023\n\013uncertainty\030\003 \001(\005*\006\010\350\007\020\320\017" +
"*\006\010\250F\020\220N\032\367\004\n\016StopTimeUpdate\022\025\n\rstop_sequ" +
"ence\030\001 \001(\r\022\017\n\007stop_id\030\004 \001(\t\022;\n\007arrival\030\002" +
" \001(\0132*.transit_realtime.TripUpdate.StopT" +
"imeEvent\022=\n\tdeparture\030\003 \001(\0132*.transit_re" +
"altime.TripUpdate.StopTimeEvent\022U\n\032depar" +
"ture_occupancy_status\030\007 \001(\01621.transit_re" +
"altime.VehiclePosition.OccupancyStatus\022j" +
"\n\025schedule_relationship\030\005 \001(\[email protected]_" +
"realtime.TripUpdate.StopTimeUpdate.Sched" +
"uleRelationship:\tSCHEDULED\022\\\n\024stop_time_" +
"properties\030\006 \001(\0132>.transit_realtime.Trip" +
"Update.StopTimeUpdate.StopTimeProperties" +
"\032>\n\022StopTimeProperties\022\030\n\020assigned_stop_" +
"id\030\001 \001(\t*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"P\n\024ScheduleRela" +
"tionship\022\r\n\tSCHEDULED\020\000\022\013\n\007SKIPPED\020\001\022\013\n\007" +
"NO_DATA\020\002\022\017\n\013UNSCHEDULED\020\003*\006\010\350\007\020\320\017*\006\010\250F\020" +
"\220N\032k\n\016TripProperties\022\017\n\007trip_id\030\001 \001(\t\022\022\n" +
"\nstart_date\030\002 \001(\t\022\022\n\nstart_time\030\003 \001(\t\022\020\n" +
"\010shape_id\030\004 \001(\t*\006\010\350\007\020\320\017*\006\010\250F\020\220N*\006\010\350\007\020\320\017*" +
"\006\010\250F\020\220N\"\337\t\n\017VehiclePosition\022.\n\004trip\030\001 \001(" +
"\0132 .transit_realtime.TripDescriptor\0224\n\007v" +
"ehicle\030\010 \001(\0132#.transit_realtime.VehicleD" +
"escriptor\022,\n\010position\030\002 \001(\0132\032.transit_re" +
"altime.Position\022\035\n\025current_stop_sequence" +
"\030\003 \001(\r\022\017\n\007stop_id\030\007 \001(\t\022Z\n\016current_statu" +
"s\030\004 \001(\01623.transit_realtime.VehiclePositi" +
"on.VehicleStopStatus:\rIN_TRANSIT_TO\022\021\n\tt" +
"imestamp\030\005 \001(\004\022K\n\020congestion_level\030\006 \001(\016" +
"21.transit_realtime.VehiclePosition.Cong" +
"estionLevel\022K\n\020occupancy_status\030\t \001(\01621." +
"transit_realtime.VehiclePosition.Occupan" +
"cyStatus\022\034\n\024occupancy_percentage\030\n \001(\r\022Q" +
"\n\026multi_carriage_details\030\013 \003(\01321.transit" +
"_realtime.VehiclePosition.CarriageDetail" +
"s\032\331\001\n\017CarriageDetails\022\n\n\002id\030\001 \001(\t\022\r\n\005lab" +
"el\030\002 \001(\t\022^\n\020occupancy_status\030\003 \001(\01621.tra" +
"nsit_realtime.VehiclePosition.OccupancyS" +
"tatus:\021NO_DATA_AVAILABLE\022 \n\024occupancy_pe" +
"rcentage\030\004 \001(\005:\002-1\022\031\n\021carriage_sequence\030" +
"\005 \001(\r*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"G\n\021VehicleStopStat" +
"us\022\017\n\013INCOMING_AT\020\000\022\016\n\nSTOPPED_AT\020\001\022\021\n\rI" +
"N_TRANSIT_TO\020\002\"}\n\017CongestionLevel\022\034\n\030UNK" +
"NOWN_CONGESTION_LEVEL\020\000\022\024\n\020RUNNING_SMOOT" +
"HLY\020\001\022\017\n\013STOP_AND_GO\020\002\022\016\n\nCONGESTION\020\003\022\025" +
"\n\021SEVERE_CONGESTION\020\004\"\331\001\n\017OccupancyStatu" +
"s\022\t\n\005EMPTY\020\000\022\030\n\024MANY_SEATS_AVAILABLE\020\001\022\027" +
"\n\023FEW_SEATS_AVAILABLE\020\002\022\026\n\022STANDING_ROOM" +
"_ONLY\020\003\022\036\n\032CRUSHED_STANDING_ROOM_ONLY\020\004\022" +
"\010\n\004FULL\020\005\022\034\n\030NOT_ACCEPTING_PASSENGERS\020\006\022" +
"\025\n\021NO_DATA_AVAILABLE\020\007\022\021\n\rNOT_BOARDABLE\020" +
"\010*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"\353\n\n\005Alert\0222\n\ractive_pe" +
"riod\030\001 \003(\0132\033.transit_realtime.TimeRange\022" +
"9\n\017informed_entity\030\005 \003(\0132 .transit_realt" +
"ime.EntitySelector\022;\n\005cause\030\006 \001(\0162\035.tran" +
"sit_realtime.Alert.Cause:\rUNKNOWN_CAUSE\022" +
">\n\006effect\030\007 \001(\0162\036.transit_realtime.Alert" +
".Effect:\016UNKNOWN_EFFECT\022/\n\003url\030\010 \001(\0132\".t" +
"ransit_realtime.TranslatedString\0227\n\013head" +
"er_text\030\n \001(\0132\".transit_realtime.Transla" +
"tedString\022<\n\020description_text\030\013 \001(\0132\".tr" +
"ansit_realtime.TranslatedString\022;\n\017tts_h" +
"eader_text\030\014 \001(\0132\".transit_realtime.Tran" +
"slatedString\022@\n\024tts_description_text\030\r \001" +
"(\0132\".transit_realtime.TranslatedString\022O" +
"\n\016severity_level\030\016 \001(\0162%.transit_realtim" +
"e.Alert.SeverityLevel:\020UNKNOWN_SEVERITY\022" +
"0\n\005image\030\017 \001(\0132!.transit_realtime.Transl" +
"atedImage\022B\n\026image_alternative_text\030\020 \001(" +
"\0132\".transit_realtime.TranslatedString\0228\n" +
"\014cause_detail\030\021 \001(\0132\".transit_realtime.T" +
"ranslatedString\0229\n\reffect_detail\030\022 \001(\0132\"" +
".transit_realtime.TranslatedString\"\330\001\n\005C" +
"ause\022\021\n\rUNKNOWN_CAUSE\020\001\022\017\n\013OTHER_CAUSE\020\002" +
"\022\025\n\021TECHNICAL_PROBLEM\020\003\022\n\n\006STRIKE\020\004\022\021\n\rD" +
"EMONSTRATION\020\005\022\014\n\010ACCIDENT\020\006\022\013\n\007HOLIDAY\020" +
"\007\022\013\n\007WEATHER\020\010\022\017\n\013MAINTENANCE\020\t\022\020\n\014CONST" +
"RUCTION\020\n\022\023\n\017POLICE_ACTIVITY\020\013\022\025\n\021MEDICA" +
"L_EMERGENCY\020\014\"\335\001\n\006Effect\022\016\n\nNO_SERVICE\020\001" +
"\022\023\n\017REDUCED_SERVICE\020\002\022\026\n\022SIGNIFICANT_DEL" +
"AYS\020\003\022\n\n\006DETOUR\020\004\022\026\n\022ADDITIONAL_SERVICE\020" +
"\005\022\024\n\020MODIFIED_SERVICE\020\006\022\020\n\014OTHER_EFFECT\020" +
"\007\022\022\n\016UNKNOWN_EFFECT\020\010\022\016\n\nSTOP_MOVED\020\t\022\r\n" +
"\tNO_EFFECT\020\n\022\027\n\023ACCESSIBILITY_ISSUE\020\013\"H\n" +
"\rSeverityLevel\022\024\n\020UNKNOWN_SEVERITY\020\001\022\010\n\004" +
"INFO\020\002\022\013\n\007WARNING\020\003\022\n\n\006SEVERE\020\004*\006\010\350\007\020\320\017*" +
"\006\010\250F\020\220N\"7\n\tTimeRange\022\r\n\005start\030\001 \001(\004\022\013\n\003e" +
"nd\030\002 \001(\004*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"q\n\010Position\022\020\n\010" +
"latitude\030\001 \002(\002\022\021\n\tlongitude\030\002 \002(\002\022\017\n\007bea" +
"ring\030\003 \001(\002\022\020\n\010odometer\030\004 \001(\001\022\r\n\005speed\030\005 " +
"\001(\002*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"\333\002\n\016TripDescriptor\022\017" +
"\n\007trip_id\030\001 \001(\t\022\020\n\010route_id\030\005 \001(\t\022\024\n\014dir" +
"ection_id\030\006 \001(\r\022\022\n\nstart_time\030\002 \001(\t\022\022\n\ns" +
"tart_date\030\003 \001(\t\022T\n\025schedule_relationship" +
"\030\004 \001(\01625.transit_realtime.TripDescriptor" +
".ScheduleRelationship\"\201\001\n\024ScheduleRelati" +
"onship\022\r\n\tSCHEDULED\020\000\022\t\n\005ADDED\020\001\022\017\n\013UNSC" +
"HEDULED\020\002\022\014\n\010CANCELED\020\003\022\023\n\013REPLACEMENT\020\005" +
"\032\002\010\001\022\016\n\nDUPLICATED\020\006\022\013\n\007DELETED\020\007*\006\010\350\007\020\320" +
"\017*\006\010\250F\020\220N\"\243\002\n\021VehicleDescriptor\022\n\n\002id\030\001 " +
"\001(\t\022\r\n\005label\030\002 \001(\t\022\025\n\rlicense_plate\030\003 \001(" +
"\t\022a\n\025wheelchair_accessible\030\004 \001(\01628.trans" +
"it_realtime.VehicleDescriptor.Wheelchair" +
"Accessible:\010NO_VALUE\"i\n\024WheelchairAccess" +
"ible\022\014\n\010NO_VALUE\020\000\022\013\n\007UNKNOWN\020\001\022\031\n\025WHEEL" +
"CHAIR_ACCESSIBLE\020\002\022\033\n\027WHEELCHAIR_INACCES" +
"SIBLE\020\003*\006\010\350\007\020\320\017*\006\010\250F\020\220N\"\260\001\n\016EntitySelect" +
"or\022\021\n\tagency_id\030\001 \001(\t\022\020\n\010route_id\030\002 \001(\t\022" +
"\022\n\nroute_type\030\003 \001(\005\022.\n\004trip\030\004 \001(\0132 .tran" +
"sit_realtime.TripDescriptor\022\017\n\007stop_id\030\005" +
" \001(\t\022\024\n\014direction_id\030\006 \001(\r*\006\010\350\007\020\320\017*\006\010\250F\020" +
"\220N\"\246\001\n\020TranslatedString\022C\n\013translation\030\001" +
" \003(\0132..transit_realtime.TranslatedString" +
".Translation\032=\n\013Translation\022\014\n\004text\030\001 \002(" +
"\t\022\020\n\010language\030\002 \001(\t*\006\010\350\007\020\320\017*\006\010\250F\020\220N*\006\010\350\007" +
"\020\320\017*\006\010\250F\020\220N\"\301\001\n\017TranslatedImage\022I\n\017local" +
"ized_image\030\001 \003(\01320.transit_realtime.Tran" +
"slatedImage.LocalizedImage\032S\n\016LocalizedI" +
"mage\022\013\n\003url\030\001 \002(\t\022\022\n\nmedia_type\030\002 \002(\t\022\020\n" +
"\010language\030\003 \001(\t*\006\010\350\007\020\320\017*\006\010\250F\020\220N*\006\010\350\007\020\320\017*" +
"\006\010\250F\020\220N\"C\n\005Shape\022\020\n\010shape_id\030\001 \001(\t\022\030\n\020en" +
"coded_polyline\030\002 \001(\t*\006\010\350\007\020\320\017*\006\010\250F\020\220NB\035\n\033" +
"com.google.transit.realtime"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_transit_realtime_FeedMessage_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_transit_realtime_FeedMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_FeedMessage_descriptor,
new java.lang.String[] { "Header", "Entity", });
internal_static_transit_realtime_FeedHeader_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_transit_realtime_FeedHeader_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_FeedHeader_descriptor,
new java.lang.String[] { "GtfsRealtimeVersion", "Incrementality", "Timestamp", });
internal_static_transit_realtime_FeedEntity_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_transit_realtime_FeedEntity_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_FeedEntity_descriptor,
new java.lang.String[] { "Id", "IsDeleted", "TripUpdate", "Vehicle", "Alert", "Shape", });
internal_static_transit_realtime_TripUpdate_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_transit_realtime_TripUpdate_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripUpdate_descriptor,
new java.lang.String[] { "Trip", "Vehicle", "StopTimeUpdate", "Timestamp", "Delay", "TripProperties", });
internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor =
internal_static_transit_realtime_TripUpdate_descriptor.getNestedTypes().get(0);
internal_static_transit_realtime_TripUpdate_StopTimeEvent_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripUpdate_StopTimeEvent_descriptor,
new java.lang.String[] { "Delay", "Time", "Uncertainty", });
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor =
internal_static_transit_realtime_TripUpdate_descriptor.getNestedTypes().get(1);
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor,
new java.lang.String[] { "StopSequence", "StopId", "Arrival", "Departure", "DepartureOccupancyStatus", "ScheduleRelationship", "StopTimeProperties", });
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor =
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_descriptor.getNestedTypes().get(0);
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripUpdate_StopTimeUpdate_StopTimeProperties_descriptor,
new java.lang.String[] { "AssignedStopId", });
internal_static_transit_realtime_TripUpdate_TripProperties_descriptor =
internal_static_transit_realtime_TripUpdate_descriptor.getNestedTypes().get(2);
internal_static_transit_realtime_TripUpdate_TripProperties_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripUpdate_TripProperties_descriptor,
new java.lang.String[] { "TripId", "StartDate", "StartTime", "ShapeId", });
internal_static_transit_realtime_VehiclePosition_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_transit_realtime_VehiclePosition_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_VehiclePosition_descriptor,
new java.lang.String[] { "Trip", "Vehicle", "Position", "CurrentStopSequence", "StopId", "CurrentStatus", "Timestamp", "CongestionLevel", "OccupancyStatus", "OccupancyPercentage", "MultiCarriageDetails", });
internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor =
internal_static_transit_realtime_VehiclePosition_descriptor.getNestedTypes().get(0);
internal_static_transit_realtime_VehiclePosition_CarriageDetails_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_VehiclePosition_CarriageDetails_descriptor,
new java.lang.String[] { "Id", "Label", "OccupancyStatus", "OccupancyPercentage", "CarriageSequence", });
internal_static_transit_realtime_Alert_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_transit_realtime_Alert_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_Alert_descriptor,
new java.lang.String[] { "ActivePeriod", "InformedEntity", "Cause", "Effect", "Url", "HeaderText", "DescriptionText", "TtsHeaderText", "TtsDescriptionText", "SeverityLevel", "Image", "ImageAlternativeText", "CauseDetail", "EffectDetail", });
internal_static_transit_realtime_TimeRange_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_transit_realtime_TimeRange_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TimeRange_descriptor,
new java.lang.String[] { "Start", "End", });
internal_static_transit_realtime_Position_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_transit_realtime_Position_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_Position_descriptor,
new java.lang.String[] { "Latitude", "Longitude", "Bearing", "Odometer", "Speed", });
internal_static_transit_realtime_TripDescriptor_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_transit_realtime_TripDescriptor_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TripDescriptor_descriptor,
new java.lang.String[] { "TripId", "RouteId", "DirectionId", "StartTime", "StartDate", "ScheduleRelationship", });
internal_static_transit_realtime_VehicleDescriptor_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_transit_realtime_VehicleDescriptor_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_VehicleDescriptor_descriptor,
new java.lang.String[] { "Id", "Label", "LicensePlate", "WheelchairAccessible", });
internal_static_transit_realtime_EntitySelector_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_transit_realtime_EntitySelector_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_EntitySelector_descriptor,
new java.lang.String[] { "AgencyId", "RouteId", "RouteType", "Trip", "StopId", "DirectionId", });
internal_static_transit_realtime_TranslatedString_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_transit_realtime_TranslatedString_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TranslatedString_descriptor,
new java.lang.String[] { "Translation", });
internal_static_transit_realtime_TranslatedString_Translation_descriptor =
internal_static_transit_realtime_TranslatedString_descriptor.getNestedTypes().get(0);
internal_static_transit_realtime_TranslatedString_Translation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TranslatedString_Translation_descriptor,
new java.lang.String[] { "Text", "Language", });
internal_static_transit_realtime_TranslatedImage_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_transit_realtime_TranslatedImage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TranslatedImage_descriptor,
new java.lang.String[] { "LocalizedImage", });
internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor =
internal_static_transit_realtime_TranslatedImage_descriptor.getNestedTypes().get(0);
internal_static_transit_realtime_TranslatedImage_LocalizedImage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_TranslatedImage_LocalizedImage_descriptor,
new java.lang.String[] { "Url", "MediaType", "Language", });
internal_static_transit_realtime_Shape_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_transit_realtime_Shape_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_transit_realtime_Shape_descriptor,
new java.lang.String[] { "ShapeId", "EncodedPolyline", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy