// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/main/protobuf/osmformat.proto
package com.revolsys.record.io.format.openstreetmap.pbf;
public final class Osmformat {
public static final class ChangeSet extends com.google.protobuf.GeneratedMessageLite
implements ChangeSetOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ChangeSet, Builder>
implements ChangeSetOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// required int64 id = 1;
private long id_;
// Construct using ChangeSet.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@Override
public ChangeSet build() {
final ChangeSet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private ChangeSet buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final ChangeSet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public ChangeSet buildPartial() {
final ChangeSet result = new ChangeSet(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.id_ = this.id_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.id_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearId() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.id_ = 0L;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
@Override
public ChangeSet getDefaultInstanceForType() {
return ChangeSet.getDefaultInstance();
}
@Override
public long getId() {
return this.id_;
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final ChangeSet other) {
if (other == ChangeSet.getDefaultInstance()) {
return this;
}
if (other.hasId()) {
setId(other.getId());
}
return this;
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.id_ = input.readInt64();
break;
}
}
}
}
public Builder setId(final long value) {
this.bitField0_ |= 0x00000001;
this.id_ = value;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet)
}
private static final ChangeSet defaultInstance;
// required int64 id = 1;
public static final int ID_FIELD_NUMBER = 1;
private static final long serialVersionUID = 0L;
static {
defaultInstance = new ChangeSet(true);
defaultInstance.initFields();
}
public static ChangeSet getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final ChangeSet prototype) {
return newBuilder().mergeFrom(prototype);
}
public static ChangeSet parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ChangeSet parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ChangeSet parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ChangeSet parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static ChangeSet parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ChangeSet parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static ChangeSet parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ChangeSet parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static ChangeSet parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ChangeSet parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long id_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private ChangeSet(final boolean noInit) {
}
// Use ChangeSet.newBuilder() to construct.
private ChangeSet(final Builder builder) {
super(builder);
}
@Override
public ChangeSet getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public long getId() {
return this.id_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, this.id_);
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
private void initFields() {
this.id_ = 0L;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasId()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeInt64(1, this.id_);
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet)
}
public interface ChangeSetOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getId();
// required int64 id = 1;
boolean hasId();
}
public static final class DenseInfo extends com.google.protobuf.GeneratedMessageLite
implements DenseInfoOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<DenseInfo, Builder>
implements DenseInfoOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// repeated sint64 changeset = 3 [packed = true];
private java.util.List<java.lang.Long> changeset_ = java.util.Collections.emptyList();
// repeated sint64 timestamp = 2 [packed = true];
private java.util.List<java.lang.Long> timestamp_ = java.util.Collections.emptyList();
// repeated sint32 uid = 4 [packed = true];
private java.util.List<java.lang.Integer> uid_ = java.util.Collections.emptyList();
// repeated sint32 user_sid = 5 [packed = true];
private java.util.List<java.lang.Integer> userSid_ = java.util.Collections.emptyList();
// repeated int32 version = 1 [packed = true];
private java.util.List<java.lang.Integer> version_ = java.util.Collections.emptyList();
// repeated bool visible = 6 [packed = true];
private java.util.List<java.lang.Boolean> visible_ = java.util.Collections.emptyList();
// Construct using DenseInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllChangeset(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureChangesetIsMutable();
super.addAll(values, this.changeset_);
return this;
}
public Builder addAllTimestamp(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureTimestampIsMutable();
super.addAll(values, this.timestamp_);
return this;
}
public Builder addAllUid(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureUidIsMutable();
super.addAll(values, this.uid_);
return this;
}
public Builder addAllUserSid(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureUserSidIsMutable();
super.addAll(values, this.userSid_);
return this;
}
public Builder addAllVersion(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureVersionIsMutable();
super.addAll(values, this.version_);
return this;
};
public Builder addAllVisible(final java.lang.Iterable<? extends java.lang.Boolean> values) {
ensureVisibleIsMutable();
super.addAll(values, this.visible_);
return this;
}
public Builder addChangeset(final long value) {
ensureChangesetIsMutable();
this.changeset_.add(value);
return this;
}
public Builder addTimestamp(final long value) {
ensureTimestampIsMutable();
this.timestamp_.add(value);
return this;
}
public Builder addUid(final int value) {
ensureUidIsMutable();
this.uid_.add(value);
return this;
}
public Builder addUserSid(final int value) {
ensureUserSidIsMutable();
this.userSid_.add(value);
return this;
}
public Builder addVersion(final int value) {
ensureVersionIsMutable();
this.version_.add(value);
return this;
}
public Builder addVisible(final boolean value) {
ensureVisibleIsMutable();
this.visible_.add(value);
return this;
}
@Override
public DenseInfo build() {
final DenseInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private DenseInfo buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final DenseInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
};
@Override
public DenseInfo buildPartial() {
final DenseInfo result = new DenseInfo(this);
final int from_bitField0_ = this.bitField0_;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
this.version_ = java.util.Collections.unmodifiableList(this.version_);
this.bitField0_ = this.bitField0_ & ~0x00000001;
}
result.version_ = this.version_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.timestamp_ = java.util.Collections.unmodifiableList(this.timestamp_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.timestamp_ = this.timestamp_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.changeset_ = java.util.Collections.unmodifiableList(this.changeset_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.changeset_ = this.changeset_;
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
this.uid_ = java.util.Collections.unmodifiableList(this.uid_);
this.bitField0_ = this.bitField0_ & ~0x00000008;
}
result.uid_ = this.uid_;
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
this.userSid_ = java.util.Collections.unmodifiableList(this.userSid_);
this.bitField0_ = this.bitField0_ & ~0x00000010;
}
result.userSid_ = this.userSid_;
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
this.visible_ = java.util.Collections.unmodifiableList(this.visible_);
this.bitField0_ = this.bitField0_ & ~0x00000020;
}
result.visible_ = this.visible_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.version_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.timestamp_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.changeset_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.uid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.userSid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.visible_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
}
public Builder clearChangeset() {
this.changeset_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
public Builder clearTimestamp() {
this.timestamp_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearUid() {
this.uid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
public Builder clearUserSid() {
this.userSid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearVersion() {
this.version_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearVisible() {
this.visible_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
};
private void ensureChangesetIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.changeset_ = new java.util.ArrayList<>(this.changeset_);
this.bitField0_ |= 0x00000004;
}
}
private void ensureTimestampIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.timestamp_ = new java.util.ArrayList<>(this.timestamp_);
this.bitField0_ |= 0x00000002;
}
}
private void ensureUidIsMutable() {
if (!((this.bitField0_ & 0x00000008) == 0x00000008)) {
this.uid_ = new java.util.ArrayList<>(this.uid_);
this.bitField0_ |= 0x00000008;
}
}
private void ensureUserSidIsMutable() {
if (!((this.bitField0_ & 0x00000010) == 0x00000010)) {
this.userSid_ = new java.util.ArrayList<>(this.userSid_);
this.bitField0_ |= 0x00000010;
}
}
private void ensureVersionIsMutable() {
if (!((this.bitField0_ & 0x00000001) == 0x00000001)) {
this.version_ = new java.util.ArrayList<>(this.version_);
this.bitField0_ |= 0x00000001;
}
}
private void ensureVisibleIsMutable() {
if (!((this.bitField0_ & 0x00000020) == 0x00000020)) {
this.visible_ = new java.util.ArrayList<>(this.visible_);
this.bitField0_ |= 0x00000020;
}
}
@Override
public long getChangeset(final int index) {
return this.changeset_.get(index);
}
@Override
public int getChangesetCount() {
return this.changeset_.size();
}
@Override
public java.util.List<java.lang.Long> getChangesetList() {
return java.util.Collections.unmodifiableList(this.changeset_);
};
@Override
public DenseInfo getDefaultInstanceForType() {
return DenseInfo.getDefaultInstance();
}
@Override
public long getTimestamp(final int index) {
return this.timestamp_.get(index);
}
@Override
public int getTimestampCount() {
return this.timestamp_.size();
}
@Override
public java.util.List<java.lang.Long> getTimestampList() {
return java.util.Collections.unmodifiableList(this.timestamp_);
}
@Override
public int getUid(final int index) {
return this.uid_.get(index);
}
@Override
public int getUidCount() {
return this.uid_.size();
}
@Override
public java.util.List<java.lang.Integer> getUidList() {
return java.util.Collections.unmodifiableList(this.uid_);
}
@Override
public int getUserSid(final int index) {
return this.userSid_.get(index);
}
@Override
public int getUserSidCount() {
return this.userSid_.size();
};
@Override
public java.util.List<java.lang.Integer> getUserSidList() {
return java.util.Collections.unmodifiableList(this.userSid_);
}
@Override
public int getVersion(final int index) {
return this.version_.get(index);
}
@Override
public int getVersionCount() {
return this.version_.size();
}
@Override
public java.util.List<java.lang.Integer> getVersionList() {
return java.util.Collections.unmodifiableList(this.version_);
}
@Override
public boolean getVisible(final int index) {
return this.visible_.get(index);
}
@Override
public int getVisibleCount() {
return this.visible_.size();
}
@Override
public java.util.List<java.lang.Boolean> getVisibleList() {
return java.util.Collections.unmodifiableList(this.visible_);
}
@Override
public final boolean isInitialized() {
return true;
}
private void maybeForceBuilderInitialization() {
};
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
ensureVersionIsMutable();
this.version_.add(input.readInt32());
break;
}
case 10: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addVersion(input.readInt32());
}
input.popLimit(limit);
break;
}
case 16: {
ensureTimestampIsMutable();
this.timestamp_.add(input.readSInt64());
break;
}
case 18: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addTimestamp(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 24: {
ensureChangesetIsMutable();
this.changeset_.add(input.readSInt64());
break;
}
case 26: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addChangeset(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 32: {
ensureUidIsMutable();
this.uid_.add(input.readSInt32());
break;
}
case 34: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addUid(input.readSInt32());
}
input.popLimit(limit);
break;
}
case 40: {
ensureUserSidIsMutable();
this.userSid_.add(input.readSInt32());
break;
}
case 42: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addUserSid(input.readSInt32());
}
input.popLimit(limit);
break;
}
case 48: {
ensureVisibleIsMutable();
this.visible_.add(input.readBool());
break;
}
case 50: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addVisible(input.readBool());
}
input.popLimit(limit);
break;
}
}
}
}
@Override
public Builder mergeFrom(final DenseInfo other) {
if (other == DenseInfo.getDefaultInstance()) {
return this;
}
if (!other.version_.isEmpty()) {
if (this.version_.isEmpty()) {
this.version_ = other.version_;
this.bitField0_ = this.bitField0_ & ~0x00000001;
} else {
ensureVersionIsMutable();
this.version_.addAll(other.version_);
}
}
if (!other.timestamp_.isEmpty()) {
if (this.timestamp_.isEmpty()) {
this.timestamp_ = other.timestamp_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensureTimestampIsMutable();
this.timestamp_.addAll(other.timestamp_);
}
}
if (!other.changeset_.isEmpty()) {
if (this.changeset_.isEmpty()) {
this.changeset_ = other.changeset_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureChangesetIsMutable();
this.changeset_.addAll(other.changeset_);
}
}
if (!other.uid_.isEmpty()) {
if (this.uid_.isEmpty()) {
this.uid_ = other.uid_;
this.bitField0_ = this.bitField0_ & ~0x00000008;
} else {
ensureUidIsMutable();
this.uid_.addAll(other.uid_);
}
}
if (!other.userSid_.isEmpty()) {
if (this.userSid_.isEmpty()) {
this.userSid_ = other.userSid_;
this.bitField0_ = this.bitField0_ & ~0x00000010;
} else {
ensureUserSidIsMutable();
this.userSid_.addAll(other.userSid_);
}
}
if (!other.visible_.isEmpty()) {
if (this.visible_.isEmpty()) {
this.visible_ = other.visible_;
this.bitField0_ = this.bitField0_ & ~0x00000020;
} else {
ensureVisibleIsMutable();
this.visible_.addAll(other.visible_);
}
}
return this;
}
public Builder setChangeset(final int index, final long value) {
ensureChangesetIsMutable();
this.changeset_.set(index, value);
return this;
}
public Builder setTimestamp(final int index, final long value) {
ensureTimestampIsMutable();
this.timestamp_.set(index, value);
return this;
}
public Builder setUid(final int index, final int value) {
ensureUidIsMutable();
this.uid_.set(index, value);
return this;
}
public Builder setUserSid(final int index, final int value) {
ensureUserSidIsMutable();
this.userSid_.set(index, value);
return this;
}
public Builder setVersion(final int index, final int value) {
ensureVersionIsMutable();
this.version_.set(index, value);
return this;
}
public Builder setVisible(final int index, final boolean value) {
ensureVisibleIsMutable();
this.visible_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo)
}
// repeated sint64 changeset = 3 [packed = true];
public static final int CHANGESET_FIELD_NUMBER = 3;
private static final DenseInfo defaultInstance;
private static final long serialVersionUID = 0L;
// repeated sint64 timestamp = 2 [packed = true];
public static final int TIMESTAMP_FIELD_NUMBER = 2;
// repeated sint32 uid = 4 [packed = true];
public static final int UID_FIELD_NUMBER = 4;
// repeated sint32 user_sid = 5 [packed = true];
public static final int USER_SID_FIELD_NUMBER = 5;
// repeated int32 version = 1 [packed = true];
public static final int VERSION_FIELD_NUMBER = 1;
// repeated bool visible = 6 [packed = true];
public static final int VISIBLE_FIELD_NUMBER = 6;
static {
defaultInstance = new DenseInfo(true);
defaultInstance.initFields();
}
public static DenseInfo getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final DenseInfo prototype) {
return newBuilder().mergeFrom(prototype);
}
public static DenseInfo parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static DenseInfo parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static DenseInfo parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static DenseInfo parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static DenseInfo parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static DenseInfo parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static DenseInfo parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static DenseInfo parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static DenseInfo parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static DenseInfo parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private java.util.List<java.lang.Long> changeset_;
private int changesetMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<java.lang.Long> timestamp_;
private int timestampMemoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> uid_;
private int uidMemoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> userSid_;
private int userSidMemoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> version_;
private int versionMemoizedSerializedSize = -1;
private java.util.List<java.lang.Boolean> visible_;
private int visibleMemoizedSerializedSize = -1;
private DenseInfo(final boolean noInit) {
}
// Use DenseInfo.newBuilder() to construct.
private DenseInfo(final Builder builder) {
super(builder);
}
@Override
public long getChangeset(final int index) {
return this.changeset_.get(index);
}
@Override
public int getChangesetCount() {
return this.changeset_.size();
}
@Override
public java.util.List<java.lang.Long> getChangesetList() {
return this.changeset_;
}
@Override
public DenseInfo getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
{
int dataSize = 0;
for (int i = 0; i < this.version_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(this.version_.get(i));
}
size += dataSize;
if (!getVersionList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.versionMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.timestamp_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.timestamp_.get(i));
}
size += dataSize;
if (!getTimestampList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.timestampMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.changeset_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.changeset_.get(i));
}
size += dataSize;
if (!getChangesetList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.changesetMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.uid_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt32SizeNoTag(this.uid_.get(i));
}
size += dataSize;
if (!getUidList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.uidMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.userSid_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt32SizeNoTag(this.userSid_.get(i));
}
size += dataSize;
if (!getUserSidList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.userSidMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 1 * getVisibleList().size();
size += dataSize;
if (!getVisibleList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.visibleMemoizedSerializedSize = dataSize;
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public long getTimestamp(final int index) {
return this.timestamp_.get(index);
}
@Override
public int getTimestampCount() {
return this.timestamp_.size();
}
@Override
public java.util.List<java.lang.Long> getTimestampList() {
return this.timestamp_;
}
@Override
public int getUid(final int index) {
return this.uid_.get(index);
}
@Override
public int getUidCount() {
return this.uid_.size();
}
@Override
public java.util.List<java.lang.Integer> getUidList() {
return this.uid_;
}
@Override
public int getUserSid(final int index) {
return this.userSid_.get(index);
}
@Override
public int getUserSidCount() {
return this.userSid_.size();
}
@Override
public java.util.List<java.lang.Integer> getUserSidList() {
return this.userSid_;
}
@Override
public int getVersion(final int index) {
return this.version_.get(index);
}
@Override
public int getVersionCount() {
return this.version_.size();
}
@Override
public java.util.List<java.lang.Integer> getVersionList() {
return this.version_;
}
@Override
public boolean getVisible(final int index) {
return this.visible_.get(index);
}
@Override
public int getVisibleCount() {
return this.visible_.size();
}
@Override
public java.util.List<java.lang.Boolean> getVisibleList() {
return this.visible_;
}
private void initFields() {
this.version_ = java.util.Collections.emptyList();
;
this.timestamp_ = java.util.Collections.emptyList();
;
this.changeset_ = java.util.Collections.emptyList();
;
this.uid_ = java.util.Collections.emptyList();
;
this.userSid_ = java.util.Collections.emptyList();
;
this.visible_ = java.util.Collections.emptyList();
;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getVersionList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(this.versionMemoizedSerializedSize);
}
for (int i = 0; i < this.version_.size(); i++) {
output.writeInt32NoTag(this.version_.get(i));
}
if (getTimestampList().size() > 0) {
output.writeRawVarint32(18);
output.writeRawVarint32(this.timestampMemoizedSerializedSize);
}
for (int i = 0; i < this.timestamp_.size(); i++) {
output.writeSInt64NoTag(this.timestamp_.get(i));
}
if (getChangesetList().size() > 0) {
output.writeRawVarint32(26);
output.writeRawVarint32(this.changesetMemoizedSerializedSize);
}
for (int i = 0; i < this.changeset_.size(); i++) {
output.writeSInt64NoTag(this.changeset_.get(i));
}
if (getUidList().size() > 0) {
output.writeRawVarint32(34);
output.writeRawVarint32(this.uidMemoizedSerializedSize);
}
for (int i = 0; i < this.uid_.size(); i++) {
output.writeSInt32NoTag(this.uid_.get(i));
}
if (getUserSidList().size() > 0) {
output.writeRawVarint32(42);
output.writeRawVarint32(this.userSidMemoizedSerializedSize);
}
for (int i = 0; i < this.userSid_.size(); i++) {
output.writeSInt32NoTag(this.userSid_.get(i));
}
if (getVisibleList().size() > 0) {
output.writeRawVarint32(50);
output.writeRawVarint32(this.visibleMemoizedSerializedSize);
}
for (int i = 0; i < this.visible_.size(); i++) {
output.writeBoolNoTag(this.visible_.get(i));
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo)
}
public interface DenseInfoOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getChangeset(int index);
int getChangesetCount();
// repeated sint64 changeset = 3 [packed = true];
java.util.List<java.lang.Long> getChangesetList();
long getTimestamp(int index);
int getTimestampCount();
// repeated sint64 timestamp = 2 [packed = true];
java.util.List<java.lang.Long> getTimestampList();
int getUid(int index);
int getUidCount();
// repeated sint32 uid = 4 [packed = true];
java.util.List<java.lang.Integer> getUidList();
int getUserSid(int index);
int getUserSidCount();
// repeated sint32 user_sid = 5 [packed = true];
java.util.List<java.lang.Integer> getUserSidList();
int getVersion(int index);
int getVersionCount();
// repeated int32 version = 1 [packed = true];
java.util.List<java.lang.Integer> getVersionList();
boolean getVisible(int index);
int getVisibleCount();
// repeated bool visible = 6 [packed = true];
java.util.List<java.lang.Boolean> getVisibleList();
}
public static final class DenseNodes extends com.google.protobuf.GeneratedMessageLite
implements DenseNodesOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<DenseNodes, Builder>
implements DenseNodesOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// optional .OSMPBF.DenseInfo denseinfo = 5;
private DenseInfo denseinfo_ = DenseInfo.getDefaultInstance();
// repeated sint64 id = 1 [packed = true];
private java.util.List<java.lang.Long> id_ = java.util.Collections.emptyList();
// repeated int32 keys_vals = 10 [packed = true];
private java.util.List<java.lang.Integer> keysVals_ = java.util.Collections.emptyList();
// repeated sint64 lat = 8 [packed = true];
private java.util.List<java.lang.Long> lat_ = java.util.Collections.emptyList();
// repeated sint64 lon = 9 [packed = true];
private java.util.List<java.lang.Long> lon_ = java.util.Collections.emptyList();
// Construct using DenseNodes.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllId(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureIdIsMutable();
super.addAll(values, this.id_);
return this;
}
public Builder addAllKeysVals(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureKeysValsIsMutable();
super.addAll(values, this.keysVals_);
return this;
}
public Builder addAllLat(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureLatIsMutable();
super.addAll(values, this.lat_);
return this;
}
public Builder addAllLon(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureLonIsMutable();
super.addAll(values, this.lon_);
return this;
}
public Builder addId(final long value) {
ensureIdIsMutable();
this.id_.add(value);
return this;
}
public Builder addKeysVals(final int value) {
ensureKeysValsIsMutable();
this.keysVals_.add(value);
return this;
};
public Builder addLat(final long value) {
ensureLatIsMutable();
this.lat_.add(value);
return this;
}
public Builder addLon(final long value) {
ensureLonIsMutable();
this.lon_.add(value);
return this;
}
@Override
public DenseNodes build() {
final DenseNodes result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private DenseNodes buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final DenseNodes result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public DenseNodes buildPartial() {
final DenseNodes result = new DenseNodes(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
this.id_ = java.util.Collections.unmodifiableList(this.id_);
this.bitField0_ = this.bitField0_ & ~0x00000001;
}
result.id_ = this.id_;
if ((from_bitField0_ & 0x00000002) == 0x00000002) {
to_bitField0_ |= 0x00000001;
}
result.denseinfo_ = this.denseinfo_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.lat_ = java.util.Collections.unmodifiableList(this.lat_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.lat_ = this.lat_;
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
this.lon_ = java.util.Collections.unmodifiableList(this.lon_);
this.bitField0_ = this.bitField0_ & ~0x00000008;
}
result.lon_ = this.lon_;
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
this.keysVals_ = java.util.Collections.unmodifiableList(this.keysVals_);
this.bitField0_ = this.bitField0_ & ~0x00000010;
}
result.keysVals_ = this.keysVals_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.id_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.denseinfo_ = DenseInfo.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.lat_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.lon_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.keysVals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearDenseinfo() {
this.denseinfo_ = DenseInfo.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearId() {
this.id_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearKeysVals() {
this.keysVals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearLat() {
this.lat_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
public Builder clearLon() {
this.lon_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureIdIsMutable() {
if (!((this.bitField0_ & 0x00000001) == 0x00000001)) {
this.id_ = new java.util.ArrayList<>(this.id_);
this.bitField0_ |= 0x00000001;
}
}
private void ensureKeysValsIsMutable() {
if (!((this.bitField0_ & 0x00000010) == 0x00000010)) {
this.keysVals_ = new java.util.ArrayList<>(this.keysVals_);
this.bitField0_ |= 0x00000010;
}
}
private void ensureLatIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.lat_ = new java.util.ArrayList<>(this.lat_);
this.bitField0_ |= 0x00000004;
}
}
private void ensureLonIsMutable() {
if (!((this.bitField0_ & 0x00000008) == 0x00000008)) {
this.lon_ = new java.util.ArrayList<>(this.lon_);
this.bitField0_ |= 0x00000008;
}
};
@Override
public DenseNodes getDefaultInstanceForType() {
return DenseNodes.getDefaultInstance();
}
@Override
public DenseInfo getDenseinfo() {
return this.denseinfo_;
}
@Override
public long getId(final int index) {
return this.id_.get(index);
}
@Override
public int getIdCount() {
return this.id_.size();
}
@Override
public java.util.List<java.lang.Long> getIdList() {
return java.util.Collections.unmodifiableList(this.id_);
}
@Override
public int getKeysVals(final int index) {
return this.keysVals_.get(index);
}
@Override
public int getKeysValsCount() {
return this.keysVals_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysValsList() {
return java.util.Collections.unmodifiableList(this.keysVals_);
}
@Override
public long getLat(final int index) {
return this.lat_.get(index);
};
@Override
public int getLatCount() {
return this.lat_.size();
}
@Override
public java.util.List<java.lang.Long> getLatList() {
return java.util.Collections.unmodifiableList(this.lat_);
}
@Override
public long getLon(final int index) {
return this.lon_.get(index);
}
@Override
public int getLonCount() {
return this.lon_.size();
}
@Override
public java.util.List<java.lang.Long> getLonList() {
return java.util.Collections.unmodifiableList(this.lon_);
}
@Override
public boolean hasDenseinfo() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public final boolean isInitialized() {
return true;
}
private void maybeForceBuilderInitialization() {
}
public Builder mergeDenseinfo(final DenseInfo value) {
if ((this.bitField0_ & 0x00000002) == 0x00000002
&& this.denseinfo_ != DenseInfo.getDefaultInstance()) {
this.denseinfo_ = DenseInfo.newBuilder(this.denseinfo_).mergeFrom(value).buildPartial();
} else {
this.denseinfo_ = value;
}
this.bitField0_ |= 0x00000002;
return this;
};
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
ensureIdIsMutable();
this.id_.add(input.readSInt64());
break;
}
case 10: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addId(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 42: {
final DenseInfo.Builder subBuilder = DenseInfo.newBuilder();
if (hasDenseinfo()) {
subBuilder.mergeFrom(getDenseinfo());
}
input.readMessage(subBuilder, extensionRegistry);
setDenseinfo(subBuilder.buildPartial());
break;
}
case 64: {
ensureLatIsMutable();
this.lat_.add(input.readSInt64());
break;
}
case 66: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addLat(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 72: {
ensureLonIsMutable();
this.lon_.add(input.readSInt64());
break;
}
case 74: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addLon(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 80: {
ensureKeysValsIsMutable();
this.keysVals_.add(input.readInt32());
break;
}
case 82: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addKeysVals(input.readInt32());
}
input.popLimit(limit);
break;
}
}
}
}
@Override
public Builder mergeFrom(final DenseNodes other) {
if (other == DenseNodes.getDefaultInstance()) {
return this;
}
if (!other.id_.isEmpty()) {
if (this.id_.isEmpty()) {
this.id_ = other.id_;
this.bitField0_ = this.bitField0_ & ~0x00000001;
} else {
ensureIdIsMutable();
this.id_.addAll(other.id_);
}
}
if (other.hasDenseinfo()) {
mergeDenseinfo(other.getDenseinfo());
}
if (!other.lat_.isEmpty()) {
if (this.lat_.isEmpty()) {
this.lat_ = other.lat_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureLatIsMutable();
this.lat_.addAll(other.lat_);
}
}
if (!other.lon_.isEmpty()) {
if (this.lon_.isEmpty()) {
this.lon_ = other.lon_;
this.bitField0_ = this.bitField0_ & ~0x00000008;
} else {
ensureLonIsMutable();
this.lon_.addAll(other.lon_);
}
}
if (!other.keysVals_.isEmpty()) {
if (this.keysVals_.isEmpty()) {
this.keysVals_ = other.keysVals_;
this.bitField0_ = this.bitField0_ & ~0x00000010;
} else {
ensureKeysValsIsMutable();
this.keysVals_.addAll(other.keysVals_);
}
}
return this;
}
public Builder setDenseinfo(final DenseInfo value) {
if (value == null) {
throw new NullPointerException();
}
this.denseinfo_ = value;
this.bitField0_ |= 0x00000002;
return this;
}
public Builder setDenseinfo(final DenseInfo.Builder builderForValue) {
this.denseinfo_ = builderForValue.build();
this.bitField0_ |= 0x00000002;
return this;
}
public Builder setId(final int index, final long value) {
ensureIdIsMutable();
this.id_.set(index, value);
return this;
}
public Builder setKeysVals(final int index, final int value) {
ensureKeysValsIsMutable();
this.keysVals_.set(index, value);
return this;
}
public Builder setLat(final int index, final long value) {
ensureLatIsMutable();
this.lat_.set(index, value);
return this;
}
public Builder setLon(final int index, final long value) {
ensureLonIsMutable();
this.lon_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes)
}
private static final DenseNodes defaultInstance;
// optional .OSMPBF.DenseInfo denseinfo = 5;
public static final int DENSEINFO_FIELD_NUMBER = 5;
// repeated sint64 id = 1 [packed = true];
public static final int ID_FIELD_NUMBER = 1;
// repeated int32 keys_vals = 10 [packed = true];
public static final int KEYS_VALS_FIELD_NUMBER = 10;
// repeated sint64 lat = 8 [packed = true];
public static final int LAT_FIELD_NUMBER = 8;
// repeated sint64 lon = 9 [packed = true];
public static final int LON_FIELD_NUMBER = 9;
private static final long serialVersionUID = 0L;
static {
defaultInstance = new DenseNodes(true);
defaultInstance.initFields();
}
public static DenseNodes getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final DenseNodes prototype) {
return newBuilder().mergeFrom(prototype);
}
public static DenseNodes parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static DenseNodes parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static DenseNodes parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static DenseNodes parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static DenseNodes parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static DenseNodes parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static DenseNodes parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static DenseNodes parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static DenseNodes parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static DenseNodes parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private DenseInfo denseinfo_;
private java.util.List<java.lang.Long> id_;
private int idMemoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> keysVals_;
private int keysValsMemoizedSerializedSize = -1;
private java.util.List<java.lang.Long> lat_;
private int latMemoizedSerializedSize = -1;
private java.util.List<java.lang.Long> lon_;
private int lonMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private DenseNodes(final boolean noInit) {
}
// Use DenseNodes.newBuilder() to construct.
private DenseNodes(final Builder builder) {
super(builder);
}
@Override
public DenseNodes getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public DenseInfo getDenseinfo() {
return this.denseinfo_;
}
@Override
public long getId(final int index) {
return this.id_.get(index);
}
@Override
public int getIdCount() {
return this.id_.size();
}
@Override
public java.util.List<java.lang.Long> getIdList() {
return this.id_;
}
@Override
public int getKeysVals(final int index) {
return this.keysVals_.get(index);
}
@Override
public int getKeysValsCount() {
return this.keysVals_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysValsList() {
return this.keysVals_;
}
@Override
public long getLat(final int index) {
return this.lat_.get(index);
}
@Override
public int getLatCount() {
return this.lat_.size();
}
@Override
public java.util.List<java.lang.Long> getLatList() {
return this.lat_;
}
@Override
public long getLon(final int index) {
return this.lon_.get(index);
}
@Override
public int getLonCount() {
return this.lon_.size();
}
@Override
public java.util.List<java.lang.Long> getLonList() {
return this.lon_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
{
int dataSize = 0;
for (int i = 0; i < this.id_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream.computeSInt64SizeNoTag(this.id_.get(i));
}
size += dataSize;
if (!getIdList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.idMemoizedSerializedSize = dataSize;
}
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, this.denseinfo_);
}
{
int dataSize = 0;
for (int i = 0; i < this.lat_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.lat_.get(i));
}
size += dataSize;
if (!getLatList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.latMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.lon_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.lon_.get(i));
}
size += dataSize;
if (!getLonList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.lonMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.keysVals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(this.keysVals_.get(i));
}
size += dataSize;
if (!getKeysValsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.keysValsMemoizedSerializedSize = dataSize;
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public boolean hasDenseinfo() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
private void initFields() {
this.id_ = java.util.Collections.emptyList();
;
this.denseinfo_ = DenseInfo.getDefaultInstance();
this.lat_ = java.util.Collections.emptyList();
;
this.lon_ = java.util.Collections.emptyList();
;
this.keysVals_ = java.util.Collections.emptyList();
;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getIdList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(this.idMemoizedSerializedSize);
}
for (int i = 0; i < this.id_.size(); i++) {
output.writeSInt64NoTag(this.id_.get(i));
}
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeMessage(5, this.denseinfo_);
}
if (getLatList().size() > 0) {
output.writeRawVarint32(66);
output.writeRawVarint32(this.latMemoizedSerializedSize);
}
for (int i = 0; i < this.lat_.size(); i++) {
output.writeSInt64NoTag(this.lat_.get(i));
}
if (getLonList().size() > 0) {
output.writeRawVarint32(74);
output.writeRawVarint32(this.lonMemoizedSerializedSize);
}
for (int i = 0; i < this.lon_.size(); i++) {
output.writeSInt64NoTag(this.lon_.get(i));
}
if (getKeysValsList().size() > 0) {
output.writeRawVarint32(82);
output.writeRawVarint32(this.keysValsMemoizedSerializedSize);
}
for (int i = 0; i < this.keysVals_.size(); i++) {
output.writeInt32NoTag(this.keysVals_.get(i));
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes)
}
public interface DenseNodesOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
DenseInfo getDenseinfo();
long getId(int index);
int getIdCount();
// repeated sint64 id = 1 [packed = true];
java.util.List<java.lang.Long> getIdList();
int getKeysVals(int index);
int getKeysValsCount();
// repeated int32 keys_vals = 10 [packed = true];
java.util.List<java.lang.Integer> getKeysValsList();
long getLat(int index);
int getLatCount();
// repeated sint64 lat = 8 [packed = true];
java.util.List<java.lang.Long> getLatList();
long getLon(int index);
int getLonCount();
// repeated sint64 lon = 9 [packed = true];
java.util.List<java.lang.Long> getLonList();
// optional .OSMPBF.DenseInfo denseinfo = 5;
boolean hasDenseinfo();
}
public static final class HeaderBBox extends com.google.protobuf.GeneratedMessageLite
implements HeaderBBoxOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<HeaderBBox, Builder>
implements HeaderBBoxOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// required sint64 bottom = 4;
private long bottom_;
// required sint64 left = 1;
private long left_;
// required sint64 right = 2;
private long right_;
// required sint64 top = 3;
private long top_;
// Construct using HeaderBBox.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@Override
public HeaderBBox build() {
final HeaderBBox result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private HeaderBBox buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final HeaderBBox result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public HeaderBBox buildPartial() {
final HeaderBBox result = new HeaderBBox(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.left_ = this.left_;
if ((from_bitField0_ & 0x00000002) == 0x00000002) {
to_bitField0_ |= 0x00000002;
}
result.right_ = this.right_;
if ((from_bitField0_ & 0x00000004) == 0x00000004) {
to_bitField0_ |= 0x00000004;
}
result.top_ = this.top_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000008;
}
result.bottom_ = this.bottom_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.left_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.right_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.top_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.bottom_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
public Builder clearBottom() {
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.bottom_ = 0L;
return this;
}
public Builder clearLeft() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.left_ = 0L;
return this;
}
public Builder clearRight() {
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.right_ = 0L;
return this;
}
public Builder clearTop() {
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.top_ = 0L;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
@Override
public long getBottom() {
return this.bottom_;
}
@Override
public HeaderBBox getDefaultInstanceForType() {
return HeaderBBox.getDefaultInstance();
}
@Override
public long getLeft() {
return this.left_;
}
@Override
public long getRight() {
return this.right_;
}
@Override
public long getTop() {
return this.top_;
}
@Override
public boolean hasBottom() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasLeft() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasRight() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasTop() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public final boolean isInitialized() {
if (!hasLeft()) {
return false;
}
if (!hasRight()) {
return false;
}
if (!hasTop()) {
return false;
}
if (!hasBottom()) {
return false;
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.left_ = input.readSInt64();
break;
}
case 16: {
this.bitField0_ |= 0x00000002;
this.right_ = input.readSInt64();
break;
}
case 24: {
this.bitField0_ |= 0x00000004;
this.top_ = input.readSInt64();
break;
}
case 32: {
this.bitField0_ |= 0x00000008;
this.bottom_ = input.readSInt64();
break;
}
}
}
}
@Override
public Builder mergeFrom(final HeaderBBox other) {
if (other == HeaderBBox.getDefaultInstance()) {
return this;
}
if (other.hasLeft()) {
setLeft(other.getLeft());
}
if (other.hasRight()) {
setRight(other.getRight());
}
if (other.hasTop()) {
setTop(other.getTop());
}
if (other.hasBottom()) {
setBottom(other.getBottom());
}
return this;
}
public Builder setBottom(final long value) {
this.bitField0_ |= 0x00000008;
this.bottom_ = value;
return this;
}
public Builder setLeft(final long value) {
this.bitField0_ |= 0x00000001;
this.left_ = value;
return this;
}
public Builder setRight(final long value) {
this.bitField0_ |= 0x00000002;
this.right_ = value;
return this;
}
public Builder setTop(final long value) {
this.bitField0_ |= 0x00000004;
this.top_ = value;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox)
}
// required sint64 bottom = 4;
public static final int BOTTOM_FIELD_NUMBER = 4;
private static final HeaderBBox defaultInstance;
// required sint64 left = 1;
public static final int LEFT_FIELD_NUMBER = 1;
// required sint64 right = 2;
public static final int RIGHT_FIELD_NUMBER = 2;
private static final long serialVersionUID = 0L;
// required sint64 top = 3;
public static final int TOP_FIELD_NUMBER = 3;
static {
defaultInstance = new HeaderBBox(true);
defaultInstance.initFields();
}
public static HeaderBBox getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final HeaderBBox prototype) {
return newBuilder().mergeFrom(prototype);
}
public static HeaderBBox parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static HeaderBBox parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static HeaderBBox parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static HeaderBBox parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static HeaderBBox parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static HeaderBBox parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static HeaderBBox parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static HeaderBBox parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static HeaderBBox parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static HeaderBBox parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long bottom_;
private long left_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private long right_;
private long top_;
private HeaderBBox(final boolean noInit) {
}
// Use HeaderBBox.newBuilder() to construct.
private HeaderBBox(final Builder builder) {
super(builder);
}
@Override
public long getBottom() {
return this.bottom_;
}
@Override
public HeaderBBox getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public long getLeft() {
return this.left_;
}
@Override
public long getRight() {
return this.right_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(1, this.left_);
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(2, this.right_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(3, this.top_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(4, this.bottom_);
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public long getTop() {
return this.top_;
}
@Override
public boolean hasBottom() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasLeft() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasRight() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasTop() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
private void initFields() {
this.left_ = 0L;
this.right_ = 0L;
this.top_ = 0L;
this.bottom_ = 0L;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasLeft()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasRight()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasTop()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasBottom()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeSInt64(1, this.left_);
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeSInt64(2, this.right_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
output.writeSInt64(3, this.top_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
output.writeSInt64(4, this.bottom_);
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox)
}
public interface HeaderBBoxOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getBottom();
long getLeft();
long getRight();
long getTop();
// required sint64 bottom = 4;
boolean hasBottom();
// required sint64 left = 1;
boolean hasLeft();
// required sint64 right = 2;
boolean hasRight();
// required sint64 top = 3;
boolean hasTop();
}
public static final class HeaderBlock extends com.google.protobuf.GeneratedMessageLite
implements HeaderBlockOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<HeaderBlock, Builder>
implements HeaderBlockOrBuilder {
private static Builder create() {
return new Builder();
}
// optional .OSMPBF.HeaderBBox bbox = 1;
private HeaderBBox bbox_ = HeaderBBox.getDefaultInstance();
private int bitField0_;
// repeated string optional_features = 5;
private com.google.protobuf.LazyStringList optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
// optional string osmosis_replication_base_url = 34;
private java.lang.Object osmosisReplicationBaseUrl_ = "";
// optional int64 osmosis_replication_sequence_number = 33;
private long osmosisReplicationSequenceNumber_;
// optional int64 osmosis_replication_timestamp = 32;
private long osmosisReplicationTimestamp_;
// repeated string required_features = 4;
private com.google.protobuf.LazyStringList requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
// optional string source = 17;
private java.lang.Object source_ = "";
// optional string writingprogram = 16;
private java.lang.Object writingprogram_ = "";
// Construct using HeaderBlock.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllOptionalFeatures(final java.lang.Iterable<String> values) {
ensureOptionalFeaturesIsMutable();
super.addAll(values, this.optionalFeatures_);
return this;
}
public Builder addAllRequiredFeatures(final java.lang.Iterable<String> values) {
ensureRequiredFeaturesIsMutable();
super.addAll(values, this.requiredFeatures_);
return this;
}
void addOptionalFeatures(final com.google.protobuf.ByteString value) {
ensureOptionalFeaturesIsMutable();
this.optionalFeatures_.add(value);
}
public Builder addOptionalFeatures(final String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOptionalFeaturesIsMutable();
this.optionalFeatures_.add(value);
return this;
}
void addRequiredFeatures(final com.google.protobuf.ByteString value) {
ensureRequiredFeaturesIsMutable();
this.requiredFeatures_.add(value);
}
public Builder addRequiredFeatures(final String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequiredFeaturesIsMutable();
this.requiredFeatures_.add(value);
return this;
}
@Override
public HeaderBlock build() {
final HeaderBlock result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private HeaderBlock buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final HeaderBlock result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public HeaderBlock buildPartial() {
final HeaderBlock result = new HeaderBlock(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.bbox_ = this.bbox_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.requiredFeatures_ = new com.google.protobuf.UnmodifiableLazyStringList(
this.requiredFeatures_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.requiredFeatures_ = this.requiredFeatures_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.optionalFeatures_ = new com.google.protobuf.UnmodifiableLazyStringList(
this.optionalFeatures_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.optionalFeatures_ = this.optionalFeatures_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000002;
}
result.writingprogram_ = this.writingprogram_;
if ((from_bitField0_ & 0x00000010) == 0x00000010) {
to_bitField0_ |= 0x00000004;
}
result.source_ = this.source_;
if ((from_bitField0_ & 0x00000020) == 0x00000020) {
to_bitField0_ |= 0x00000008;
}
result.osmosisReplicationTimestamp_ = this.osmosisReplicationTimestamp_;
if ((from_bitField0_ & 0x00000040) == 0x00000040) {
to_bitField0_ |= 0x00000010;
}
result.osmosisReplicationSequenceNumber_ = this.osmosisReplicationSequenceNumber_;
if ((from_bitField0_ & 0x00000080) == 0x00000080) {
to_bitField0_ |= 0x00000020;
}
result.osmosisReplicationBaseUrl_ = this.osmosisReplicationBaseUrl_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.bbox_ = HeaderBBox.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.writingprogram_ = "";
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.source_ = "";
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.osmosisReplicationTimestamp_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.osmosisReplicationSequenceNumber_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000040;
this.osmosisReplicationBaseUrl_ = "";
this.bitField0_ = this.bitField0_ & ~0x00000080;
return this;
}
public Builder clearBbox() {
this.bbox_ = HeaderBBox.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearOptionalFeatures() {
this.optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
public Builder clearOsmosisReplicationBaseUrl() {
this.bitField0_ = this.bitField0_ & ~0x00000080;
this.osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
return this;
}
public Builder clearOsmosisReplicationSequenceNumber() {
this.bitField0_ = this.bitField0_ & ~0x00000040;
this.osmosisReplicationSequenceNumber_ = 0L;
return this;
}
public Builder clearOsmosisReplicationTimestamp() {
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.osmosisReplicationTimestamp_ = 0L;
return this;
}
public Builder clearRequiredFeatures() {
this.requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearSource() {
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.source_ = getDefaultInstance().getSource();
return this;
}
public Builder clearWritingprogram() {
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.writingprogram_ = getDefaultInstance().getWritingprogram();
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureOptionalFeaturesIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.optionalFeatures_ = new com.google.protobuf.LazyStringArrayList(
this.optionalFeatures_);
this.bitField0_ |= 0x00000004;
}
}
private void ensureRequiredFeaturesIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.requiredFeatures_ = new com.google.protobuf.LazyStringArrayList(
this.requiredFeatures_);
this.bitField0_ |= 0x00000002;
}
}
@Override
public HeaderBBox getBbox() {
return this.bbox_;
}
@Override
public HeaderBlock getDefaultInstanceForType() {
return HeaderBlock.getDefaultInstance();
}
@Override
public String getOptionalFeatures(final int index) {
return this.optionalFeatures_.get(index);
}
@Override
public int getOptionalFeaturesCount() {
return this.optionalFeatures_.size();
}
@Override
public java.util.List<String> getOptionalFeaturesList() {
return java.util.Collections.unmodifiableList(this.optionalFeatures_);
}
@Override
public String getOsmosisReplicationBaseUrl() {
final java.lang.Object ref = this.osmosisReplicationBaseUrl_;
if (!(ref instanceof String)) {
final String s = ((com.google.protobuf.ByteString)ref).toStringUtf8();
this.osmosisReplicationBaseUrl_ = s;
return s;
} else {
return (String)ref;
}
}
@Override
public long getOsmosisReplicationSequenceNumber() {
return this.osmosisReplicationSequenceNumber_;
}
@Override
public long getOsmosisReplicationTimestamp() {
return this.osmosisReplicationTimestamp_;
}
@Override
public String getRequiredFeatures(final int index) {
return this.requiredFeatures_.get(index);
}
@Override
public int getRequiredFeaturesCount() {
return this.requiredFeatures_.size();
}
@Override
public java.util.List<String> getRequiredFeaturesList() {
return java.util.Collections.unmodifiableList(this.requiredFeatures_);
}
@Override
public String getSource() {
final java.lang.Object ref = this.source_;
if (!(ref instanceof String)) {
final String s = ((com.google.protobuf.ByteString)ref).toStringUtf8();
this.source_ = s;
return s;
} else {
return (String)ref;
}
}
@Override
public String getWritingprogram() {
final java.lang.Object ref = this.writingprogram_;
if (!(ref instanceof String)) {
final String s = ((com.google.protobuf.ByteString)ref).toStringUtf8();
this.writingprogram_ = s;
return s;
} else {
return (String)ref;
}
}
@Override
public boolean hasBbox() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasOsmosisReplicationBaseUrl() {
return (this.bitField0_ & 0x00000080) == 0x00000080;
}
@Override
public boolean hasOsmosisReplicationSequenceNumber() {
return (this.bitField0_ & 0x00000040) == 0x00000040;
}
@Override
public boolean hasOsmosisReplicationTimestamp() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
@Override
public boolean hasSource() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasWritingprogram() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public final boolean isInitialized() {
if (hasBbox()) {
if (!getBbox().isInitialized()) {
return false;
}
}
return true;
}
private void maybeForceBuilderInitialization() {
}
public Builder mergeBbox(final HeaderBBox value) {
if ((this.bitField0_ & 0x00000001) == 0x00000001
&& this.bbox_ != HeaderBBox.getDefaultInstance()) {
this.bbox_ = HeaderBBox.newBuilder(this.bbox_).mergeFrom(value).buildPartial();
} else {
this.bbox_ = value;
}
this.bitField0_ |= 0x00000001;
return this;
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 10: {
final HeaderBBox.Builder subBuilder = HeaderBBox.newBuilder();
if (hasBbox()) {
subBuilder.mergeFrom(getBbox());
}
input.readMessage(subBuilder, extensionRegistry);
setBbox(subBuilder.buildPartial());
break;
}
case 34: {
ensureRequiredFeaturesIsMutable();
this.requiredFeatures_.add(input.readBytes());
break;
}
case 42: {
ensureOptionalFeaturesIsMutable();
this.optionalFeatures_.add(input.readBytes());
break;
}
case 130: {
this.bitField0_ |= 0x00000008;
this.writingprogram_ = input.readBytes();
break;
}
case 138: {
this.bitField0_ |= 0x00000010;
this.source_ = input.readBytes();
break;
}
case 256: {
this.bitField0_ |= 0x00000020;
this.osmosisReplicationTimestamp_ = input.readInt64();
break;
}
case 264: {
this.bitField0_ |= 0x00000040;
this.osmosisReplicationSequenceNumber_ = input.readInt64();
break;
}
case 274: {
this.bitField0_ |= 0x00000080;
this.osmosisReplicationBaseUrl_ = input.readBytes();
break;
}
}
}
}
@Override
public Builder mergeFrom(final HeaderBlock other) {
if (other == HeaderBlock.getDefaultInstance()) {
return this;
}
if (other.hasBbox()) {
mergeBbox(other.getBbox());
}
if (!other.requiredFeatures_.isEmpty()) {
if (this.requiredFeatures_.isEmpty()) {
this.requiredFeatures_ = other.requiredFeatures_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensureRequiredFeaturesIsMutable();
this.requiredFeatures_.addAll(other.requiredFeatures_);
}
}
if (!other.optionalFeatures_.isEmpty()) {
if (this.optionalFeatures_.isEmpty()) {
this.optionalFeatures_ = other.optionalFeatures_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureOptionalFeaturesIsMutable();
this.optionalFeatures_.addAll(other.optionalFeatures_);
}
}
if (other.hasWritingprogram()) {
setWritingprogram(other.getWritingprogram());
}
if (other.hasSource()) {
setSource(other.getSource());
}
if (other.hasOsmosisReplicationTimestamp()) {
setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp());
}
if (other.hasOsmosisReplicationSequenceNumber()) {
setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber());
}
if (other.hasOsmosisReplicationBaseUrl()) {
setOsmosisReplicationBaseUrl(other.getOsmosisReplicationBaseUrl());
}
return this;
}
public Builder setBbox(final HeaderBBox value) {
if (value == null) {
throw new NullPointerException();
}
this.bbox_ = value;
this.bitField0_ |= 0x00000001;
return this;
}
public Builder setBbox(final HeaderBBox.Builder builderForValue) {
this.bbox_ = builderForValue.build();
this.bitField0_ |= 0x00000001;
return this;
}
public Builder setOptionalFeatures(final int index, final String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOptionalFeaturesIsMutable();
this.optionalFeatures_.set(index, value);
return this;
}
void setOsmosisReplicationBaseUrl(final com.google.protobuf.ByteString value) {
this.bitField0_ |= 0x00000080;
this.osmosisReplicationBaseUrl_ = value;
}
public Builder setOsmosisReplicationBaseUrl(final String value) {
if (value == null) {
throw new NullPointerException();
}
this.bitField0_ |= 0x00000080;
this.osmosisReplicationBaseUrl_ = value;
return this;
}
public Builder setOsmosisReplicationSequenceNumber(final long value) {
this.bitField0_ |= 0x00000040;
this.osmosisReplicationSequenceNumber_ = value;
return this;
}
public Builder setOsmosisReplicationTimestamp(final long value) {
this.bitField0_ |= 0x00000020;
this.osmosisReplicationTimestamp_ = value;
return this;
}
public Builder setRequiredFeatures(final int index, final String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequiredFeaturesIsMutable();
this.requiredFeatures_.set(index, value);
return this;
}
void setSource(final com.google.protobuf.ByteString value) {
this.bitField0_ |= 0x00000010;
this.source_ = value;
}
public Builder setSource(final String value) {
if (value == null) {
throw new NullPointerException();
}
this.bitField0_ |= 0x00000010;
this.source_ = value;
return this;
}
void setWritingprogram(final com.google.protobuf.ByteString value) {
this.bitField0_ |= 0x00000008;
this.writingprogram_ = value;
}
public Builder setWritingprogram(final String value) {
if (value == null) {
throw new NullPointerException();
}
this.bitField0_ |= 0x00000008;
this.writingprogram_ = value;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock)
}
// optional .OSMPBF.HeaderBBox bbox = 1;
public static final int BBOX_FIELD_NUMBER = 1;
private static final HeaderBlock defaultInstance;
// repeated string optional_features = 5;
public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
// optional string osmosis_replication_base_url = 34;
public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
// optional int64 osmosis_replication_sequence_number = 33;
public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
// optional int64 osmosis_replication_timestamp = 32;
public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
// repeated string required_features = 4;
public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
private static final long serialVersionUID = 0L;
// optional string source = 17;
public static final int SOURCE_FIELD_NUMBER = 17;
// optional string writingprogram = 16;
public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
static {
defaultInstance = new HeaderBlock(true);
defaultInstance.initFields();
}
public static HeaderBlock getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final HeaderBlock prototype) {
return newBuilder().mergeFrom(prototype);
}
public static HeaderBlock parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static HeaderBlock parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static HeaderBlock parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static HeaderBlock parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static HeaderBlock parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static HeaderBlock parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static HeaderBlock parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static HeaderBlock parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static HeaderBlock parseFrom(final java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static HeaderBlock parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private HeaderBBox bbox_;
private int bitField0_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private com.google.protobuf.LazyStringList optionalFeatures_;
private java.lang.Object osmosisReplicationBaseUrl_;
private long osmosisReplicationSequenceNumber_;
private long osmosisReplicationTimestamp_;
private com.google.protobuf.LazyStringList requiredFeatures_;
private java.lang.Object source_;
private java.lang.Object writingprogram_;
private HeaderBlock(final boolean noInit) {
}
// Use HeaderBlock.newBuilder() to construct.
private HeaderBlock(final Builder builder) {
super(builder);
}
@Override
public HeaderBBox getBbox() {
return this.bbox_;
}
@Override
public HeaderBlock getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public String getOptionalFeatures(final int index) {
return this.optionalFeatures_.get(index);
}
@Override
public int getOptionalFeaturesCount() {
return this.optionalFeatures_.size();
}
@Override
public java.util.List<String> getOptionalFeaturesList() {
return this.optionalFeatures_;
}
@Override
public String getOsmosisReplicationBaseUrl() {
final java.lang.Object ref = this.osmosisReplicationBaseUrl_;
if (ref instanceof String) {
return (String)ref;
} else {
final com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString)ref;
final String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
this.osmosisReplicationBaseUrl_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getOsmosisReplicationBaseUrlBytes() {
final java.lang.Object ref = this.osmosisReplicationBaseUrl_;
if (ref instanceof String) {
final com.google.protobuf.ByteString b = com.google.protobuf.ByteString
.copyFromUtf8((String)ref);
this.osmosisReplicationBaseUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString)ref;
}
}
@Override
public long getOsmosisReplicationSequenceNumber() {
return this.osmosisReplicationSequenceNumber_;
}
@Override
public long getOsmosisReplicationTimestamp() {
return this.osmosisReplicationTimestamp_;
}
@Override
public String getRequiredFeatures(final int index) {
return this.requiredFeatures_.get(index);
}
@Override
public int getRequiredFeaturesCount() {
return this.requiredFeatures_.size();
}
@Override
public java.util.List<String> getRequiredFeaturesList() {
return this.requiredFeatures_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, this.bbox_);
}
{
int dataSize = 0;
for (int i = 0; i < this.requiredFeatures_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(this.requiredFeatures_.getByteString(i));
}
size += dataSize;
size += 1 * getRequiredFeaturesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < this.optionalFeatures_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(this.optionalFeatures_.getByteString(i));
}
size += dataSize;
size += 1 * getOptionalFeaturesList().size();
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(16,
getWritingprogramBytes());
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(17, getSourceBytes());
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(32,
this.osmosisReplicationTimestamp_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(33,
this.osmosisReplicationSequenceNumber_);
}
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(34,
getOsmosisReplicationBaseUrlBytes());
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public String getSource() {
final java.lang.Object ref = this.source_;
if (ref instanceof String) {
return (String)ref;
} else {
final com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString)ref;
final String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
this.source_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getSourceBytes() {
final java.lang.Object ref = this.source_;
if (ref instanceof String) {
final com.google.protobuf.ByteString b = com.google.protobuf.ByteString
.copyFromUtf8((String)ref);
this.source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString)ref;
}
}
@Override
public String getWritingprogram() {
final java.lang.Object ref = this.writingprogram_;
if (ref instanceof String) {
return (String)ref;
} else {
final com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString)ref;
final String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
this.writingprogram_ = s;
}
return s;
}
}
private com.google.protobuf.ByteString getWritingprogramBytes() {
final java.lang.Object ref = this.writingprogram_;
if (ref instanceof String) {
final com.google.protobuf.ByteString b = com.google.protobuf.ByteString
.copyFromUtf8((String)ref);
this.writingprogram_ = b;
return b;
} else {
return (com.google.protobuf.ByteString)ref;
}
}
@Override
public boolean hasBbox() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasOsmosisReplicationBaseUrl() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
@Override
public boolean hasOsmosisReplicationSequenceNumber() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasOsmosisReplicationTimestamp() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasSource() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasWritingprogram() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
private void initFields() {
this.bbox_ = HeaderBBox.getDefaultInstance();
this.requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
this.writingprogram_ = "";
this.source_ = "";
this.osmosisReplicationTimestamp_ = 0L;
this.osmosisReplicationSequenceNumber_ = 0L;
this.osmosisReplicationBaseUrl_ = "";
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (hasBbox()) {
if (!getBbox().isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeMessage(1, this.bbox_);
}
for (int i = 0; i < this.requiredFeatures_.size(); i++) {
output.writeBytes(4, this.requiredFeatures_.getByteString(i));
}
for (int i = 0; i < this.optionalFeatures_.size(); i++) {
output.writeBytes(5, this.optionalFeatures_.getByteString(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeBytes(16, getWritingprogramBytes());
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
output.writeBytes(17, getSourceBytes());
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
output.writeInt64(32, this.osmosisReplicationTimestamp_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
output.writeInt64(33, this.osmosisReplicationSequenceNumber_);
}
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
output.writeBytes(34, getOsmosisReplicationBaseUrlBytes());
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock)
}
public interface HeaderBlockOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
HeaderBBox getBbox();
String getOptionalFeatures(int index);
int getOptionalFeaturesCount();
// repeated string optional_features = 5;
java.util.List<String> getOptionalFeaturesList();
String getOsmosisReplicationBaseUrl();
long getOsmosisReplicationSequenceNumber();
long getOsmosisReplicationTimestamp();
String getRequiredFeatures(int index);
int getRequiredFeaturesCount();
// repeated string required_features = 4;
java.util.List<String> getRequiredFeaturesList();
String getSource();
String getWritingprogram();
// optional .OSMPBF.HeaderBBox bbox = 1;
boolean hasBbox();
// optional string osmosis_replication_base_url = 34;
boolean hasOsmosisReplicationBaseUrl();
// optional int64 osmosis_replication_sequence_number = 33;
boolean hasOsmosisReplicationSequenceNumber();
// optional int64 osmosis_replication_timestamp = 32;
boolean hasOsmosisReplicationTimestamp();
// optional string source = 17;
boolean hasSource();
// optional string writingprogram = 16;
boolean hasWritingprogram();
}
public static final class Info extends com.google.protobuf.GeneratedMessageLite
implements InfoOrBuilder {
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<Info, Builder> implements InfoOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// optional int64 changeset = 3;
private long changeset_;
// optional int64 timestamp = 2;
private long timestamp_;
// optional int32 uid = 4;
private int uid_;
// optional uint32 user_sid = 5;
private int userSid_;
// optional int32 version = 1 [default = -1];
private int version_ = -1;
// optional bool visible = 6;
private boolean visible_;
// Construct using Info.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@Override
public Info build() {
final Info result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private Info buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final Info result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public Info buildPartial() {
final Info result = new Info(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.version_ = this.version_;
if ((from_bitField0_ & 0x00000002) == 0x00000002) {
to_bitField0_ |= 0x00000002;
}
result.timestamp_ = this.timestamp_;
if ((from_bitField0_ & 0x00000004) == 0x00000004) {
to_bitField0_ |= 0x00000004;
}
result.changeset_ = this.changeset_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000008;
}
result.uid_ = this.uid_;
if ((from_bitField0_ & 0x00000010) == 0x00000010) {
to_bitField0_ |= 0x00000010;
}
result.userSid_ = this.userSid_;
if ((from_bitField0_ & 0x00000020) == 0x00000020) {
to_bitField0_ |= 0x00000020;
}
result.visible_ = this.visible_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.version_ = -1;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.timestamp_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.changeset_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.uid_ = 0;
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.userSid_ = 0;
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.visible_ = false;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
}
public Builder clearChangeset() {
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.changeset_ = 0L;
return this;
}
public Builder clearTimestamp() {
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.timestamp_ = 0L;
return this;
}
public Builder clearUid() {
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.uid_ = 0;
return this;
}
public Builder clearUserSid() {
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.userSid_ = 0;
return this;
}
public Builder clearVersion() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.version_ = -1;
return this;
}
public Builder clearVisible() {
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.visible_ = false;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
@Override
public long getChangeset() {
return this.changeset_;
}
@Override
public Info getDefaultInstanceForType() {
return Info.getDefaultInstance();
}
@Override
public long getTimestamp() {
return this.timestamp_;
}
@Override
public int getUid() {
return this.uid_;
}
@Override
public int getUserSid() {
return this.userSid_;
}
@Override
public int getVersion() {
return this.version_;
}
@Override
public boolean getVisible() {
return this.visible_;
}
@Override
public boolean hasChangeset() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasTimestamp() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasUid() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasUserSid() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasVersion() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasVisible() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
@Override
public final boolean isInitialized() {
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.version_ = input.readInt32();
break;
}
case 16: {
this.bitField0_ |= 0x00000002;
this.timestamp_ = input.readInt64();
break;
}
case 24: {
this.bitField0_ |= 0x00000004;
this.changeset_ = input.readInt64();
break;
}
case 32: {
this.bitField0_ |= 0x00000008;
this.uid_ = input.readInt32();
break;
}
case 40: {
this.bitField0_ |= 0x00000010;
this.userSid_ = input.readUInt32();
break;
}
case 48: {
this.bitField0_ |= 0x00000020;
this.visible_ = input.readBool();
break;
}
}
}
}
@Override
public Builder mergeFrom(final Info other) {
if (other == Info.getDefaultInstance()) {
return this;
}
if (other.hasVersion()) {
setVersion(other.getVersion());
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasChangeset()) {
setChangeset(other.getChangeset());
}
if (other.hasUid()) {
setUid(other.getUid());
}
if (other.hasUserSid()) {
setUserSid(other.getUserSid());
}
if (other.hasVisible()) {
setVisible(other.getVisible());
}
return this;
}
public Builder setChangeset(final long value) {
this.bitField0_ |= 0x00000004;
this.changeset_ = value;
return this;
}
public Builder setTimestamp(final long value) {
this.bitField0_ |= 0x00000002;
this.timestamp_ = value;
return this;
}
public Builder setUid(final int value) {
this.bitField0_ |= 0x00000008;
this.uid_ = value;
return this;
}
public Builder setUserSid(final int value) {
this.bitField0_ |= 0x00000010;
this.userSid_ = value;
return this;
}
public Builder setVersion(final int value) {
this.bitField0_ |= 0x00000001;
this.version_ = value;
return this;
}
public Builder setVisible(final boolean value) {
this.bitField0_ |= 0x00000020;
this.visible_ = value;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Info)
}
// optional int64 changeset = 3;
public static final int CHANGESET_FIELD_NUMBER = 3;
private static final Info defaultInstance;
private static final long serialVersionUID = 0L;
// optional int64 timestamp = 2;
public static final int TIMESTAMP_FIELD_NUMBER = 2;
// optional int32 uid = 4;
public static final int UID_FIELD_NUMBER = 4;
// optional uint32 user_sid = 5;
public static final int USER_SID_FIELD_NUMBER = 5;
// optional int32 version = 1 [default = -1];
public static final int VERSION_FIELD_NUMBER = 1;
// optional bool visible = 6;
public static final int VISIBLE_FIELD_NUMBER = 6;
static {
defaultInstance = new Info(true);
defaultInstance.initFields();
}
public static Info getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final Info prototype) {
return newBuilder().mergeFrom(prototype);
}
public static Info parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Info parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Info parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Info parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Info parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Info parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Info parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Info parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static Info parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Info parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long changeset_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private long timestamp_;
private int uid_;
private int userSid_;
private int version_;
private boolean visible_;
private Info(final boolean noInit) {
}
// Use Info.newBuilder() to construct.
private Info(final Builder builder) {
super(builder);
}
@Override
public long getChangeset() {
return this.changeset_;
}
@Override
public Info getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, this.version_);
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, this.timestamp_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, this.changeset_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, this.uid_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, this.userSid_);
}
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, this.visible_);
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public long getTimestamp() {
return this.timestamp_;
}
@Override
public int getUid() {
return this.uid_;
}
@Override
public int getUserSid() {
return this.userSid_;
}
@Override
public int getVersion() {
return this.version_;
}
@Override
public boolean getVisible() {
return this.visible_;
}
@Override
public boolean hasChangeset() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasTimestamp() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasUid() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasUserSid() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasVersion() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasVisible() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
private void initFields() {
this.version_ = -1;
this.timestamp_ = 0L;
this.changeset_ = 0L;
this.uid_ = 0;
this.userSid_ = 0;
this.visible_ = false;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeInt32(1, this.version_);
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeInt64(2, this.timestamp_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
output.writeInt64(3, this.changeset_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
output.writeInt32(4, this.uid_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
output.writeUInt32(5, this.userSid_);
}
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
output.writeBool(6, this.visible_);
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.Info)
}
public interface InfoOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getChangeset();
long getTimestamp();
int getUid();
int getUserSid();
int getVersion();
boolean getVisible();
// optional int64 changeset = 3;
boolean hasChangeset();
// optional int64 timestamp = 2;
boolean hasTimestamp();
// optional int32 uid = 4;
boolean hasUid();
// optional uint32 user_sid = 5;
boolean hasUserSid();
// optional int32 version = 1 [default = -1];
boolean hasVersion();
// optional bool visible = 6;
boolean hasVisible();
}
public static final class Node extends com.google.protobuf.GeneratedMessageLite
implements NodeOrBuilder {
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<Node, Builder> implements NodeOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// required sint64 id = 1;
private long id_;
// optional .OSMPBF.Info info = 4;
private Info info_ = Info.getDefaultInstance();
// repeated uint32 keys = 2 [packed = true];
private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
// required sint64 lat = 8;
private long lat_;
// required sint64 lon = 9;
private long lon_;
// repeated uint32 vals = 3 [packed = true];
private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
// Construct using Node.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllKeys(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureKeysIsMutable();
super.addAll(values, this.keys_);
return this;
}
public Builder addAllVals(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureValsIsMutable();
super.addAll(values, this.vals_);
return this;
}
public Builder addKeys(final int value) {
ensureKeysIsMutable();
this.keys_.add(value);
return this;
}
public Builder addVals(final int value) {
ensureValsIsMutable();
this.vals_.add(value);
return this;
}
@Override
public Node build() {
final Node result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private Node buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final Node result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public Node buildPartial() {
final Node result = new Node(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.id_ = this.id_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.keys_ = java.util.Collections.unmodifiableList(this.keys_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.keys_ = this.keys_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.vals_ = java.util.Collections.unmodifiableList(this.vals_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.vals_ = this.vals_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000002;
}
result.info_ = this.info_;
if ((from_bitField0_ & 0x00000010) == 0x00000010) {
to_bitField0_ |= 0x00000004;
}
result.lat_ = this.lat_;
if ((from_bitField0_ & 0x00000020) == 0x00000020) {
to_bitField0_ |= 0x00000008;
}
result.lon_ = this.lon_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.id_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.lat_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.lon_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
}
public Builder clearId() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.id_ = 0L;
return this;
}
public Builder clearInfo() {
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
};
public Builder clearKeys() {
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearLat() {
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.lat_ = 0L;
return this;
}
public Builder clearLon() {
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.lon_ = 0L;
return this;
}
public Builder clearVals() {
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureKeysIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.keys_ = new java.util.ArrayList<>(this.keys_);
this.bitField0_ |= 0x00000002;
}
}
private void ensureValsIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.vals_ = new java.util.ArrayList<>(this.vals_);
this.bitField0_ |= 0x00000004;
}
}
@Override
public Node getDefaultInstanceForType() {
return Node.getDefaultInstance();
}
@Override
public long getId() {
return this.id_;
};
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return java.util.Collections.unmodifiableList(this.keys_);
}
@Override
public long getLat() {
return this.lat_;
}
@Override
public long getLon() {
return this.lon_;
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
}
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return java.util.Collections.unmodifiableList(this.vals_);
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasLat() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasLon() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
@Override
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
if (!hasLat()) {
return false;
}
if (!hasLon()) {
return false;
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.id_ = input.readSInt64();
break;
}
case 16: {
ensureKeysIsMutable();
this.keys_.add(input.readUInt32());
break;
}
case 18: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addKeys(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 24: {
ensureValsIsMutable();
this.vals_.add(input.readUInt32());
break;
}
case 26: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addVals(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 34: {
final Info.Builder subBuilder = Info.newBuilder();
if (hasInfo()) {
subBuilder.mergeFrom(getInfo());
}
input.readMessage(subBuilder, extensionRegistry);
setInfo(subBuilder.buildPartial());
break;
}
case 64: {
this.bitField0_ |= 0x00000010;
this.lat_ = input.readSInt64();
break;
}
case 72: {
this.bitField0_ |= 0x00000020;
this.lon_ = input.readSInt64();
break;
}
}
}
}
@Override
public Builder mergeFrom(final Node other) {
if (other == Node.getDefaultInstance()) {
return this;
}
if (other.hasId()) {
setId(other.getId());
}
if (!other.keys_.isEmpty()) {
if (this.keys_.isEmpty()) {
this.keys_ = other.keys_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensureKeysIsMutable();
this.keys_.addAll(other.keys_);
}
}
if (!other.vals_.isEmpty()) {
if (this.vals_.isEmpty()) {
this.vals_ = other.vals_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureValsIsMutable();
this.vals_.addAll(other.vals_);
}
}
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (other.hasLat()) {
setLat(other.getLat());
}
if (other.hasLon()) {
setLon(other.getLon());
}
return this;
}
public Builder mergeInfo(final Info value) {
if ((this.bitField0_ & 0x00000008) == 0x00000008
&& this.info_ != Info.getDefaultInstance()) {
this.info_ = Info.newBuilder(this.info_).mergeFrom(value).buildPartial();
} else {
this.info_ = value;
}
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setId(final long value) {
this.bitField0_ |= 0x00000001;
this.id_ = value;
return this;
}
public Builder setInfo(final Info value) {
if (value == null) {
throw new NullPointerException();
}
this.info_ = value;
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setInfo(final Info.Builder builderForValue) {
this.info_ = builderForValue.build();
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setKeys(final int index, final int value) {
ensureKeysIsMutable();
this.keys_.set(index, value);
return this;
}
public Builder setLat(final long value) {
this.bitField0_ |= 0x00000010;
this.lat_ = value;
return this;
}
public Builder setLon(final long value) {
this.bitField0_ |= 0x00000020;
this.lon_ = value;
return this;
}
public Builder setVals(final int index, final int value) {
ensureValsIsMutable();
this.vals_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Node)
}
private static final Node defaultInstance;
// required sint64 id = 1;
public static final int ID_FIELD_NUMBER = 1;
// optional .OSMPBF.Info info = 4;
public static final int INFO_FIELD_NUMBER = 4;
// repeated uint32 keys = 2 [packed = true];
public static final int KEYS_FIELD_NUMBER = 2;
// required sint64 lat = 8;
public static final int LAT_FIELD_NUMBER = 8;
// required sint64 lon = 9;
public static final int LON_FIELD_NUMBER = 9;
private static final long serialVersionUID = 0L;
// repeated uint32 vals = 3 [packed = true];
public static final int VALS_FIELD_NUMBER = 3;
static {
defaultInstance = new Node(true);
defaultInstance.initFields();
}
public static Node getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final Node prototype) {
return newBuilder().mergeFrom(prototype);
}
public static Node parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Node parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Node parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Node parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Node parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Node parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Node parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Node parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static Node parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Node parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long id_;
private Info info_;
private java.util.List<java.lang.Integer> keys_;
private int keysMemoizedSerializedSize = -1;
private long lat_;
private long lon_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> vals_;
private int valsMemoizedSerializedSize = -1;
private Node(final boolean noInit) {
}
// Use Node.newBuilder() to construct.
private Node(final Builder builder) {
super(builder);
}
@Override
public Node getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public long getId() {
return this.id_;
}
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return this.keys_;
}
@Override
public long getLat() {
return this.lat_;
}
@Override
public long getLon() {
return this.lon_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(1, this.id_);
}
{
int dataSize = 0;
for (int i = 0; i < this.keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.keys_.get(i));
}
size += dataSize;
if (!getKeysList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.keysMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.vals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.vals_.get(i));
}
size += dataSize;
if (!getValsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.valsMemoizedSerializedSize = dataSize;
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, this.info_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(8, this.lat_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
size += com.google.protobuf.CodedOutputStream.computeSInt64Size(9, this.lon_);
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
}
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return this.vals_;
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasLat() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasLon() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
private void initFields() {
this.id_ = 0L;
this.keys_ = java.util.Collections.emptyList();
;
this.vals_ = java.util.Collections.emptyList();
;
this.info_ = Info.getDefaultInstance();
this.lat_ = 0L;
this.lon_ = 0L;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasId()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasLat()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasLon()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeSInt64(1, this.id_);
}
if (getKeysList().size() > 0) {
output.writeRawVarint32(18);
output.writeRawVarint32(this.keysMemoizedSerializedSize);
}
for (int i = 0; i < this.keys_.size(); i++) {
output.writeUInt32NoTag(this.keys_.get(i));
}
if (getValsList().size() > 0) {
output.writeRawVarint32(26);
output.writeRawVarint32(this.valsMemoizedSerializedSize);
}
for (int i = 0; i < this.vals_.size(); i++) {
output.writeUInt32NoTag(this.vals_.get(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeMessage(4, this.info_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
output.writeSInt64(8, this.lat_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
output.writeSInt64(9, this.lon_);
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.Node)
}
public interface NodeOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getId();
Info getInfo();
int getKeys(int index);
int getKeysCount();
// repeated uint32 keys = 2 [packed = true];
java.util.List<java.lang.Integer> getKeysList();
long getLat();
long getLon();
int getVals(int index);
int getValsCount();
// repeated uint32 vals = 3 [packed = true];
java.util.List<java.lang.Integer> getValsList();
// required sint64 id = 1;
boolean hasId();
// optional .OSMPBF.Info info = 4;
boolean hasInfo();
// required sint64 lat = 8;
boolean hasLat();
// required sint64 lon = 9;
boolean hasLon();
}
public static final class PrimitiveBlock extends com.google.protobuf.GeneratedMessageLite
implements PrimitiveBlockOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<PrimitiveBlock, Builder>
implements PrimitiveBlockOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// optional int32 date_granularity = 18 [default = 1000];
private int dateGranularity_ = 1000;
// optional int32 granularity = 17 [default = 100];
private int granularity_ = 100;
// optional int64 lat_offset = 19 [default = 0];
private long latOffset_;
// optional int64 lon_offset = 20 [default = 0];
private long lonOffset_;
// repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
private java.util.List<PrimitiveGroup> primitivegroup_ = java.util.Collections.emptyList();
// required .OSMPBF.StringTable stringtable = 1;
private StringTable stringtable_ = StringTable.getDefaultInstance();
// Construct using PrimitiveBlock.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllPrimitivegroup(
final java.lang.Iterable<? extends PrimitiveGroup> values) {
ensurePrimitivegroupIsMutable();
super.addAll(values, this.primitivegroup_);
return this;
}
public Builder addPrimitivegroup(final int index, final PrimitiveGroup value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrimitivegroupIsMutable();
this.primitivegroup_.add(index, value);
return this;
}
public Builder addPrimitivegroup(final int index,
final PrimitiveGroup.Builder builderForValue) {
ensurePrimitivegroupIsMutable();
this.primitivegroup_.add(index, builderForValue.build());
return this;
}
public Builder addPrimitivegroup(final PrimitiveGroup value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrimitivegroupIsMutable();
this.primitivegroup_.add(value);
return this;
}
public Builder addPrimitivegroup(final PrimitiveGroup.Builder builderForValue) {
ensurePrimitivegroupIsMutable();
this.primitivegroup_.add(builderForValue.build());
return this;
}
@Override
public PrimitiveBlock build() {
final PrimitiveBlock result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private PrimitiveBlock buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
final PrimitiveBlock result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public PrimitiveBlock buildPartial() {
final PrimitiveBlock result = new PrimitiveBlock(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.stringtable_ = this.stringtable_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.primitivegroup_ = java.util.Collections.unmodifiableList(this.primitivegroup_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.primitivegroup_ = this.primitivegroup_;
if ((from_bitField0_ & 0x00000004) == 0x00000004) {
to_bitField0_ |= 0x00000002;
}
result.granularity_ = this.granularity_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000004;
}
result.latOffset_ = this.latOffset_;
if ((from_bitField0_ & 0x00000010) == 0x00000010) {
to_bitField0_ |= 0x00000008;
}
result.lonOffset_ = this.lonOffset_;
if ((from_bitField0_ & 0x00000020) == 0x00000020) {
to_bitField0_ |= 0x00000010;
}
result.dateGranularity_ = this.dateGranularity_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.stringtable_ = StringTable.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.primitivegroup_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.granularity_ = 100;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.latOffset_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.lonOffset_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.dateGranularity_ = 1000;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
}
public Builder clearDateGranularity() {
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.dateGranularity_ = 1000;
return this;
}
public Builder clearGranularity() {
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.granularity_ = 100;
return this;
}
public Builder clearLatOffset() {
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.latOffset_ = 0L;
return this;
}
public Builder clearLonOffset() {
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.lonOffset_ = 0L;
return this;
}
public Builder clearPrimitivegroup() {
this.primitivegroup_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearStringtable() {
this.stringtable_ = StringTable.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensurePrimitivegroupIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.primitivegroup_ = new java.util.ArrayList<>(this.primitivegroup_);
this.bitField0_ |= 0x00000002;
}
}
@Override
public int getDateGranularity() {
return this.dateGranularity_;
}
@Override
public PrimitiveBlock getDefaultInstanceForType() {
return PrimitiveBlock.getDefaultInstance();
}
@Override
public int getGranularity() {
return this.granularity_;
}
@Override
public long getLatOffset() {
return this.latOffset_;
}
@Override
public long getLonOffset() {
return this.lonOffset_;
}
@Override
public PrimitiveGroup getPrimitivegroup(final int index) {
return this.primitivegroup_.get(index);
}
@Override
public int getPrimitivegroupCount() {
return this.primitivegroup_.size();
}
@Override
public java.util.List<PrimitiveGroup> getPrimitivegroupList() {
return java.util.Collections.unmodifiableList(this.primitivegroup_);
}
@Override
public StringTable getStringtable() {
return this.stringtable_;
}
@Override
public boolean hasDateGranularity() {
return (this.bitField0_ & 0x00000020) == 0x00000020;
}
@Override
public boolean hasGranularity() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasLatOffset() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasLonOffset() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasStringtable() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public final boolean isInitialized() {
if (!hasStringtable()) {
return false;
}
for (int i = 0; i < getPrimitivegroupCount(); i++) {
if (!getPrimitivegroup(i).isInitialized()) {
return false;
}
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 10: {
final StringTable.Builder subBuilder = StringTable.newBuilder();
if (hasStringtable()) {
subBuilder.mergeFrom(getStringtable());
}
input.readMessage(subBuilder, extensionRegistry);
setStringtable(subBuilder.buildPartial());
break;
}
case 18: {
final PrimitiveGroup.Builder subBuilder = PrimitiveGroup.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addPrimitivegroup(subBuilder.buildPartial());
break;
}
case 136: {
this.bitField0_ |= 0x00000004;
this.granularity_ = input.readInt32();
break;
}
case 144: {
this.bitField0_ |= 0x00000020;
this.dateGranularity_ = input.readInt32();
break;
}
case 152: {
this.bitField0_ |= 0x00000008;
this.latOffset_ = input.readInt64();
break;
}
case 160: {
this.bitField0_ |= 0x00000010;
this.lonOffset_ = input.readInt64();
break;
}
}
}
}
@Override
public Builder mergeFrom(final PrimitiveBlock other) {
if (other == PrimitiveBlock.getDefaultInstance()) {
return this;
}
if (other.hasStringtable()) {
mergeStringtable(other.getStringtable());
}
if (!other.primitivegroup_.isEmpty()) {
if (this.primitivegroup_.isEmpty()) {
this.primitivegroup_ = other.primitivegroup_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensurePrimitivegroupIsMutable();
this.primitivegroup_.addAll(other.primitivegroup_);
}
}
if (other.hasGranularity()) {
setGranularity(other.getGranularity());
}
if (other.hasLatOffset()) {
setLatOffset(other.getLatOffset());
}
if (other.hasLonOffset()) {
setLonOffset(other.getLonOffset());
}
if (other.hasDateGranularity()) {
setDateGranularity(other.getDateGranularity());
}
return this;
}
public Builder mergeStringtable(final StringTable value) {
if ((this.bitField0_ & 0x00000001) == 0x00000001
&& this.stringtable_ != StringTable.getDefaultInstance()) {
this.stringtable_ = StringTable.newBuilder(this.stringtable_)
.mergeFrom(value)
.buildPartial();
} else {
this.stringtable_ = value;
}
this.bitField0_ |= 0x00000001;
return this;
}
public Builder removePrimitivegroup(final int index) {
ensurePrimitivegroupIsMutable();
this.primitivegroup_.remove(index);
return this;
}
public Builder setDateGranularity(final int value) {
this.bitField0_ |= 0x00000020;
this.dateGranularity_ = value;
return this;
}
public Builder setGranularity(final int value) {
this.bitField0_ |= 0x00000004;
this.granularity_ = value;
return this;
}
public Builder setLatOffset(final long value) {
this.bitField0_ |= 0x00000008;
this.latOffset_ = value;
return this;
}
public Builder setLonOffset(final long value) {
this.bitField0_ |= 0x00000010;
this.lonOffset_ = value;
return this;
}
public Builder setPrimitivegroup(final int index, final PrimitiveGroup value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrimitivegroupIsMutable();
this.primitivegroup_.set(index, value);
return this;
}
public Builder setPrimitivegroup(final int index,
final PrimitiveGroup.Builder builderForValue) {
ensurePrimitivegroupIsMutable();
this.primitivegroup_.set(index, builderForValue.build());
return this;
}
public Builder setStringtable(final StringTable value) {
if (value == null) {
throw new NullPointerException();
}
this.stringtable_ = value;
this.bitField0_ |= 0x00000001;
return this;
}
public Builder setStringtable(final StringTable.Builder builderForValue) {
this.stringtable_ = builderForValue.build();
this.bitField0_ |= 0x00000001;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock)
}
// optional int32 date_granularity = 18 [default = 1000];
public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
private static final PrimitiveBlock defaultInstance;
// optional int32 granularity = 17 [default = 100];
public static final int GRANULARITY_FIELD_NUMBER = 17;
// optional int64 lat_offset = 19 [default = 0];
public static final int LAT_OFFSET_FIELD_NUMBER = 19;
// optional int64 lon_offset = 20 [default = 0];
public static final int LON_OFFSET_FIELD_NUMBER = 20;
// repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
private static final long serialVersionUID = 0L;
// required .OSMPBF.StringTable stringtable = 1;
public static final int STRINGTABLE_FIELD_NUMBER = 1;
static {
defaultInstance = new PrimitiveBlock(true);
defaultInstance.initFields();
}
public static PrimitiveBlock getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final PrimitiveBlock prototype) {
return newBuilder().mergeFrom(prototype);
}
public static PrimitiveBlock parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static PrimitiveBlock parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static PrimitiveBlock parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static PrimitiveBlock parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static PrimitiveBlock parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static PrimitiveBlock parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static PrimitiveBlock parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static PrimitiveBlock parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static PrimitiveBlock parseFrom(final java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static PrimitiveBlock parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private int dateGranularity_;
private int granularity_;
private long latOffset_;
private long lonOffset_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<PrimitiveGroup> primitivegroup_;
private StringTable stringtable_;
private PrimitiveBlock(final boolean noInit) {
}
// Use PrimitiveBlock.newBuilder() to construct.
private PrimitiveBlock(final Builder builder) {
super(builder);
}
@Override
public int getDateGranularity() {
return this.dateGranularity_;
}
@Override
public PrimitiveBlock getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public int getGranularity() {
return this.granularity_;
}
@Override
public long getLatOffset() {
return this.latOffset_;
}
@Override
public long getLonOffset() {
return this.lonOffset_;
}
@Override
public PrimitiveGroup getPrimitivegroup(final int index) {
return this.primitivegroup_.get(index);
}
@Override
public int getPrimitivegroupCount() {
return this.primitivegroup_.size();
}
@Override
public java.util.List<PrimitiveGroup> getPrimitivegroupList() {
return this.primitivegroup_;
}
public PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(final int index) {
return this.primitivegroup_.get(index);
}
public java.util.List<? extends PrimitiveGroupOrBuilder> getPrimitivegroupOrBuilderList() {
return this.primitivegroup_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, this.stringtable_);
}
for (int i = 0; i < this.primitivegroup_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2,
this.primitivegroup_.get(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(17, this.granularity_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(18, this.dateGranularity_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, this.latOffset_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(20, this.lonOffset_);
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public StringTable getStringtable() {
return this.stringtable_;
}
@Override
public boolean hasDateGranularity() {
return (this.bitField0_ & 0x00000010) == 0x00000010;
}
@Override
public boolean hasGranularity() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public boolean hasLatOffset() {
return (this.bitField0_ & 0x00000004) == 0x00000004;
}
@Override
public boolean hasLonOffset() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public boolean hasStringtable() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
private void initFields() {
this.stringtable_ = StringTable.getDefaultInstance();
this.primitivegroup_ = java.util.Collections.emptyList();
this.granularity_ = 100;
this.latOffset_ = 0L;
this.lonOffset_ = 0L;
this.dateGranularity_ = 1000;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasStringtable()) {
this.memoizedIsInitialized = 0;
return false;
}
for (int i = 0; i < getPrimitivegroupCount(); i++) {
if (!getPrimitivegroup(i).isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeMessage(1, this.stringtable_);
}
for (int i = 0; i < this.primitivegroup_.size(); i++) {
output.writeMessage(2, this.primitivegroup_.get(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeInt32(17, this.granularity_);
}
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
output.writeInt32(18, this.dateGranularity_);
}
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
output.writeInt64(19, this.latOffset_);
}
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
output.writeInt64(20, this.lonOffset_);
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock)
}
public interface PrimitiveBlockOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
int getDateGranularity();
int getGranularity();
long getLatOffset();
long getLonOffset();
PrimitiveGroup getPrimitivegroup(int index);
int getPrimitivegroupCount();
// repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
java.util.List<PrimitiveGroup> getPrimitivegroupList();
StringTable getStringtable();
// optional int32 date_granularity = 18 [default = 1000];
boolean hasDateGranularity();
// optional int32 granularity = 17 [default = 100];
boolean hasGranularity();
// optional int64 lat_offset = 19 [default = 0];
boolean hasLatOffset();
// optional int64 lon_offset = 20 [default = 0];
boolean hasLonOffset();
// required .OSMPBF.StringTable stringtable = 1;
boolean hasStringtable();
}
public static final class PrimitiveGroup extends com.google.protobuf.GeneratedMessageLite
implements PrimitiveGroupOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<PrimitiveGroup, Builder>
implements PrimitiveGroupOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// repeated .OSMPBF.ChangeSet changesets = 5;
private java.util.List<ChangeSet> changesets_ = java.util.Collections.emptyList();
// optional .OSMPBF.DenseNodes dense = 2;
private DenseNodes dense_ = DenseNodes.getDefaultInstance();
// repeated .OSMPBF.Node nodes = 1;
private java.util.List<Node> nodes_ = java.util.Collections.emptyList();
// repeated .OSMPBF.Relation relations = 4;
private java.util.List<Relation> relations_ = java.util.Collections.emptyList();
// repeated .OSMPBF.Way ways = 3;
private java.util.List<Way> ways_ = java.util.Collections.emptyList();
// Construct using PrimitiveGroup.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllChangesets(final java.lang.Iterable<? extends ChangeSet> values) {
ensureChangesetsIsMutable();
super.addAll(values, this.changesets_);
return this;
}
public Builder addAllNodes(final java.lang.Iterable<? extends Node> values) {
ensureNodesIsMutable();
super.addAll(values, this.nodes_);
return this;
}
public Builder addAllRelations(final java.lang.Iterable<? extends Relation> values) {
ensureRelationsIsMutable();
super.addAll(values, this.relations_);
return this;
}
public Builder addAllWays(final java.lang.Iterable<? extends Way> values) {
ensureWaysIsMutable();
super.addAll(values, this.ways_);
return this;
}
public Builder addChangesets(final ChangeSet value) {
if (value == null) {
throw new NullPointerException();
}
ensureChangesetsIsMutable();
this.changesets_.add(value);
return this;
}
public Builder addChangesets(final ChangeSet.Builder builderForValue) {
ensureChangesetsIsMutable();
this.changesets_.add(builderForValue.build());
return this;
}
public Builder addChangesets(final int index, final ChangeSet value) {
if (value == null) {
throw new NullPointerException();
}
ensureChangesetsIsMutable();
this.changesets_.add(index, value);
return this;
}
public Builder addChangesets(final int index, final ChangeSet.Builder builderForValue) {
ensureChangesetsIsMutable();
this.changesets_.add(index, builderForValue.build());
return this;
}
public Builder addNodes(final int index, final Node value) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
this.nodes_.add(index, value);
return this;
}
public Builder addNodes(final int index, final Node.Builder builderForValue) {
ensureNodesIsMutable();
this.nodes_.add(index, builderForValue.build());
return this;
}
public Builder addNodes(final Node value) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
this.nodes_.add(value);
return this;
}
public Builder addNodes(final Node.Builder builderForValue) {
ensureNodesIsMutable();
this.nodes_.add(builderForValue.build());
return this;
}
public Builder addRelations(final int index, final Relation value) {
if (value == null) {
throw new NullPointerException();
}
ensureRelationsIsMutable();
this.relations_.add(index, value);
return this;
}
public Builder addRelations(final int index, final Relation.Builder builderForValue) {
ensureRelationsIsMutable();
this.relations_.add(index, builderForValue.build());
return this;
}
public Builder addRelations(final Relation value) {
if (value == null) {
throw new NullPointerException();
}
ensureRelationsIsMutable();
this.relations_.add(value);
return this;
}
public Builder addRelations(final Relation.Builder builderForValue) {
ensureRelationsIsMutable();
this.relations_.add(builderForValue.build());
return this;
}
public Builder addWays(final int index, final Way value) {
if (value == null) {
throw new NullPointerException();
}
ensureWaysIsMutable();
this.ways_.add(index, value);
return this;
}
public Builder addWays(final int index, final Way.Builder builderForValue) {
ensureWaysIsMutable();
this.ways_.add(index, builderForValue.build());
return this;
}
public Builder addWays(final Way value) {
if (value == null) {
throw new NullPointerException();
}
ensureWaysIsMutable();
this.ways_.add(value);
return this;
}
public Builder addWays(final Way.Builder builderForValue) {
ensureWaysIsMutable();
this.ways_.add(builderForValue.build());
return this;
}
@Override
public PrimitiveGroup build() {
final PrimitiveGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private PrimitiveGroup buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
final PrimitiveGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public PrimitiveGroup buildPartial() {
final PrimitiveGroup result = new PrimitiveGroup(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
this.nodes_ = java.util.Collections.unmodifiableList(this.nodes_);
this.bitField0_ = this.bitField0_ & ~0x00000001;
}
result.nodes_ = this.nodes_;
if ((from_bitField0_ & 0x00000002) == 0x00000002) {
to_bitField0_ |= 0x00000001;
}
result.dense_ = this.dense_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.ways_ = java.util.Collections.unmodifiableList(this.ways_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.ways_ = this.ways_;
if ((this.bitField0_ & 0x00000008) == 0x00000008) {
this.relations_ = java.util.Collections.unmodifiableList(this.relations_);
this.bitField0_ = this.bitField0_ & ~0x00000008;
}
result.relations_ = this.relations_;
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
this.changesets_ = java.util.Collections.unmodifiableList(this.changesets_);
this.bitField0_ = this.bitField0_ & ~0x00000010;
}
result.changesets_ = this.changesets_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.nodes_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.dense_ = DenseNodes.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.ways_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.relations_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.changesets_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearChangesets() {
this.changesets_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearDense() {
this.dense_ = DenseNodes.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearNodes() {
this.nodes_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearRelations() {
this.relations_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
public Builder clearWays() {
this.ways_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureChangesetsIsMutable() {
if (!((this.bitField0_ & 0x00000010) == 0x00000010)) {
this.changesets_ = new java.util.ArrayList<>(this.changesets_);
this.bitField0_ |= 0x00000010;
}
}
private void ensureNodesIsMutable() {
if (!((this.bitField0_ & 0x00000001) == 0x00000001)) {
this.nodes_ = new java.util.ArrayList<>(this.nodes_);
this.bitField0_ |= 0x00000001;
}
}
private void ensureRelationsIsMutable() {
if (!((this.bitField0_ & 0x00000008) == 0x00000008)) {
this.relations_ = new java.util.ArrayList<>(this.relations_);
this.bitField0_ |= 0x00000008;
}
}
private void ensureWaysIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.ways_ = new java.util.ArrayList<>(this.ways_);
this.bitField0_ |= 0x00000004;
}
}
@Override
public ChangeSet getChangesets(final int index) {
return this.changesets_.get(index);
}
@Override
public int getChangesetsCount() {
return this.changesets_.size();
}
@Override
public java.util.List<ChangeSet> getChangesetsList() {
return java.util.Collections.unmodifiableList(this.changesets_);
}
@Override
public PrimitiveGroup getDefaultInstanceForType() {
return PrimitiveGroup.getDefaultInstance();
}
@Override
public DenseNodes getDense() {
return this.dense_;
}
@Override
public Node getNodes(final int index) {
return this.nodes_.get(index);
}
@Override
public int getNodesCount() {
return this.nodes_.size();
}
@Override
public java.util.List<Node> getNodesList() {
return java.util.Collections.unmodifiableList(this.nodes_);
}
@Override
public Relation getRelations(final int index) {
return this.relations_.get(index);
}
@Override
public int getRelationsCount() {
return this.relations_.size();
}
@Override
public java.util.List<Relation> getRelationsList() {
return java.util.Collections.unmodifiableList(this.relations_);
}
@Override
public Way getWays(final int index) {
return this.ways_.get(index);
}
@Override
public int getWaysCount() {
return this.ways_.size();
}
@Override
public java.util.List<Way> getWaysList() {
return java.util.Collections.unmodifiableList(this.ways_);
}
@Override
public boolean hasDense() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
@Override
public final boolean isInitialized() {
for (int i = 0; i < getNodesCount(); i++) {
if (!getNodes(i).isInitialized()) {
return false;
}
}
for (int i = 0; i < getWaysCount(); i++) {
if (!getWays(i).isInitialized()) {
return false;
}
}
for (int i = 0; i < getRelationsCount(); i++) {
if (!getRelations(i).isInitialized()) {
return false;
}
}
for (int i = 0; i < getChangesetsCount(); i++) {
if (!getChangesets(i).isInitialized()) {
return false;
}
}
return true;
}
private void maybeForceBuilderInitialization() {
}
public Builder mergeDense(final DenseNodes value) {
if ((this.bitField0_ & 0x00000002) == 0x00000002
&& this.dense_ != DenseNodes.getDefaultInstance()) {
this.dense_ = DenseNodes.newBuilder(this.dense_).mergeFrom(value).buildPartial();
} else {
this.dense_ = value;
}
this.bitField0_ |= 0x00000002;
return this;
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 10: {
final Node.Builder subBuilder = Node.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addNodes(subBuilder.buildPartial());
break;
}
case 18: {
final DenseNodes.Builder subBuilder = DenseNodes.newBuilder();
if (hasDense()) {
subBuilder.mergeFrom(getDense());
}
input.readMessage(subBuilder, extensionRegistry);
setDense(subBuilder.buildPartial());
break;
}
case 26: {
final Way.Builder subBuilder = Way.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addWays(subBuilder.buildPartial());
break;
}
case 34: {
final Relation.Builder subBuilder = Relation.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addRelations(subBuilder.buildPartial());
break;
}
case 42: {
final ChangeSet.Builder subBuilder = ChangeSet.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addChangesets(subBuilder.buildPartial());
break;
}
}
}
}
@Override
public Builder mergeFrom(final PrimitiveGroup other) {
if (other == PrimitiveGroup.getDefaultInstance()) {
return this;
}
if (!other.nodes_.isEmpty()) {
if (this.nodes_.isEmpty()) {
this.nodes_ = other.nodes_;
this.bitField0_ = this.bitField0_ & ~0x00000001;
} else {
ensureNodesIsMutable();
this.nodes_.addAll(other.nodes_);
}
}
if (other.hasDense()) {
mergeDense(other.getDense());
}
if (!other.ways_.isEmpty()) {
if (this.ways_.isEmpty()) {
this.ways_ = other.ways_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureWaysIsMutable();
this.ways_.addAll(other.ways_);
}
}
if (!other.relations_.isEmpty()) {
if (this.relations_.isEmpty()) {
this.relations_ = other.relations_;
this.bitField0_ = this.bitField0_ & ~0x00000008;
} else {
ensureRelationsIsMutable();
this.relations_.addAll(other.relations_);
}
}
if (!other.changesets_.isEmpty()) {
if (this.changesets_.isEmpty()) {
this.changesets_ = other.changesets_;
this.bitField0_ = this.bitField0_ & ~0x00000010;
} else {
ensureChangesetsIsMutable();
this.changesets_.addAll(other.changesets_);
}
}
return this;
}
public Builder removeChangesets(final int index) {
ensureChangesetsIsMutable();
this.changesets_.remove(index);
return this;
}
public Builder removeNodes(final int index) {
ensureNodesIsMutable();
this.nodes_.remove(index);
return this;
}
public Builder removeRelations(final int index) {
ensureRelationsIsMutable();
this.relations_.remove(index);
return this;
}
public Builder removeWays(final int index) {
ensureWaysIsMutable();
this.ways_.remove(index);
return this;
}
public Builder setChangesets(final int index, final ChangeSet value) {
if (value == null) {
throw new NullPointerException();
}
ensureChangesetsIsMutable();
this.changesets_.set(index, value);
return this;
}
public Builder setChangesets(final int index, final ChangeSet.Builder builderForValue) {
ensureChangesetsIsMutable();
this.changesets_.set(index, builderForValue.build());
return this;
}
public Builder setDense(final DenseNodes value) {
if (value == null) {
throw new NullPointerException();
}
this.dense_ = value;
this.bitField0_ |= 0x00000002;
return this;
}
public Builder setDense(final DenseNodes.Builder builderForValue) {
this.dense_ = builderForValue.build();
this.bitField0_ |= 0x00000002;
return this;
}
public Builder setNodes(final int index, final Node value) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
this.nodes_.set(index, value);
return this;
}
public Builder setNodes(final int index, final Node.Builder builderForValue) {
ensureNodesIsMutable();
this.nodes_.set(index, builderForValue.build());
return this;
}
public Builder setRelations(final int index, final Relation value) {
if (value == null) {
throw new NullPointerException();
}
ensureRelationsIsMutable();
this.relations_.set(index, value);
return this;
}
public Builder setRelations(final int index, final Relation.Builder builderForValue) {
ensureRelationsIsMutable();
this.relations_.set(index, builderForValue.build());
return this;
}
public Builder setWays(final int index, final Way value) {
if (value == null) {
throw new NullPointerException();
}
ensureWaysIsMutable();
this.ways_.set(index, value);
return this;
}
public Builder setWays(final int index, final Way.Builder builderForValue) {
ensureWaysIsMutable();
this.ways_.set(index, builderForValue.build());
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup)
}
// repeated .OSMPBF.ChangeSet changesets = 5;
public static final int CHANGESETS_FIELD_NUMBER = 5;
private static final PrimitiveGroup defaultInstance;
// optional .OSMPBF.DenseNodes dense = 2;
public static final int DENSE_FIELD_NUMBER = 2;
// repeated .OSMPBF.Node nodes = 1;
public static final int NODES_FIELD_NUMBER = 1;
// repeated .OSMPBF.Relation relations = 4;
public static final int RELATIONS_FIELD_NUMBER = 4;
private static final long serialVersionUID = 0L;
// repeated .OSMPBF.Way ways = 3;
public static final int WAYS_FIELD_NUMBER = 3;
static {
defaultInstance = new PrimitiveGroup(true);
defaultInstance.initFields();
}
public static PrimitiveGroup getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final PrimitiveGroup prototype) {
return newBuilder().mergeFrom(prototype);
}
public static PrimitiveGroup parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static PrimitiveGroup parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static PrimitiveGroup parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static PrimitiveGroup parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static PrimitiveGroup parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static PrimitiveGroup parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static PrimitiveGroup parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static PrimitiveGroup parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static PrimitiveGroup parseFrom(final java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static PrimitiveGroup parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private java.util.List<ChangeSet> changesets_;
private DenseNodes dense_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<Node> nodes_;
private java.util.List<Relation> relations_;
private java.util.List<Way> ways_;
private PrimitiveGroup(final boolean noInit) {
}
// Use PrimitiveGroup.newBuilder() to construct.
private PrimitiveGroup(final Builder builder) {
super(builder);
}
@Override
public ChangeSet getChangesets(final int index) {
return this.changesets_.get(index);
}
@Override
public int getChangesetsCount() {
return this.changesets_.size();
}
@Override
public java.util.List<ChangeSet> getChangesetsList() {
return this.changesets_;
}
public ChangeSetOrBuilder getChangesetsOrBuilder(final int index) {
return this.changesets_.get(index);
}
public java.util.List<? extends ChangeSetOrBuilder> getChangesetsOrBuilderList() {
return this.changesets_;
}
@Override
public PrimitiveGroup getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public DenseNodes getDense() {
return this.dense_;
}
@Override
public Node getNodes(final int index) {
return this.nodes_.get(index);
}
@Override
public int getNodesCount() {
return this.nodes_.size();
}
@Override
public java.util.List<Node> getNodesList() {
return this.nodes_;
}
public NodeOrBuilder getNodesOrBuilder(final int index) {
return this.nodes_.get(index);
}
public java.util.List<? extends NodeOrBuilder> getNodesOrBuilderList() {
return this.nodes_;
}
@Override
public Relation getRelations(final int index) {
return this.relations_.get(index);
}
@Override
public int getRelationsCount() {
return this.relations_.size();
}
@Override
public java.util.List<Relation> getRelationsList() {
return this.relations_;
}
public RelationOrBuilder getRelationsOrBuilder(final int index) {
return this.relations_.get(index);
}
public java.util.List<? extends RelationOrBuilder> getRelationsOrBuilderList() {
return this.relations_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
for (int i = 0; i < this.nodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, this.nodes_.get(i));
}
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, this.dense_);
}
for (int i = 0; i < this.ways_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, this.ways_.get(i));
}
for (int i = 0; i < this.relations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, this.relations_.get(i));
}
for (int i = 0; i < this.changesets_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5,
this.changesets_.get(i));
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public Way getWays(final int index) {
return this.ways_.get(index);
}
@Override
public int getWaysCount() {
return this.ways_.size();
}
@Override
public java.util.List<Way> getWaysList() {
return this.ways_;
}
public WayOrBuilder getWaysOrBuilder(final int index) {
return this.ways_.get(index);
}
public java.util.List<? extends WayOrBuilder> getWaysOrBuilderList() {
return this.ways_;
}
@Override
public boolean hasDense() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
private void initFields() {
this.nodes_ = java.util.Collections.emptyList();
this.dense_ = DenseNodes.getDefaultInstance();
this.ways_ = java.util.Collections.emptyList();
this.relations_ = java.util.Collections.emptyList();
this.changesets_ = java.util.Collections.emptyList();
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
for (int i = 0; i < getNodesCount(); i++) {
if (!getNodes(i).isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getWaysCount(); i++) {
if (!getWays(i).isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getRelationsCount(); i++) {
if (!getRelations(i).isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
for (int i = 0; i < getChangesetsCount(); i++) {
if (!getChangesets(i).isInitialized()) {
this.memoizedIsInitialized = 0;
return false;
}
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < this.nodes_.size(); i++) {
output.writeMessage(1, this.nodes_.get(i));
}
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeMessage(2, this.dense_);
}
for (int i = 0; i < this.ways_.size(); i++) {
output.writeMessage(3, this.ways_.get(i));
}
for (int i = 0; i < this.relations_.size(); i++) {
output.writeMessage(4, this.relations_.get(i));
}
for (int i = 0; i < this.changesets_.size(); i++) {
output.writeMessage(5, this.changesets_.get(i));
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup)
}
public interface PrimitiveGroupOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
ChangeSet getChangesets(int index);
int getChangesetsCount();
// repeated .OSMPBF.ChangeSet changesets = 5;
java.util.List<ChangeSet> getChangesetsList();
DenseNodes getDense();
Node getNodes(int index);
int getNodesCount();
// repeated .OSMPBF.Node nodes = 1;
java.util.List<Node> getNodesList();
Relation getRelations(int index);
int getRelationsCount();
// repeated .OSMPBF.Relation relations = 4;
java.util.List<Relation> getRelationsList();
Way getWays(int index);
int getWaysCount();
// repeated .OSMPBF.Way ways = 3;
java.util.List<Way> getWaysList();
// optional .OSMPBF.DenseNodes dense = 2;
boolean hasDense();
}
public static final class Relation extends com.google.protobuf.GeneratedMessageLite
implements RelationOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Relation, Builder>
implements RelationOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// required int64 id = 1;
private long id_;
// optional .OSMPBF.Info info = 4;
private Info info_ = Info.getDefaultInstance();
// repeated uint32 keys = 2 [packed = true];
private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
// repeated sint64 memids = 9 [packed = true];
private java.util.List<java.lang.Long> memids_ = java.util.Collections.emptyList();
// repeated int32 roles_sid = 8 [packed = true];
private java.util.List<java.lang.Integer> rolesSid_ = java.util.Collections.emptyList();
// repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
private java.util.List<Relation.MemberType> types_ = java.util.Collections.emptyList();
// repeated uint32 vals = 3 [packed = true];
private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
// Construct using Relation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllKeys(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureKeysIsMutable();
super.addAll(values, this.keys_);
return this;
}
public Builder addAllMemids(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureMemidsIsMutable();
super.addAll(values, this.memids_);
return this;
}
public Builder addAllRolesSid(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureRolesSidIsMutable();
super.addAll(values, this.rolesSid_);
return this;
}
public Builder addAllTypes(final java.lang.Iterable<? extends Relation.MemberType> values) {
ensureTypesIsMutable();
super.addAll(values, this.types_);
return this;
}
public Builder addAllVals(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureValsIsMutable();
super.addAll(values, this.vals_);
return this;
}
public Builder addKeys(final int value) {
ensureKeysIsMutable();
this.keys_.add(value);
return this;
}
public Builder addMemids(final long value) {
ensureMemidsIsMutable();
this.memids_.add(value);
return this;
}
public Builder addRolesSid(final int value) {
ensureRolesSidIsMutable();
this.rolesSid_.add(value);
return this;
}
public Builder addTypes(final Relation.MemberType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
this.types_.add(value);
return this;
};
public Builder addVals(final int value) {
ensureValsIsMutable();
this.vals_.add(value);
return this;
}
@Override
public Relation build() {
final Relation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private Relation buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final Relation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public Relation buildPartial() {
final Relation result = new Relation(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.id_ = this.id_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.keys_ = java.util.Collections.unmodifiableList(this.keys_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.keys_ = this.keys_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.vals_ = java.util.Collections.unmodifiableList(this.vals_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.vals_ = this.vals_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000002;
}
result.info_ = this.info_;
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
this.rolesSid_ = java.util.Collections.unmodifiableList(this.rolesSid_);
this.bitField0_ = this.bitField0_ & ~0x00000010;
}
result.rolesSid_ = this.rolesSid_;
if ((this.bitField0_ & 0x00000020) == 0x00000020) {
this.memids_ = java.util.Collections.unmodifiableList(this.memids_);
this.bitField0_ = this.bitField0_ & ~0x00000020;
}
result.memids_ = this.memids_;
if ((this.bitField0_ & 0x00000040) == 0x00000040) {
this.types_ = java.util.Collections.unmodifiableList(this.types_);
this.bitField0_ = this.bitField0_ & ~0x00000040;
}
result.types_ = this.types_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.id_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.rolesSid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
this.memids_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000020;
this.types_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000040;
return this;
}
public Builder clearId() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.id_ = 0L;
return this;
}
public Builder clearInfo() {
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
public Builder clearKeys() {
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearMemids() {
this.memids_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000020;
return this;
};
public Builder clearRolesSid() {
this.rolesSid_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearTypes() {
this.types_ = java.util.Collections.emptyList();
this.bitField0_ = this.bitField0_ & ~0x00000040;
return this;
}
public Builder clearVals() {
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureKeysIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.keys_ = new java.util.ArrayList<>(this.keys_);
this.bitField0_ |= 0x00000002;
}
}
private void ensureMemidsIsMutable() {
if (!((this.bitField0_ & 0x00000020) == 0x00000020)) {
this.memids_ = new java.util.ArrayList<>(this.memids_);
this.bitField0_ |= 0x00000020;
}
}
private void ensureRolesSidIsMutable() {
if (!((this.bitField0_ & 0x00000010) == 0x00000010)) {
this.rolesSid_ = new java.util.ArrayList<>(this.rolesSid_);
this.bitField0_ |= 0x00000010;
}
}
private void ensureTypesIsMutable() {
if (!((this.bitField0_ & 0x00000040) == 0x00000040)) {
this.types_ = new java.util.ArrayList<>(this.types_);
this.bitField0_ |= 0x00000040;
}
}
private void ensureValsIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.vals_ = new java.util.ArrayList<>(this.vals_);
this.bitField0_ |= 0x00000004;
}
}
@Override
public Relation getDefaultInstanceForType() {
return Relation.getDefaultInstance();
}
@Override
public long getId() {
return this.id_;
}
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return java.util.Collections.unmodifiableList(this.keys_);
}
@Override
public long getMemids(final int index) {
return this.memids_.get(index);
};
@Override
public int getMemidsCount() {
return this.memids_.size();
}
@Override
public java.util.List<java.lang.Long> getMemidsList() {
return java.util.Collections.unmodifiableList(this.memids_);
}
@Override
public int getRolesSid(final int index) {
return this.rolesSid_.get(index);
}
@Override
public int getRolesSidCount() {
return this.rolesSid_.size();
}
@Override
public java.util.List<java.lang.Integer> getRolesSidList() {
return java.util.Collections.unmodifiableList(this.rolesSid_);
}
@Override
public Relation.MemberType getTypes(final int index) {
return this.types_.get(index);
}
@Override
public int getTypesCount() {
return this.types_.size();
}
@Override
public java.util.List<Relation.MemberType> getTypesList() {
return java.util.Collections.unmodifiableList(this.types_);
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
};
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return java.util.Collections.unmodifiableList(this.vals_);
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.id_ = input.readInt64();
break;
}
case 16: {
ensureKeysIsMutable();
this.keys_.add(input.readUInt32());
break;
}
case 18: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addKeys(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 24: {
ensureValsIsMutable();
this.vals_.add(input.readUInt32());
break;
}
case 26: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addVals(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 34: {
final Info.Builder subBuilder = Info.newBuilder();
if (hasInfo()) {
subBuilder.mergeFrom(getInfo());
}
input.readMessage(subBuilder, extensionRegistry);
setInfo(subBuilder.buildPartial());
break;
}
case 64: {
ensureRolesSidIsMutable();
this.rolesSid_.add(input.readInt32());
break;
}
case 66: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addRolesSid(input.readInt32());
}
input.popLimit(limit);
break;
}
case 72: {
ensureMemidsIsMutable();
this.memids_.add(input.readSInt64());
break;
}
case 74: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addMemids(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 80: {
final int rawValue = input.readEnum();
final Relation.MemberType value = Relation.MemberType.valueOf(rawValue);
if (value != null) {
addTypes(value);
}
break;
}
case 82: {
final int length = input.readRawVarint32();
final int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
final int rawValue = input.readEnum();
final Relation.MemberType value = Relation.MemberType.valueOf(rawValue);
if (value != null) {
addTypes(value);
}
}
input.popLimit(oldLimit);
break;
}
}
}
}
@Override
public Builder mergeFrom(final Relation other) {
if (other == Relation.getDefaultInstance()) {
return this;
}
if (other.hasId()) {
setId(other.getId());
}
if (!other.keys_.isEmpty()) {
if (this.keys_.isEmpty()) {
this.keys_ = other.keys_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensureKeysIsMutable();
this.keys_.addAll(other.keys_);
}
}
if (!other.vals_.isEmpty()) {
if (this.vals_.isEmpty()) {
this.vals_ = other.vals_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureValsIsMutable();
this.vals_.addAll(other.vals_);
}
}
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.rolesSid_.isEmpty()) {
if (this.rolesSid_.isEmpty()) {
this.rolesSid_ = other.rolesSid_;
this.bitField0_ = this.bitField0_ & ~0x00000010;
} else {
ensureRolesSidIsMutable();
this.rolesSid_.addAll(other.rolesSid_);
}
}
if (!other.memids_.isEmpty()) {
if (this.memids_.isEmpty()) {
this.memids_ = other.memids_;
this.bitField0_ = this.bitField0_ & ~0x00000020;
} else {
ensureMemidsIsMutable();
this.memids_.addAll(other.memids_);
}
}
if (!other.types_.isEmpty()) {
if (this.types_.isEmpty()) {
this.types_ = other.types_;
this.bitField0_ = this.bitField0_ & ~0x00000040;
} else {
ensureTypesIsMutable();
this.types_.addAll(other.types_);
}
}
return this;
}
public Builder mergeInfo(final Info value) {
if ((this.bitField0_ & 0x00000008) == 0x00000008
&& this.info_ != Info.getDefaultInstance()) {
this.info_ = Info.newBuilder(this.info_).mergeFrom(value).buildPartial();
} else {
this.info_ = value;
}
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setId(final long value) {
this.bitField0_ |= 0x00000001;
this.id_ = value;
return this;
}
public Builder setInfo(final Info value) {
if (value == null) {
throw new NullPointerException();
}
this.info_ = value;
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setInfo(final Info.Builder builderForValue) {
this.info_ = builderForValue.build();
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setKeys(final int index, final int value) {
ensureKeysIsMutable();
this.keys_.set(index, value);
return this;
}
public Builder setMemids(final int index, final long value) {
ensureMemidsIsMutable();
this.memids_.set(index, value);
return this;
}
public Builder setRolesSid(final int index, final int value) {
ensureRolesSidIsMutable();
this.rolesSid_.set(index, value);
return this;
}
public Builder setTypes(final int index, final Relation.MemberType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
this.types_.set(index, value);
return this;
}
public Builder setVals(final int index, final int value) {
ensureValsIsMutable();
this.vals_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Relation)
}
public enum MemberType implements com.google.protobuf.Internal.EnumLite {
NODE(0, 0), RELATION(2, 2), WAY(1, 1),;
private static com.google.protobuf.Internal.EnumLiteMap<MemberType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<MemberType>() {
@Override
public MemberType findValueByNumber(final int number) {
return MemberType.valueOf(number);
}
};
public static final int NODE_VALUE = 0;
public static final int RELATION_VALUE = 2;
public static final int WAY_VALUE = 1;
public static com.google.protobuf.Internal.EnumLiteMap<MemberType> internalGetValueMap() {
return internalValueMap;
}
public static MemberType valueOf(final int value) {
switch (value) {
case 0:
return NODE;
case 1:
return WAY;
case 2:
return RELATION;
default:
return null;
}
}
private final int value;
private MemberType(final int index, final int value) {
this.value = value;
}
@Override
public final int getNumber() {
return this.value;
}
// @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType)
}
private static final Relation defaultInstance;
// required int64 id = 1;
public static final int ID_FIELD_NUMBER = 1;
// optional .OSMPBF.Info info = 4;
public static final int INFO_FIELD_NUMBER = 4;
// repeated uint32 keys = 2 [packed = true];
public static final int KEYS_FIELD_NUMBER = 2;
// repeated sint64 memids = 9 [packed = true];
public static final int MEMIDS_FIELD_NUMBER = 9;
// repeated int32 roles_sid = 8 [packed = true];
public static final int ROLES_SID_FIELD_NUMBER = 8;
private static final long serialVersionUID = 0L;
// repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
public static final int TYPES_FIELD_NUMBER = 10;
// repeated uint32 vals = 3 [packed = true];
public static final int VALS_FIELD_NUMBER = 3;
static {
defaultInstance = new Relation(true);
defaultInstance.initFields();
}
public static Relation getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final Relation prototype) {
return newBuilder().mergeFrom(prototype);
}
public static Relation parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Relation parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Relation parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Relation parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Relation parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Relation parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Relation parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Relation parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static Relation parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Relation parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long id_;
private Info info_;
private java.util.List<java.lang.Integer> keys_;
private int keysMemoizedSerializedSize = -1;
private java.util.List<java.lang.Long> memids_;
private int memidsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> rolesSid_;
private int rolesSidMemoizedSerializedSize = -1;
private java.util.List<Relation.MemberType> types_;
private int typesMemoizedSerializedSize;
private java.util.List<java.lang.Integer> vals_;
private int valsMemoizedSerializedSize = -1;
private Relation(final boolean noInit) {
}
// Use Relation.newBuilder() to construct.
private Relation(final Builder builder) {
super(builder);
}
@Override
public Relation getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public long getId() {
return this.id_;
}
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return this.keys_;
}
@Override
public long getMemids(final int index) {
return this.memids_.get(index);
}
@Override
public int getMemidsCount() {
return this.memids_.size();
}
@Override
public java.util.List<java.lang.Long> getMemidsList() {
return this.memids_;
}
@Override
public int getRolesSid(final int index) {
return this.rolesSid_.get(index);
}
@Override
public int getRolesSidCount() {
return this.rolesSid_.size();
}
@Override
public java.util.List<java.lang.Integer> getRolesSidList() {
return this.rolesSid_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, this.id_);
}
{
int dataSize = 0;
for (int i = 0; i < this.keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.keys_.get(i));
}
size += dataSize;
if (!getKeysList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.keysMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.vals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.vals_.get(i));
}
size += dataSize;
if (!getValsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.valsMemoizedSerializedSize = dataSize;
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, this.info_);
}
{
int dataSize = 0;
for (int i = 0; i < this.rolesSid_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(this.rolesSid_.get(i));
}
size += dataSize;
if (!getRolesSidList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.rolesSidMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.memids_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.memids_.get(i));
}
size += dataSize;
if (!getMemidsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.memidsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.types_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(this.types_.get(i).getNumber());
}
size += dataSize;
if (!getTypesList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeRawVarint32Size(dataSize);
}
this.typesMemoizedSerializedSize = dataSize;
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public Relation.MemberType getTypes(final int index) {
return this.types_.get(index);
}
@Override
public int getTypesCount() {
return this.types_.size();
}
@Override
public java.util.List<Relation.MemberType> getTypesList() {
return this.types_;
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
}
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return this.vals_;
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
private void initFields() {
this.id_ = 0L;
this.keys_ = java.util.Collections.emptyList();
;
this.vals_ = java.util.Collections.emptyList();
;
this.info_ = Info.getDefaultInstance();
this.rolesSid_ = java.util.Collections.emptyList();
;
this.memids_ = java.util.Collections.emptyList();
;
this.types_ = java.util.Collections.emptyList();
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasId()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeInt64(1, this.id_);
}
if (getKeysList().size() > 0) {
output.writeRawVarint32(18);
output.writeRawVarint32(this.keysMemoizedSerializedSize);
}
for (int i = 0; i < this.keys_.size(); i++) {
output.writeUInt32NoTag(this.keys_.get(i));
}
if (getValsList().size() > 0) {
output.writeRawVarint32(26);
output.writeRawVarint32(this.valsMemoizedSerializedSize);
}
for (int i = 0; i < this.vals_.size(); i++) {
output.writeUInt32NoTag(this.vals_.get(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeMessage(4, this.info_);
}
if (getRolesSidList().size() > 0) {
output.writeRawVarint32(66);
output.writeRawVarint32(this.rolesSidMemoizedSerializedSize);
}
for (int i = 0; i < this.rolesSid_.size(); i++) {
output.writeInt32NoTag(this.rolesSid_.get(i));
}
if (getMemidsList().size() > 0) {
output.writeRawVarint32(74);
output.writeRawVarint32(this.memidsMemoizedSerializedSize);
}
for (int i = 0; i < this.memids_.size(); i++) {
output.writeSInt64NoTag(this.memids_.get(i));
}
if (getTypesList().size() > 0) {
output.writeRawVarint32(82);
output.writeRawVarint32(this.typesMemoizedSerializedSize);
}
for (int i = 0; i < this.types_.size(); i++) {
output.writeEnumNoTag(this.types_.get(i).getNumber());
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.Relation)
}
public interface RelationOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getId();
Info getInfo();
int getKeys(int index);
int getKeysCount();
// repeated uint32 keys = 2 [packed = true];
java.util.List<java.lang.Integer> getKeysList();
long getMemids(int index);
int getMemidsCount();
// repeated sint64 memids = 9 [packed = true];
java.util.List<java.lang.Long> getMemidsList();
int getRolesSid(int index);
int getRolesSidCount();
// repeated int32 roles_sid = 8 [packed = true];
java.util.List<java.lang.Integer> getRolesSidList();
Relation.MemberType getTypes(int index);
int getTypesCount();
// repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
java.util.List<Relation.MemberType> getTypesList();
int getVals(int index);
int getValsCount();
// repeated uint32 vals = 3 [packed = true];
java.util.List<java.lang.Integer> getValsList();
// required int64 id = 1;
boolean hasId();
// optional .OSMPBF.Info info = 4;
boolean hasInfo();
}
public static final class StringTable extends com.google.protobuf.GeneratedMessageLite
implements StringTableOrBuilder {
public static final class Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<StringTable, Builder>
implements StringTableOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// repeated bytes s = 1;
private java.util.List<com.google.protobuf.ByteString> s_ = java.util.Collections.emptyList();
// Construct using StringTable.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllS(
final java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureSIsMutable();
super.addAll(values, this.s_);
return this;
}
public Builder addS(final com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSIsMutable();
this.s_.add(value);
return this;
}
@Override
public StringTable build() {
final StringTable result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private StringTable buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final StringTable result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public StringTable buildPartial() {
final StringTable result = new StringTable(this);
final int from_bitField0_ = this.bitField0_;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
this.s_ = java.util.Collections.unmodifiableList(this.s_);
this.bitField0_ = this.bitField0_ & ~0x00000001;
}
result.s_ = this.s_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.s_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
public Builder clearS() {
this.s_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000001;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureSIsMutable() {
if (!((this.bitField0_ & 0x00000001) == 0x00000001)) {
this.s_ = new java.util.ArrayList<>(this.s_);
this.bitField0_ |= 0x00000001;
}
}
@Override
public StringTable getDefaultInstanceForType() {
return StringTable.getDefaultInstance();
};
@Override
public com.google.protobuf.ByteString getS(final int index) {
return this.s_.get(index);
}
@Override
public int getSCount() {
return this.s_.size();
}
@Override
public java.util.List<com.google.protobuf.ByteString> getSList() {
return java.util.Collections.unmodifiableList(this.s_);
}
@Override
public final boolean isInitialized() {
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 10: {
ensureSIsMutable();
this.s_.add(input.readBytes());
break;
}
}
}
}
@Override
public Builder mergeFrom(final StringTable other) {
if (other == StringTable.getDefaultInstance()) {
return this;
}
if (!other.s_.isEmpty()) {
if (this.s_.isEmpty()) {
this.s_ = other.s_;
this.bitField0_ = this.bitField0_ & ~0x00000001;
} else {
ensureSIsMutable();
this.s_.addAll(other.s_);
}
}
return this;
}
public Builder setS(final int index, final com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSIsMutable();
this.s_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.StringTable)
}
private static final StringTable defaultInstance;
// repeated bytes s = 1;
public static final int S_FIELD_NUMBER = 1;
private static final long serialVersionUID = 0L;
static {
defaultInstance = new StringTable(true);
defaultInstance.initFields();
}
public static StringTable getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final StringTable prototype) {
return newBuilder().mergeFrom(prototype);
}
public static StringTable parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static StringTable parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static StringTable parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static StringTable parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static StringTable parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static StringTable parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static StringTable parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static StringTable parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static StringTable parseFrom(final java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static StringTable parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<com.google.protobuf.ByteString> s_;
private StringTable(final boolean noInit) {
}
// Use StringTable.newBuilder() to construct.
private StringTable(final Builder builder) {
super(builder);
}
@Override
public StringTable getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public com.google.protobuf.ByteString getS(final int index) {
return this.s_.get(index);
}
@Override
public int getSCount() {
return this.s_.size();
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
{
int dataSize = 0;
for (int i = 0; i < this.s_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(this.s_.get(i));
}
size += dataSize;
size += 1 * getSList().size();
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public java.util.List<com.google.protobuf.ByteString> getSList() {
return this.s_;
}
private void initFields() {
this.s_ = java.util.Collections.emptyList();
;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < this.s_.size(); i++) {
output.writeBytes(1, this.s_.get(i));
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.StringTable)
}
public interface StringTableOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
com.google.protobuf.ByteString getS(int index);
int getSCount();
// repeated bytes s = 1;
java.util.List<com.google.protobuf.ByteString> getSList();
}
public static final class Way extends com.google.protobuf.GeneratedMessageLite
implements WayOrBuilder {
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<Way, Builder> implements WayOrBuilder {
private static Builder create() {
return new Builder();
}
private int bitField0_;
// required int64 id = 1;
private long id_;
// optional .OSMPBF.Info info = 4;
private Info info_ = Info.getDefaultInstance();
// repeated uint32 keys = 2 [packed = true];
private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
// repeated sint64 refs = 8 [packed = true];
private java.util.List<java.lang.Long> refs_ = java.util.Collections.emptyList();
// repeated uint32 vals = 3 [packed = true];
private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
// Construct using Way.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
public Builder addAllKeys(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureKeysIsMutable();
super.addAll(values, this.keys_);
return this;
}
public Builder addAllRefs(final java.lang.Iterable<? extends java.lang.Long> values) {
ensureRefsIsMutable();
super.addAll(values, this.refs_);
return this;
}
public Builder addAllVals(final java.lang.Iterable<? extends java.lang.Integer> values) {
ensureValsIsMutable();
super.addAll(values, this.vals_);
return this;
}
public Builder addKeys(final int value) {
ensureKeysIsMutable();
this.keys_.add(value);
return this;
}
public Builder addRefs(final long value) {
ensureRefsIsMutable();
this.refs_.add(value);
return this;
}
public Builder addVals(final int value) {
ensureValsIsMutable();
this.vals_.add(value);
return this;
}
@Override
public Way build() {
final Way result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
private Way buildParsed() throws com.google.protobuf.InvalidProtocolBufferException {
final Way result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
}
@Override
public Way buildPartial() {
final Way result = new Way(this);
final int from_bitField0_ = this.bitField0_;
int to_bitField0_ = 0;
if ((from_bitField0_ & 0x00000001) == 0x00000001) {
to_bitField0_ |= 0x00000001;
}
result.id_ = this.id_;
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
this.keys_ = java.util.Collections.unmodifiableList(this.keys_);
this.bitField0_ = this.bitField0_ & ~0x00000002;
}
result.keys_ = this.keys_;
if ((this.bitField0_ & 0x00000004) == 0x00000004) {
this.vals_ = java.util.Collections.unmodifiableList(this.vals_);
this.bitField0_ = this.bitField0_ & ~0x00000004;
}
result.vals_ = this.vals_;
if ((from_bitField0_ & 0x00000008) == 0x00000008) {
to_bitField0_ |= 0x00000002;
}
result.info_ = this.info_;
if ((this.bitField0_ & 0x00000010) == 0x00000010) {
this.refs_ = java.util.Collections.unmodifiableList(this.refs_);
this.bitField0_ = this.bitField0_ & ~0x00000010;
}
result.refs_ = this.refs_;
result.bitField0_ = to_bitField0_;
return result;
}
@Override
public Builder clear() {
super.clear();
this.id_ = 0L;
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
this.refs_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearId() {
this.bitField0_ = this.bitField0_ & ~0x00000001;
this.id_ = 0L;
return this;
};
public Builder clearInfo() {
this.info_ = Info.getDefaultInstance();
this.bitField0_ = this.bitField0_ & ~0x00000008;
return this;
}
public Builder clearKeys() {
this.keys_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000002;
return this;
}
public Builder clearRefs() {
this.refs_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000010;
return this;
}
public Builder clearVals() {
this.vals_ = java.util.Collections.emptyList();
;
this.bitField0_ = this.bitField0_ & ~0x00000004;
return this;
}
@Override
public Builder clone() {
return create().mergeFrom(buildPartial());
}
private void ensureKeysIsMutable() {
if (!((this.bitField0_ & 0x00000002) == 0x00000002)) {
this.keys_ = new java.util.ArrayList<>(this.keys_);
this.bitField0_ |= 0x00000002;
}
}
private void ensureRefsIsMutable() {
if (!((this.bitField0_ & 0x00000010) == 0x00000010)) {
this.refs_ = new java.util.ArrayList<>(this.refs_);
this.bitField0_ |= 0x00000010;
}
}
private void ensureValsIsMutable() {
if (!((this.bitField0_ & 0x00000004) == 0x00000004)) {
this.vals_ = new java.util.ArrayList<>(this.vals_);
this.bitField0_ |= 0x00000004;
}
}
@Override
public Way getDefaultInstanceForType() {
return Way.getDefaultInstance();
};
@Override
public long getId() {
return this.id_;
}
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return java.util.Collections.unmodifiableList(this.keys_);
}
@Override
public long getRefs(final int index) {
return this.refs_.get(index);
}
@Override
public int getRefsCount() {
return this.refs_.size();
}
@Override
public java.util.List<java.lang.Long> getRefsList() {
return java.util.Collections.unmodifiableList(this.refs_);
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
}
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return java.util.Collections.unmodifiableList(this.vals_);
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000008) == 0x00000008;
}
@Override
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
return true;
}
private void maybeForceBuilderInitialization() {
}
@Override
public Builder mergeFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
while (true) {
final int tag = input.readTag();
switch (tag) {
case 0:
return this;
default: {
if (!parseUnknownField(input, extensionRegistry, tag)) {
return this;
}
break;
}
case 8: {
this.bitField0_ |= 0x00000001;
this.id_ = input.readInt64();
break;
}
case 16: {
ensureKeysIsMutable();
this.keys_.add(input.readUInt32());
break;
}
case 18: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addKeys(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 24: {
ensureValsIsMutable();
this.vals_.add(input.readUInt32());
break;
}
case 26: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addVals(input.readUInt32());
}
input.popLimit(limit);
break;
}
case 34: {
final Info.Builder subBuilder = Info.newBuilder();
if (hasInfo()) {
subBuilder.mergeFrom(getInfo());
}
input.readMessage(subBuilder, extensionRegistry);
setInfo(subBuilder.buildPartial());
break;
}
case 64: {
ensureRefsIsMutable();
this.refs_.add(input.readSInt64());
break;
}
case 66: {
final int length = input.readRawVarint32();
final int limit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
addRefs(input.readSInt64());
}
input.popLimit(limit);
break;
}
}
}
};
@Override
public Builder mergeFrom(final Way other) {
if (other == Way.getDefaultInstance()) {
return this;
}
if (other.hasId()) {
setId(other.getId());
}
if (!other.keys_.isEmpty()) {
if (this.keys_.isEmpty()) {
this.keys_ = other.keys_;
this.bitField0_ = this.bitField0_ & ~0x00000002;
} else {
ensureKeysIsMutable();
this.keys_.addAll(other.keys_);
}
}
if (!other.vals_.isEmpty()) {
if (this.vals_.isEmpty()) {
this.vals_ = other.vals_;
this.bitField0_ = this.bitField0_ & ~0x00000004;
} else {
ensureValsIsMutable();
this.vals_.addAll(other.vals_);
}
}
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.refs_.isEmpty()) {
if (this.refs_.isEmpty()) {
this.refs_ = other.refs_;
this.bitField0_ = this.bitField0_ & ~0x00000010;
} else {
ensureRefsIsMutable();
this.refs_.addAll(other.refs_);
}
}
return this;
}
public Builder mergeInfo(final Info value) {
if ((this.bitField0_ & 0x00000008) == 0x00000008
&& this.info_ != Info.getDefaultInstance()) {
this.info_ = Info.newBuilder(this.info_).mergeFrom(value).buildPartial();
} else {
this.info_ = value;
}
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setId(final long value) {
this.bitField0_ |= 0x00000001;
this.id_ = value;
return this;
}
public Builder setInfo(final Info value) {
if (value == null) {
throw new NullPointerException();
}
this.info_ = value;
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setInfo(final Info.Builder builderForValue) {
this.info_ = builderForValue.build();
this.bitField0_ |= 0x00000008;
return this;
}
public Builder setKeys(final int index, final int value) {
ensureKeysIsMutable();
this.keys_.set(index, value);
return this;
}
public Builder setRefs(final int index, final long value) {
ensureRefsIsMutable();
this.refs_.set(index, value);
return this;
}
public Builder setVals(final int index, final int value) {
ensureValsIsMutable();
this.vals_.set(index, value);
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Way)
}
private static final Way defaultInstance;
// required int64 id = 1;
public static final int ID_FIELD_NUMBER = 1;
// optional .OSMPBF.Info info = 4;
public static final int INFO_FIELD_NUMBER = 4;
// repeated uint32 keys = 2 [packed = true];
public static final int KEYS_FIELD_NUMBER = 2;
// repeated sint64 refs = 8 [packed = true];
public static final int REFS_FIELD_NUMBER = 8;
private static final long serialVersionUID = 0L;
// repeated uint32 vals = 3 [packed = true];
public static final int VALS_FIELD_NUMBER = 3;
static {
defaultInstance = new Way(true);
defaultInstance.initFields();
}
public static Way getDefaultInstance() {
return defaultInstance;
}
public static Builder newBuilder() {
return Builder.create();
}
public static Builder newBuilder(final Way prototype) {
return newBuilder().mergeFrom(prototype);
}
public static Way parseDelimitedFrom(final java.io.InputStream input)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Way parseDelimitedFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
final Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static Way parseFrom(final byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Way parseFrom(final byte[] data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Way parseFrom(final com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static Way parseFrom(final com.google.protobuf.ByteString data,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry).buildParsed();
}
public static Way parseFrom(final com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Way parseFrom(final com.google.protobuf.CodedInputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
public static Way parseFrom(final java.io.InputStream input) throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static Way parseFrom(final java.io.InputStream input,
final com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry).buildParsed();
}
private int bitField0_;
private long id_;
private Info info_;
private java.util.List<java.lang.Integer> keys_;
private int keysMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private java.util.List<java.lang.Long> refs_;
private int refsMemoizedSerializedSize = -1;
private java.util.List<java.lang.Integer> vals_;
private int valsMemoizedSerializedSize = -1;
private Way(final boolean noInit) {
}
// Use Way.newBuilder() to construct.
private Way(final Builder builder) {
super(builder);
}
@Override
public Way getDefaultInstanceForType() {
return defaultInstance;
}
@Override
public long getId() {
return this.id_;
}
@Override
public Info getInfo() {
return this.info_;
}
@Override
public int getKeys(final int index) {
return this.keys_.get(index);
}
@Override
public int getKeysCount() {
return this.keys_.size();
}
@Override
public java.util.List<java.lang.Integer> getKeysList() {
return this.keys_;
}
@Override
public long getRefs(final int index) {
return this.refs_.get(index);
}
@Override
public int getRefsCount() {
return this.refs_.size();
}
@Override
public java.util.List<java.lang.Long> getRefsList() {
return this.refs_;
}
@Override
public int getSerializedSize() {
int size = this.memoizedSerializedSize;
if (size != -1) {
return size;
}
size = 0;
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, this.id_);
}
{
int dataSize = 0;
for (int i = 0; i < this.keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.keys_.get(i));
}
size += dataSize;
if (!getKeysList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.keysMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < this.vals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(this.vals_.get(i));
}
size += dataSize;
if (!getValsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.valsMemoizedSerializedSize = dataSize;
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, this.info_);
}
{
int dataSize = 0;
for (int i = 0; i < this.refs_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(this.refs_.get(i));
}
size += dataSize;
if (!getRefsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
}
this.refsMemoizedSerializedSize = dataSize;
}
this.memoizedSerializedSize = size;
return size;
}
@Override
public int getVals(final int index) {
return this.vals_.get(index);
}
@Override
public int getValsCount() {
return this.vals_.size();
}
@Override
public java.util.List<java.lang.Integer> getValsList() {
return this.vals_;
}
@Override
public boolean hasId() {
return (this.bitField0_ & 0x00000001) == 0x00000001;
}
@Override
public boolean hasInfo() {
return (this.bitField0_ & 0x00000002) == 0x00000002;
}
private void initFields() {
this.id_ = 0L;
this.keys_ = java.util.Collections.emptyList();
;
this.vals_ = java.util.Collections.emptyList();
;
this.info_ = Info.getDefaultInstance();
this.refs_ = java.util.Collections.emptyList();
;
}
@Override
public final boolean isInitialized() {
final byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1) {
return isInitialized == 1;
}
if (!hasId()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
@Override
public Builder newBuilderForType() {
return newBuilder();
}
@Override
public Builder toBuilder() {
return newBuilder(this);
}
@java.lang.Override
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
return super.writeReplace();
}
@Override
public void writeTo(final com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if ((this.bitField0_ & 0x00000001) == 0x00000001) {
output.writeInt64(1, this.id_);
}
if (getKeysList().size() > 0) {
output.writeRawVarint32(18);
output.writeRawVarint32(this.keysMemoizedSerializedSize);
}
for (int i = 0; i < this.keys_.size(); i++) {
output.writeUInt32NoTag(this.keys_.get(i));
}
if (getValsList().size() > 0) {
output.writeRawVarint32(26);
output.writeRawVarint32(this.valsMemoizedSerializedSize);
}
for (int i = 0; i < this.vals_.size(); i++) {
output.writeUInt32NoTag(this.vals_.get(i));
}
if ((this.bitField0_ & 0x00000002) == 0x00000002) {
output.writeMessage(4, this.info_);
}
if (getRefsList().size() > 0) {
output.writeRawVarint32(66);
output.writeRawVarint32(this.refsMemoizedSerializedSize);
}
for (int i = 0; i < this.refs_.size(); i++) {
output.writeSInt64NoTag(this.refs_.get(i));
}
}
// @@protoc_insertion_point(class_scope:OSMPBF.Way)
}
public interface WayOrBuilder extends com.google.protobuf.MessageLiteOrBuilder {
long getId();
Info getInfo();
int getKeys(int index);
int getKeysCount();
// repeated uint32 keys = 2 [packed = true];
java.util.List<java.lang.Integer> getKeysList();
long getRefs(int index);
int getRefsCount();
// repeated sint64 refs = 8 [packed = true];
java.util.List<java.lang.Long> getRefsList();
int getVals(int index);
int getValsCount();
// repeated uint32 vals = 3 [packed = true];
java.util.List<java.lang.Integer> getValsList();
// required int64 id = 1;
boolean hasId();
// optional .OSMPBF.Info info = 4;
boolean hasInfo();
}
static {
}
public static void registerAllExtensions(
final com.google.protobuf.ExtensionRegistryLite registry) {
}
private Osmformat() {
}
// @@protoc_insertion_point(outer_class_scope)
}