org.apache.baremaps.osm.binary.Fileformat Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: fileformat.proto
// Protobuf Java Version: 4.28.0
package org.apache.baremaps.osm.binary;
public final class Fileformat {
private Fileformat() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 0,
/* suffix= */ "",
Fileformat.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface BlobOrBuilder extends
// @@protoc_insertion_point(interface_extends:OSMPBF.Blob)
com.google.protobuf.MessageOrBuilder {
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return Whether the rawSize field is set.
*/
boolean hasRawSize();
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return The rawSize.
*/
int getRawSize();
/**
*
* No compression
*
*
* bytes raw = 1;
* @return Whether the raw field is set.
*/
boolean hasRaw();
/**
*
* No compression
*
*
* bytes raw = 1;
* @return The raw.
*/
com.google.protobuf.ByteString getRaw();
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return Whether the zlibData field is set.
*/
boolean hasZlibData();
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return The zlibData.
*/
com.google.protobuf.ByteString getZlibData();
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return Whether the lzmaData field is set.
*/
boolean hasLzmaData();
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return The lzmaData.
*/
com.google.protobuf.ByteString getLzmaData();
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return Whether the oBSOLETEBzip2Data field is set.
*/
@java.lang.Deprecated boolean hasOBSOLETEBzip2Data();
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return The oBSOLETEBzip2Data.
*/
@java.lang.Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data();
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return Whether the lz4Data field is set.
*/
boolean hasLz4Data();
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return The lz4Data.
*/
com.google.protobuf.ByteString getLz4Data();
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return Whether the zstdData field is set.
*/
boolean hasZstdData();
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return The zstdData.
*/
com.google.protobuf.ByteString getZstdData();
org.apache.baremaps.osm.binary.Fileformat.Blob.DataCase getDataCase();
}
/**
* Protobuf type {@code OSMPBF.Blob}
*/
public static final class Blob extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:OSMPBF.Blob)
BlobOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 0,
/* suffix= */ "",
Blob.class.getName());
}
// Use Blob.newBuilder() to construct.
private Blob(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Blob() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.baremaps.osm.binary.Fileformat.Blob.class, org.apache.baremaps.osm.binary.Fileformat.Blob.Builder.class);
}
private int bitField0_;
private int dataCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object data_;
public enum DataCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
RAW(1),
ZLIB_DATA(3),
LZMA_DATA(4),
@java.lang.Deprecated OBSOLETE_BZIP2_DATA(5),
LZ4_DATA(6),
ZSTD_DATA(7),
DATA_NOT_SET(0);
private final int value;
private DataCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DataCase valueOf(int value) {
return forNumber(value);
}
public static DataCase forNumber(int value) {
switch (value) {
case 1: return RAW;
case 3: return ZLIB_DATA;
case 4: return LZMA_DATA;
case 5: return OBSOLETE_BZIP2_DATA;
case 6: return LZ4_DATA;
case 7: return ZSTD_DATA;
case 0: return DATA_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public DataCase
getDataCase() {
return DataCase.forNumber(
dataCase_);
}
public static final int RAW_SIZE_FIELD_NUMBER = 2;
private int rawSize_ = 0;
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return Whether the rawSize field is set.
*/
@java.lang.Override
public boolean hasRawSize() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return The rawSize.
*/
@java.lang.Override
public int getRawSize() {
return rawSize_;
}
public static final int RAW_FIELD_NUMBER = 1;
/**
*
* No compression
*
*
* bytes raw = 1;
* @return Whether the raw field is set.
*/
@java.lang.Override
public boolean hasRaw() {
return dataCase_ == 1;
}
/**
*
* No compression
*
*
* bytes raw = 1;
* @return The raw.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRaw() {
if (dataCase_ == 1) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int ZLIB_DATA_FIELD_NUMBER = 3;
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return Whether the zlibData field is set.
*/
@java.lang.Override
public boolean hasZlibData() {
return dataCase_ == 3;
}
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return The zlibData.
*/
@java.lang.Override
public com.google.protobuf.ByteString getZlibData() {
if (dataCase_ == 3) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int LZMA_DATA_FIELD_NUMBER = 4;
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return Whether the lzmaData field is set.
*/
@java.lang.Override
public boolean hasLzmaData() {
return dataCase_ == 4;
}
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return The lzmaData.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLzmaData() {
if (dataCase_ == 4) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5;
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return Whether the oBSOLETEBzip2Data field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
return dataCase_ == 5;
}
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return The oBSOLETEBzip2Data.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
if (dataCase_ == 5) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int LZ4_DATA_FIELD_NUMBER = 6;
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return Whether the lz4Data field is set.
*/
@java.lang.Override
public boolean hasLz4Data() {
return dataCase_ == 6;
}
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return The lz4Data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLz4Data() {
if (dataCase_ == 6) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int ZSTD_DATA_FIELD_NUMBER = 7;
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return Whether the zstdData field is set.
*/
@java.lang.Override
public boolean hasZstdData() {
return dataCase_ == 7;
}
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return The zstdData.
*/
@java.lang.Override
public com.google.protobuf.ByteString getZstdData() {
if (dataCase_ == 7) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (dataCase_ == 1) {
output.writeBytes(
1, (com.google.protobuf.ByteString) data_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(2, rawSize_);
}
if (dataCase_ == 3) {
output.writeBytes(
3, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 4) {
output.writeBytes(
4, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 5) {
output.writeBytes(
5, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 6) {
output.writeBytes(
6, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 7) {
output.writeBytes(
7, (com.google.protobuf.ByteString) data_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (dataCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
1, (com.google.protobuf.ByteString) data_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, rawSize_);
}
if (dataCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
3, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
4, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
5, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
6, (com.google.protobuf.ByteString) data_);
}
if (dataCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
7, (com.google.protobuf.ByteString) data_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.baremaps.osm.binary.Fileformat.Blob)) {
return super.equals(obj);
}
org.apache.baremaps.osm.binary.Fileformat.Blob other = (org.apache.baremaps.osm.binary.Fileformat.Blob) obj;
if (hasRawSize() != other.hasRawSize()) return false;
if (hasRawSize()) {
if (getRawSize()
!= other.getRawSize()) return false;
}
if (!getDataCase().equals(other.getDataCase())) return false;
switch (dataCase_) {
case 1:
if (!getRaw()
.equals(other.getRaw())) return false;
break;
case 3:
if (!getZlibData()
.equals(other.getZlibData())) return false;
break;
case 4:
if (!getLzmaData()
.equals(other.getLzmaData())) return false;
break;
case 5:
if (!getOBSOLETEBzip2Data()
.equals(other.getOBSOLETEBzip2Data())) return false;
break;
case 6:
if (!getLz4Data()
.equals(other.getLz4Data())) return false;
break;
case 7:
if (!getZstdData()
.equals(other.getZstdData())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasRawSize()) {
hash = (37 * hash) + RAW_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getRawSize();
}
switch (dataCase_) {
case 1:
hash = (37 * hash) + RAW_FIELD_NUMBER;
hash = (53 * hash) + getRaw().hashCode();
break;
case 3:
hash = (37 * hash) + ZLIB_DATA_FIELD_NUMBER;
hash = (53 * hash) + getZlibData().hashCode();
break;
case 4:
hash = (37 * hash) + LZMA_DATA_FIELD_NUMBER;
hash = (53 * hash) + getLzmaData().hashCode();
break;
case 5:
hash = (37 * hash) + OBSOLETE_BZIP2_DATA_FIELD_NUMBER;
hash = (53 * hash) + getOBSOLETEBzip2Data().hashCode();
break;
case 6:
hash = (37 * hash) + LZ4_DATA_FIELD_NUMBER;
hash = (53 * hash) + getLz4Data().hashCode();
break;
case 7:
hash = (37 * hash) + ZSTD_DATA_FIELD_NUMBER;
hash = (53 * hash) + getZstdData().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.baremaps.osm.binary.Fileformat.Blob prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code OSMPBF.Blob}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:OSMPBF.Blob)
org.apache.baremaps.osm.binary.Fileformat.BlobOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_Blob_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.baremaps.osm.binary.Fileformat.Blob.class, org.apache.baremaps.osm.binary.Fileformat.Blob.Builder.class);
}
// Construct using org.apache.baremaps.osm.binary.Fileformat.Blob.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
rawSize_ = 0;
dataCase_ = 0;
data_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_Blob_descriptor;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.Blob getDefaultInstanceForType() {
return org.apache.baremaps.osm.binary.Fileformat.Blob.getDefaultInstance();
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.Blob build() {
org.apache.baremaps.osm.binary.Fileformat.Blob result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.Blob buildPartial() {
org.apache.baremaps.osm.binary.Fileformat.Blob result = new org.apache.baremaps.osm.binary.Fileformat.Blob(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.apache.baremaps.osm.binary.Fileformat.Blob result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.rawSize_ = rawSize_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(org.apache.baremaps.osm.binary.Fileformat.Blob result) {
result.dataCase_ = dataCase_;
result.data_ = this.data_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.baremaps.osm.binary.Fileformat.Blob) {
return mergeFrom((org.apache.baremaps.osm.binary.Fileformat.Blob)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.baremaps.osm.binary.Fileformat.Blob other) {
if (other == org.apache.baremaps.osm.binary.Fileformat.Blob.getDefaultInstance()) return this;
if (other.hasRawSize()) {
setRawSize(other.getRawSize());
}
switch (other.getDataCase()) {
case RAW: {
setRaw(other.getRaw());
break;
}
case ZLIB_DATA: {
setZlibData(other.getZlibData());
break;
}
case LZMA_DATA: {
setLzmaData(other.getLzmaData());
break;
}
case OBSOLETE_BZIP2_DATA: {
setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data());
break;
}
case LZ4_DATA: {
setLz4Data(other.getLz4Data());
break;
}
case ZSTD_DATA: {
setZstdData(other.getZstdData());
break;
}
case DATA_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
data_ = input.readBytes();
dataCase_ = 1;
break;
} // case 10
case 16: {
rawSize_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 16
case 26: {
data_ = input.readBytes();
dataCase_ = 3;
break;
} // case 26
case 34: {
data_ = input.readBytes();
dataCase_ = 4;
break;
} // case 34
case 42: {
data_ = input.readBytes();
dataCase_ = 5;
break;
} // case 42
case 50: {
data_ = input.readBytes();
dataCase_ = 6;
break;
} // case 50
case 58: {
data_ = input.readBytes();
dataCase_ = 7;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int dataCase_ = 0;
private java.lang.Object data_;
public DataCase
getDataCase() {
return DataCase.forNumber(
dataCase_);
}
public Builder clearData() {
dataCase_ = 0;
data_ = null;
onChanged();
return this;
}
private int bitField0_;
private int rawSize_ ;
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return Whether the rawSize field is set.
*/
@java.lang.Override
public boolean hasRawSize() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return The rawSize.
*/
@java.lang.Override
public int getRawSize() {
return rawSize_;
}
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @param value The rawSize to set.
* @return This builder for chaining.
*/
public Builder setRawSize(int value) {
rawSize_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* When compressed, the uncompressed size
*
*
* optional int32 raw_size = 2;
* @return This builder for chaining.
*/
public Builder clearRawSize() {
bitField0_ = (bitField0_ & ~0x00000001);
rawSize_ = 0;
onChanged();
return this;
}
/**
*
* No compression
*
*
* bytes raw = 1;
* @return Whether the raw field is set.
*/
public boolean hasRaw() {
return dataCase_ == 1;
}
/**
*
* No compression
*
*
* bytes raw = 1;
* @return The raw.
*/
public com.google.protobuf.ByteString getRaw() {
if (dataCase_ == 1) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* No compression
*
*
* bytes raw = 1;
* @param value The raw to set.
* @return This builder for chaining.
*/
public Builder setRaw(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 1;
data_ = value;
onChanged();
return this;
}
/**
*
* No compression
*
*
* bytes raw = 1;
* @return This builder for chaining.
*/
public Builder clearRaw() {
if (dataCase_ == 1) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return Whether the zlibData field is set.
*/
public boolean hasZlibData() {
return dataCase_ == 3;
}
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return The zlibData.
*/
public com.google.protobuf.ByteString getZlibData() {
if (dataCase_ == 3) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @param value The zlibData to set.
* @return This builder for chaining.
*/
public Builder setZlibData(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 3;
data_ = value;
onChanged();
return this;
}
/**
*
* Possible compressed versions of the data.
*
*
* bytes zlib_data = 3;
* @return This builder for chaining.
*/
public Builder clearZlibData() {
if (dataCase_ == 3) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return Whether the lzmaData field is set.
*/
public boolean hasLzmaData() {
return dataCase_ == 4;
}
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return The lzmaData.
*/
public com.google.protobuf.ByteString getLzmaData() {
if (dataCase_ == 4) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @param value The lzmaData to set.
* @return This builder for chaining.
*/
public Builder setLzmaData(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 4;
data_ = value;
onChanged();
return this;
}
/**
*
* For LZMA compressed data (optional)
*
*
* bytes lzma_data = 4;
* @return This builder for chaining.
*/
public Builder clearLzmaData() {
if (dataCase_ == 4) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return Whether the oBSOLETEBzip2Data field is set.
*/
@java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
return dataCase_ == 5;
}
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return The oBSOLETEBzip2Data.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
if (dataCase_ == 5) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @param value The oBSOLETEBzip2Data to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 5;
data_ = value;
onChanged();
return this;
}
/**
*
* Formerly used for bzip2 compressed data. Deprecated in 2010.
*
*
* bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
* @deprecated OSMPBF.Blob.OBSOLETE_bzip2_data is deprecated.
* See fileformat.proto;l=44
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearOBSOLETEBzip2Data() {
if (dataCase_ == 5) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return Whether the lz4Data field is set.
*/
public boolean hasLz4Data() {
return dataCase_ == 6;
}
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return The lz4Data.
*/
public com.google.protobuf.ByteString getLz4Data() {
if (dataCase_ == 6) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @param value The lz4Data to set.
* @return This builder for chaining.
*/
public Builder setLz4Data(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 6;
data_ = value;
onChanged();
return this;
}
/**
*
* For LZ4 compressed data (optional)
*
*
* bytes lz4_data = 6;
* @return This builder for chaining.
*/
public Builder clearLz4Data() {
if (dataCase_ == 6) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return Whether the zstdData field is set.
*/
public boolean hasZstdData() {
return dataCase_ == 7;
}
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return The zstdData.
*/
public com.google.protobuf.ByteString getZstdData() {
if (dataCase_ == 7) {
return (com.google.protobuf.ByteString) data_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @param value The zstdData to set.
* @return This builder for chaining.
*/
public Builder setZstdData(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
dataCase_ = 7;
data_ = value;
onChanged();
return this;
}
/**
*
* For ZSTD compressed data (optional)
*
*
* bytes zstd_data = 7;
* @return This builder for chaining.
*/
public Builder clearZstdData() {
if (dataCase_ == 7) {
dataCase_ = 0;
data_ = null;
onChanged();
}
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Blob)
}
// @@protoc_insertion_point(class_scope:OSMPBF.Blob)
private static final org.apache.baremaps.osm.binary.Fileformat.Blob DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.baremaps.osm.binary.Fileformat.Blob();
}
public static org.apache.baremaps.osm.binary.Fileformat.Blob getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Blob parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.Blob getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BlobHeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader)
com.google.protobuf.MessageOrBuilder {
/**
* required string type = 1;
* @return Whether the type field is set.
*/
boolean hasType();
/**
* required string type = 1;
* @return The type.
*/
java.lang.String getType();
/**
* required string type = 1;
* @return The bytes for type.
*/
com.google.protobuf.ByteString
getTypeBytes();
/**
* optional bytes indexdata = 2;
* @return Whether the indexdata field is set.
*/
boolean hasIndexdata();
/**
* optional bytes indexdata = 2;
* @return The indexdata.
*/
com.google.protobuf.ByteString getIndexdata();
/**
* required int32 datasize = 3;
* @return Whether the datasize field is set.
*/
boolean hasDatasize();
/**
* required int32 datasize = 3;
* @return The datasize.
*/
int getDatasize();
}
/**
* Protobuf type {@code OSMPBF.BlobHeader}
*/
public static final class BlobHeader extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader)
BlobHeaderOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 0,
/* suffix= */ "",
BlobHeader.class.getName());
}
// Use BlobHeader.newBuilder() to construct.
private BlobHeader(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private BlobHeader() {
type_ = "";
indexdata_ = com.google.protobuf.ByteString.EMPTY;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.baremaps.osm.binary.Fileformat.BlobHeader.class, org.apache.baremaps.osm.binary.Fileformat.BlobHeader.Builder.class);
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object type_ = "";
/**
* required string type = 1;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required string type = 1;
* @return The type.
*/
@java.lang.Override
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
* required string type = 1;
* @return The bytes for type.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INDEXDATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes indexdata = 2;
* @return Whether the indexdata field is set.
*/
@java.lang.Override
public boolean hasIndexdata() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bytes indexdata = 2;
* @return The indexdata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIndexdata() {
return indexdata_;
}
public static final int DATASIZE_FIELD_NUMBER = 3;
private int datasize_ = 0;
/**
* required int32 datasize = 3;
* @return Whether the datasize field is set.
*/
@java.lang.Override
public boolean hasDatasize() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* required int32 datasize = 3;
* @return The datasize.
*/
@java.lang.Override
public int getDatasize() {
return datasize_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasType()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasDatasize()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, type_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBytes(2, indexdata_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt32(3, datasize_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, indexdata_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, datasize_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.baremaps.osm.binary.Fileformat.BlobHeader)) {
return super.equals(obj);
}
org.apache.baremaps.osm.binary.Fileformat.BlobHeader other = (org.apache.baremaps.osm.binary.Fileformat.BlobHeader) obj;
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (!getType()
.equals(other.getType())) return false;
}
if (hasIndexdata() != other.hasIndexdata()) return false;
if (hasIndexdata()) {
if (!getIndexdata()
.equals(other.getIndexdata())) return false;
}
if (hasDatasize() != other.hasDatasize()) return false;
if (hasDatasize()) {
if (getDatasize()
!= other.getDatasize()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (hasIndexdata()) {
hash = (37 * hash) + INDEXDATA_FIELD_NUMBER;
hash = (53 * hash) + getIndexdata().hashCode();
}
if (hasDatasize()) {
hash = (37 * hash) + DATASIZE_FIELD_NUMBER;
hash = (53 * hash) + getDatasize();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.baremaps.osm.binary.Fileformat.BlobHeader prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code OSMPBF.BlobHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader)
org.apache.baremaps.osm.binary.Fileformat.BlobHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_BlobHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.baremaps.osm.binary.Fileformat.BlobHeader.class, org.apache.baremaps.osm.binary.Fileformat.BlobHeader.Builder.class);
}
// Construct using org.apache.baremaps.osm.binary.Fileformat.BlobHeader.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = "";
indexdata_ = com.google.protobuf.ByteString.EMPTY;
datasize_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.baremaps.osm.binary.Fileformat.internal_static_OSMPBF_BlobHeader_descriptor;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.BlobHeader getDefaultInstanceForType() {
return org.apache.baremaps.osm.binary.Fileformat.BlobHeader.getDefaultInstance();
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.BlobHeader build() {
org.apache.baremaps.osm.binary.Fileformat.BlobHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.BlobHeader buildPartial() {
org.apache.baremaps.osm.binary.Fileformat.BlobHeader result = new org.apache.baremaps.osm.binary.Fileformat.BlobHeader(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.apache.baremaps.osm.binary.Fileformat.BlobHeader result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.indexdata_ = indexdata_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.datasize_ = datasize_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.baremaps.osm.binary.Fileformat.BlobHeader) {
return mergeFrom((org.apache.baremaps.osm.binary.Fileformat.BlobHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.baremaps.osm.binary.Fileformat.BlobHeader other) {
if (other == org.apache.baremaps.osm.binary.Fileformat.BlobHeader.getDefaultInstance()) return this;
if (other.hasType()) {
type_ = other.type_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasIndexdata()) {
setIndexdata(other.getIndexdata());
}
if (other.hasDatasize()) {
setDatasize(other.getDatasize());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasType()) {
return false;
}
if (!hasDatasize()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
type_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
indexdata_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
datasize_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
* required string type = 1;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required string type = 1;
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* required string type = 1;
* @return The bytes for type.
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* required string type = 1;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* required string type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* required string type = 1;
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes indexdata = 2;
* @return Whether the indexdata field is set.
*/
@java.lang.Override
public boolean hasIndexdata() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bytes indexdata = 2;
* @return The indexdata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIndexdata() {
return indexdata_;
}
/**
* optional bytes indexdata = 2;
* @param value The indexdata to set.
* @return This builder for chaining.
*/
public Builder setIndexdata(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
indexdata_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* optional bytes indexdata = 2;
* @return This builder for chaining.
*/
public Builder clearIndexdata() {
bitField0_ = (bitField0_ & ~0x00000002);
indexdata_ = getDefaultInstance().getIndexdata();
onChanged();
return this;
}
private int datasize_ ;
/**
* required int32 datasize = 3;
* @return Whether the datasize field is set.
*/
@java.lang.Override
public boolean hasDatasize() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* required int32 datasize = 3;
* @return The datasize.
*/
@java.lang.Override
public int getDatasize() {
return datasize_;
}
/**
* required int32 datasize = 3;
* @param value The datasize to set.
* @return This builder for chaining.
*/
public Builder setDatasize(int value) {
datasize_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* required int32 datasize = 3;
* @return This builder for chaining.
*/
public Builder clearDatasize() {
bitField0_ = (bitField0_ & ~0x00000004);
datasize_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader)
}
// @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader)
private static final org.apache.baremaps.osm.binary.Fileformat.BlobHeader DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.baremaps.osm.binary.Fileformat.BlobHeader();
}
public static org.apache.baremaps.osm.binary.Fileformat.BlobHeader getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BlobHeader parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.apache.baremaps.osm.binary.Fileformat.BlobHeader getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_OSMPBF_Blob_descriptor;
private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_OSMPBF_Blob_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_OSMPBF_BlobHeader_descriptor;
private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_OSMPBF_BlobHeader_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\020fileformat.proto\022\006OSMPBF\"\245\001\n\004Blob\022\020\n\010r" +
"aw_size\030\002 \001(\005\022\r\n\003raw\030\001 \001(\014H\000\022\023\n\tzlib_dat" +
"a\030\003 \001(\014H\000\022\023\n\tlzma_data\030\004 \001(\014H\000\022!\n\023OBSOLE" +
"TE_bzip2_data\030\005 \001(\014B\002\030\001H\000\022\022\n\010lz4_data\030\006 " +
"\001(\014H\000\022\023\n\tzstd_data\030\007 \001(\014H\000B\006\n\004data\"?\n\nBl" +
"obHeader\022\014\n\004type\030\001 \002(\t\022\021\n\tindexdata\030\002 \001(" +
"\014\022\020\n\010datasize\030\003 \002(\005B\"\n\036org.apache.barema" +
"ps.osm.binaryH\001"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_OSMPBF_Blob_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_OSMPBF_Blob_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_OSMPBF_Blob_descriptor,
new java.lang.String[] { "RawSize", "Raw", "ZlibData", "LzmaData", "OBSOLETEBzip2Data", "Lz4Data", "ZstdData", "Data", });
internal_static_OSMPBF_BlobHeader_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_OSMPBF_BlobHeader_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_OSMPBF_BlobHeader_descriptor,
new java.lang.String[] { "Type", "Indexdata", "Datasize", });
descriptor.resolveAllFeaturesImmutable();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy