Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: confio/proofs.proto
package tech.confio.ics23;
/**
*
*InnerSpec contains all store-specific structure info to determine if two proofs from a
*given store are neighbors.
*This enables:
*isLeftMost(spec: InnerSpec, op: InnerOp)
*isRightMost(spec: InnerSpec, op: InnerOp)
*isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
*
*
* Protobuf type {@code ics23.InnerSpec}
*/
public final class InnerSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:ics23.InnerSpec)
InnerSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use InnerSpec.newBuilder() to construct.
private InnerSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InnerSpec() {
childOrder_ = java.util.Collections.emptyList();
childSize_ = 0;
minPrefixLength_ = 0;
maxPrefixLength_ = 0;
emptyChild_ = com.google.protobuf.ByteString.EMPTY;
hash_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InnerSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
childOrder_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
childOrder_.add(input.readInt32());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
childOrder_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
childOrder_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 16: {
childSize_ = input.readInt32();
break;
}
case 24: {
minPrefixLength_ = input.readInt32();
break;
}
case 32: {
maxPrefixLength_ = input.readInt32();
break;
}
case 42: {
emptyChild_ = input.readBytes();
break;
}
case 48: {
int rawValue = input.readEnum();
hash_ = rawValue;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
childOrder_ = java.util.Collections.unmodifiableList(childOrder_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tech.confio.ics23.Proofs.internal_static_ics23_InnerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tech.confio.ics23.Proofs.internal_static_ics23_InnerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tech.confio.ics23.InnerSpec.class, tech.confio.ics23.InnerSpec.Builder.class);
}
private int bitField0_;
public static final int CHILD_ORDER_FIELD_NUMBER = 1;
private java.util.List childOrder_;
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
*
* repeated int32 child_order = 1;
*/
public int getChildOrderCount() {
return childOrder_.size();
}
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
*
* repeated int32 child_order = 1;
*/
public int getChildOrder(int index) {
return childOrder_.get(index);
}
private int childOrderMemoizedSerializedSize = -1;
public static final int CHILD_SIZE_FIELD_NUMBER = 2;
private int childSize_;
/**
* int32 child_size = 2;
*/
public int getChildSize() {
return childSize_;
}
public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER = 3;
private int minPrefixLength_;
/**
* int32 min_prefix_length = 3;
*/
public int getMinPrefixLength() {
return minPrefixLength_;
}
public static final int MAX_PREFIX_LENGTH_FIELD_NUMBER = 4;
private int maxPrefixLength_;
/**
* int32 max_prefix_length = 4;
*/
public int getMaxPrefixLength() {
return maxPrefixLength_;
}
public static final int EMPTY_CHILD_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString emptyChild_;
/**
*
* empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
*
*
* bytes empty_child = 5;
*/
public com.google.protobuf.ByteString getEmptyChild() {
return emptyChild_;
}
public static final int HASH_FIELD_NUMBER = 6;
private int hash_;
/**
*
* hash is the algorithm that must be used for each InnerOp
*
*
* .ics23.HashOp hash = 6;
*/
public int getHashValue() {
return hash_;
}
/**
*
* hash is the algorithm that must be used for each InnerOp
*
*
* .ics23.HashOp hash = 6;
*/
public tech.confio.ics23.HashOp getHash() {
@SuppressWarnings("deprecation")
tech.confio.ics23.HashOp result = tech.confio.ics23.HashOp.valueOf(hash_);
return result == null ? tech.confio.ics23.HashOp.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getChildOrderList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(childOrderMemoizedSerializedSize);
}
for (int i = 0; i < childOrder_.size(); i++) {
output.writeInt32NoTag(childOrder_.get(i));
}
if (childSize_ != 0) {
output.writeInt32(2, childSize_);
}
if (minPrefixLength_ != 0) {
output.writeInt32(3, minPrefixLength_);
}
if (maxPrefixLength_ != 0) {
output.writeInt32(4, maxPrefixLength_);
}
if (!emptyChild_.isEmpty()) {
output.writeBytes(5, emptyChild_);
}
if (hash_ != tech.confio.ics23.HashOp.NO_HASH.getNumber()) {
output.writeEnum(6, hash_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < childOrder_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(childOrder_.get(i));
}
size += dataSize;
if (!getChildOrderList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
childOrderMemoizedSerializedSize = dataSize;
}
if (childSize_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, childSize_);
}
if (minPrefixLength_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, minPrefixLength_);
}
if (maxPrefixLength_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, maxPrefixLength_);
}
if (!emptyChild_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, emptyChild_);
}
if (hash_ != tech.confio.ics23.HashOp.NO_HASH.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, hash_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tech.confio.ics23.InnerSpec)) {
return super.equals(obj);
}
tech.confio.ics23.InnerSpec other = (tech.confio.ics23.InnerSpec) obj;
boolean result = true;
result = result && getChildOrderList()
.equals(other.getChildOrderList());
result = result && (getChildSize()
== other.getChildSize());
result = result && (getMinPrefixLength()
== other.getMinPrefixLength());
result = result && (getMaxPrefixLength()
== other.getMaxPrefixLength());
result = result && getEmptyChild()
.equals(other.getEmptyChild());
result = result && hash_ == other.hash_;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getChildOrderCount() > 0) {
hash = (37 * hash) + CHILD_ORDER_FIELD_NUMBER;
hash = (53 * hash) + getChildOrderList().hashCode();
}
hash = (37 * hash) + CHILD_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getChildSize();
hash = (37 * hash) + MIN_PREFIX_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + getMinPrefixLength();
hash = (37 * hash) + MAX_PREFIX_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + getMaxPrefixLength();
hash = (37 * hash) + EMPTY_CHILD_FIELD_NUMBER;
hash = (53 * hash) + getEmptyChild().hashCode();
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + hash_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tech.confio.ics23.InnerSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.confio.ics23.InnerSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.confio.ics23.InnerSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.confio.ics23.InnerSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.confio.ics23.InnerSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tech.confio.ics23.InnerSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tech.confio.ics23.InnerSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tech.confio.ics23.InnerSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static tech.confio.ics23.InnerSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tech.confio.ics23.InnerSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static tech.confio.ics23.InnerSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tech.confio.ics23.InnerSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tech.confio.ics23.InnerSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*InnerSpec contains all store-specific structure info to determine if two proofs from a
*given store are neighbors.
*This enables:
*isLeftMost(spec: InnerSpec, op: InnerOp)
*isRightMost(spec: InnerSpec, op: InnerOp)
*isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
*
*
* Protobuf type {@code ics23.InnerSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:ics23.InnerSpec)
tech.confio.ics23.InnerSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tech.confio.ics23.Proofs.internal_static_ics23_InnerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tech.confio.ics23.Proofs.internal_static_ics23_InnerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tech.confio.ics23.InnerSpec.class, tech.confio.ics23.InnerSpec.Builder.class);
}
// Construct using tech.confio.ics23.InnerSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
childOrder_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
childSize_ = 0;
minPrefixLength_ = 0;
maxPrefixLength_ = 0;
emptyChild_ = com.google.protobuf.ByteString.EMPTY;
hash_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tech.confio.ics23.Proofs.internal_static_ics23_InnerSpec_descriptor;
}
@java.lang.Override
public tech.confio.ics23.InnerSpec getDefaultInstanceForType() {
return tech.confio.ics23.InnerSpec.getDefaultInstance();
}
@java.lang.Override
public tech.confio.ics23.InnerSpec build() {
tech.confio.ics23.InnerSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tech.confio.ics23.InnerSpec buildPartial() {
tech.confio.ics23.InnerSpec result = new tech.confio.ics23.InnerSpec(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
childOrder_ = java.util.Collections.unmodifiableList(childOrder_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.childOrder_ = childOrder_;
result.childSize_ = childSize_;
result.minPrefixLength_ = minPrefixLength_;
result.maxPrefixLength_ = maxPrefixLength_;
result.emptyChild_ = emptyChild_;
result.hash_ = hash_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tech.confio.ics23.InnerSpec) {
return mergeFrom((tech.confio.ics23.InnerSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tech.confio.ics23.InnerSpec other) {
if (other == tech.confio.ics23.InnerSpec.getDefaultInstance()) return this;
if (!other.childOrder_.isEmpty()) {
if (childOrder_.isEmpty()) {
childOrder_ = other.childOrder_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureChildOrderIsMutable();
childOrder_.addAll(other.childOrder_);
}
onChanged();
}
if (other.getChildSize() != 0) {
setChildSize(other.getChildSize());
}
if (other.getMinPrefixLength() != 0) {
setMinPrefixLength(other.getMinPrefixLength());
}
if (other.getMaxPrefixLength() != 0) {
setMaxPrefixLength(other.getMaxPrefixLength());
}
if (other.getEmptyChild() != com.google.protobuf.ByteString.EMPTY) {
setEmptyChild(other.getEmptyChild());
}
if (other.hash_ != 0) {
setHashValue(other.getHashValue());
}
this.mergeUnknownFields(other.unknownFields);
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 {
tech.confio.ics23.InnerSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tech.confio.ics23.InnerSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List childOrder_ = java.util.Collections.emptyList();
private void ensureChildOrderIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
childOrder_ = new java.util.ArrayList(childOrder_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
*
* repeated int32 child_order = 1;
*/
public int getChildOrderCount() {
return childOrder_.size();
}
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
*
* repeated int32 child_order = 1;
*/
public int getChildOrder(int index) {
return childOrder_.get(index);
}
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
*
* repeated int32 child_order = 1;
*/
public Builder setChildOrder(
int index, int value) {
ensureChildOrderIsMutable();
childOrder_.set(index, value);
onChanged();
return this;
}
/**
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*
* Child order is the ordering of the children node, must count from 0
* iavl tree is [0, 1] (left then right)
* merk is [0, 2, 1] (left, right, here)
*