InclusionProof.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_rekor.proto
// Protobuf Java Version: 4.30.2
package dev.sigstore.proto.rekor.v1;
/**
* <pre>
* InclusionProof is the proof returned from the transparency log. Can
* be used for offline or online verification against the log.
* </pre>
*
* Protobuf type {@code dev.sigstore.rekor.v1.InclusionProof}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:InclusionProof.java.pb.meta")
public final class InclusionProof extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:dev.sigstore.rekor.v1.InclusionProof)
InclusionProofOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 30,
/* patch= */ 2,
/* suffix= */ "",
InclusionProof.class.getName());
}
// Use InclusionProof.newBuilder() to construct.
private InclusionProof(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private InclusionProof() {
rootHash_ = com.google.protobuf.ByteString.EMPTY;
hashes_ = emptyList(com.google.protobuf.ByteString.class);
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_InclusionProof_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_InclusionProof_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.rekor.v1.InclusionProof.class, dev.sigstore.proto.rekor.v1.InclusionProof.Builder.class);
}
private int bitField0_;
public static final int LOG_INDEX_FIELD_NUMBER = 1;
private long logIndex_ = 0L;
/**
* <pre>
* The index of the entry in the tree it was written to.
* </pre>
*
* <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The logIndex.
*/
@java.lang.Override
public long getLogIndex() {
return logIndex_;
}
public static final int ROOT_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString rootHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* The hash digest stored at the root of the merkle tree at the time
* the proof was generated.
* </pre>
*
* <code>bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The rootHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRootHash() {
return rootHash_;
}
public static final int TREE_SIZE_FIELD_NUMBER = 3;
private long treeSize_ = 0L;
/**
* <pre>
* The size of the merkle tree at the time the proof was generated.
* </pre>
*
* <code>int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The treeSize.
*/
@java.lang.Override
public long getTreeSize() {
return treeSize_;
}
public static final int HASHES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> hashes_ =
emptyList(com.google.protobuf.ByteString.class);
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return A list containing the hashes.
*/
@java.lang.Override
public java.util.List<com.google.protobuf.ByteString>
getHashesList() {
return hashes_;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The count of hashes.
*/
public int getHashesCount() {
return hashes_.size();
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index of the element to return.
* @return The hashes at the given index.
*/
public com.google.protobuf.ByteString getHashes(int index) {
return hashes_.get(index);
}
public static final int CHECKPOINT_FIELD_NUMBER = 5;
private dev.sigstore.proto.rekor.v1.Checkpoint checkpoint_;
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the checkpoint field is set.
*/
@java.lang.Override
public boolean hasCheckpoint() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The checkpoint.
*/
@java.lang.Override
public dev.sigstore.proto.rekor.v1.Checkpoint getCheckpoint() {
return checkpoint_ == null ? dev.sigstore.proto.rekor.v1.Checkpoint.getDefaultInstance() : checkpoint_;
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.rekor.v1.CheckpointOrBuilder getCheckpointOrBuilder() {
return checkpoint_ == null ? dev.sigstore.proto.rekor.v1.Checkpoint.getDefaultInstance() : checkpoint_;
}
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 (logIndex_ != 0L) {
output.writeInt64(1, logIndex_);
}
if (!rootHash_.isEmpty()) {
output.writeBytes(2, rootHash_);
}
if (treeSize_ != 0L) {
output.writeInt64(3, treeSize_);
}
for (int i = 0; i < hashes_.size(); i++) {
output.writeBytes(4, hashes_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getCheckpoint());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (logIndex_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, logIndex_);
}
if (!rootHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, rootHash_);
}
if (treeSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, treeSize_);
}
{
int dataSize = 0;
for (int i = 0; i < hashes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(hashes_.get(i));
}
size += dataSize;
size += 1 * getHashesList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getCheckpoint());
}
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 dev.sigstore.proto.rekor.v1.InclusionProof)) {
return super.equals(obj);
}
dev.sigstore.proto.rekor.v1.InclusionProof other = (dev.sigstore.proto.rekor.v1.InclusionProof) obj;
if (getLogIndex()
!= other.getLogIndex()) return false;
if (!getRootHash()
.equals(other.getRootHash())) return false;
if (getTreeSize()
!= other.getTreeSize()) return false;
if (!getHashesList()
.equals(other.getHashesList())) return false;
if (hasCheckpoint() != other.hasCheckpoint()) return false;
if (hasCheckpoint()) {
if (!getCheckpoint()
.equals(other.getCheckpoint())) 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();
hash = (37 * hash) + LOG_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLogIndex());
hash = (37 * hash) + ROOT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getRootHash().hashCode();
hash = (37 * hash) + TREE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTreeSize());
if (getHashesCount() > 0) {
hash = (37 * hash) + HASHES_FIELD_NUMBER;
hash = (53 * hash) + getHashesList().hashCode();
}
if (hasCheckpoint()) {
hash = (37 * hash) + CHECKPOINT_FIELD_NUMBER;
hash = (53 * hash) + getCheckpoint().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof 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 dev.sigstore.proto.rekor.v1.InclusionProof parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof 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 dev.sigstore.proto.rekor.v1.InclusionProof parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.rekor.v1.InclusionProof 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(dev.sigstore.proto.rekor.v1.InclusionProof 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;
}
/**
* <pre>
* InclusionProof is the proof returned from the transparency log. Can
* be used for offline or online verification against the log.
* </pre>
*
* Protobuf type {@code dev.sigstore.rekor.v1.InclusionProof}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:dev.sigstore.rekor.v1.InclusionProof)
dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_InclusionProof_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_InclusionProof_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.rekor.v1.InclusionProof.class, dev.sigstore.proto.rekor.v1.InclusionProof.Builder.class);
}
// Construct using dev.sigstore.proto.rekor.v1.InclusionProof.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
internalGetCheckpointFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
logIndex_ = 0L;
rootHash_ = com.google.protobuf.ByteString.EMPTY;
treeSize_ = 0L;
hashes_ = emptyList(com.google.protobuf.ByteString.class);
checkpoint_ = null;
if (checkpointBuilder_ != null) {
checkpointBuilder_.dispose();
checkpointBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_InclusionProof_descriptor;
}
@java.lang.Override
public dev.sigstore.proto.rekor.v1.InclusionProof getDefaultInstanceForType() {
return dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance();
}
@java.lang.Override
public dev.sigstore.proto.rekor.v1.InclusionProof build() {
dev.sigstore.proto.rekor.v1.InclusionProof result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.sigstore.proto.rekor.v1.InclusionProof buildPartial() {
dev.sigstore.proto.rekor.v1.InclusionProof result = new dev.sigstore.proto.rekor.v1.InclusionProof(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.sigstore.proto.rekor.v1.InclusionProof result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.logIndex_ = logIndex_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.rootHash_ = rootHash_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.treeSize_ = treeSize_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
hashes_.makeImmutable();
result.hashes_ = hashes_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.checkpoint_ = checkpointBuilder_ == null
? checkpoint_
: checkpointBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.sigstore.proto.rekor.v1.InclusionProof) {
return mergeFrom((dev.sigstore.proto.rekor.v1.InclusionProof)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.sigstore.proto.rekor.v1.InclusionProof other) {
if (other == dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance()) return this;
if (other.getLogIndex() != 0L) {
setLogIndex(other.getLogIndex());
}
if (!other.getRootHash().isEmpty()) {
setRootHash(other.getRootHash());
}
if (other.getTreeSize() != 0L) {
setTreeSize(other.getTreeSize());
}
if (!other.hashes_.isEmpty()) {
if (hashes_.isEmpty()) {
hashes_ = other.hashes_;
hashes_.makeImmutable();
bitField0_ |= 0x00000008;
} else {
ensureHashesIsMutable();
hashes_.addAll(other.hashes_);
}
onChanged();
}
if (other.hasCheckpoint()) {
mergeCheckpoint(other.getCheckpoint());
}
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 8: {
logIndex_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
rootHash_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
treeSize_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
com.google.protobuf.ByteString v = input.readBytes();
ensureHashesIsMutable();
hashes_.add(v);
break;
} // case 34
case 42: {
input.readMessage(
internalGetCheckpointFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long logIndex_ ;
/**
* <pre>
* The index of the entry in the tree it was written to.
* </pre>
*
* <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The logIndex.
*/
@java.lang.Override
public long getLogIndex() {
return logIndex_;
}
/**
* <pre>
* The index of the entry in the tree it was written to.
* </pre>
*
* <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param value The logIndex to set.
* @return This builder for chaining.
*/
public Builder setLogIndex(long value) {
logIndex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The index of the entry in the tree it was written to.
* </pre>
*
* <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return This builder for chaining.
*/
public Builder clearLogIndex() {
bitField0_ = (bitField0_ & ~0x00000001);
logIndex_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString rootHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* The hash digest stored at the root of the merkle tree at the time
* the proof was generated.
* </pre>
*
* <code>bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The rootHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRootHash() {
return rootHash_;
}
/**
* <pre>
* The hash digest stored at the root of the merkle tree at the time
* the proof was generated.
* </pre>
*
* <code>bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @param value The rootHash to set.
* @return This builder for chaining.
*/
public Builder setRootHash(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
rootHash_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The hash digest stored at the root of the merkle tree at the time
* the proof was generated.
* </pre>
*
* <code>bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return This builder for chaining.
*/
public Builder clearRootHash() {
bitField0_ = (bitField0_ & ~0x00000002);
rootHash_ = getDefaultInstance().getRootHash();
onChanged();
return this;
}
private long treeSize_ ;
/**
* <pre>
* The size of the merkle tree at the time the proof was generated.
* </pre>
*
* <code>int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The treeSize.
*/
@java.lang.Override
public long getTreeSize() {
return treeSize_;
}
/**
* <pre>
* The size of the merkle tree at the time the proof was generated.
* </pre>
*
* <code>int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @param value The treeSize to set.
* @return This builder for chaining.
*/
public Builder setTreeSize(long value) {
treeSize_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* <pre>
* The size of the merkle tree at the time the proof was generated.
* </pre>
*
* <code>int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return This builder for chaining.
*/
public Builder clearTreeSize() {
bitField0_ = (bitField0_ & ~0x00000004);
treeSize_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Internal.ProtobufList<com.google.protobuf.ByteString> hashes_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureHashesIsMutable() {
if (!hashes_.isModifiable()) {
hashes_ = makeMutableCopy(hashes_);
}
bitField0_ |= 0x00000008;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return A list containing the hashes.
*/
public java.util.List<com.google.protobuf.ByteString>
getHashesList() {
hashes_.makeImmutable();
return hashes_;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The count of hashes.
*/
public int getHashesCount() {
return hashes_.size();
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index of the element to return.
* @return The hashes at the given index.
*/
public com.google.protobuf.ByteString getHashes(int index) {
return hashes_.get(index);
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index to set the value at.
* @param value The hashes to set.
* @return This builder for chaining.
*/
public Builder setHashes(
int index, com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureHashesIsMutable();
hashes_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param value The hashes to add.
* @return This builder for chaining.
*/
public Builder addHashes(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureHashesIsMutable();
hashes_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param values The hashes to add.
* @return This builder for chaining.
*/
public Builder addAllHashes(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureHashesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hashes_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* <pre>
* A list of hashes required to compute the inclusion proof, sorted
* in order from leaf to root.
* Note that leaf and root hashes are not included.
* The root hash is available separately in this message, and the
* leaf hash should be calculated by the client.
* </pre>
*
* <code>repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return This builder for chaining.
*/
public Builder clearHashes() {
hashes_ = emptyList(com.google.protobuf.ByteString.class);
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
private dev.sigstore.proto.rekor.v1.Checkpoint checkpoint_;
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.rekor.v1.Checkpoint, dev.sigstore.proto.rekor.v1.Checkpoint.Builder, dev.sigstore.proto.rekor.v1.CheckpointOrBuilder> checkpointBuilder_;
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the checkpoint field is set.
*/
public boolean hasCheckpoint() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The checkpoint.
*/
public dev.sigstore.proto.rekor.v1.Checkpoint getCheckpoint() {
if (checkpointBuilder_ == null) {
return checkpoint_ == null ? dev.sigstore.proto.rekor.v1.Checkpoint.getDefaultInstance() : checkpoint_;
} else {
return checkpointBuilder_.getMessage();
}
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setCheckpoint(dev.sigstore.proto.rekor.v1.Checkpoint value) {
if (checkpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
checkpoint_ = value;
} else {
checkpointBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setCheckpoint(
dev.sigstore.proto.rekor.v1.Checkpoint.Builder builderForValue) {
if (checkpointBuilder_ == null) {
checkpoint_ = builderForValue.build();
} else {
checkpointBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergeCheckpoint(dev.sigstore.proto.rekor.v1.Checkpoint value) {
if (checkpointBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
checkpoint_ != null &&
checkpoint_ != dev.sigstore.proto.rekor.v1.Checkpoint.getDefaultInstance()) {
getCheckpointBuilder().mergeFrom(value);
} else {
checkpoint_ = value;
}
} else {
checkpointBuilder_.mergeFrom(value);
}
if (checkpoint_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearCheckpoint() {
bitField0_ = (bitField0_ & ~0x00000010);
checkpoint_ = null;
if (checkpointBuilder_ != null) {
checkpointBuilder_.dispose();
checkpointBuilder_ = null;
}
onChanged();
return this;
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.rekor.v1.Checkpoint.Builder getCheckpointBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return internalGetCheckpointFieldBuilder().getBuilder();
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.rekor.v1.CheckpointOrBuilder getCheckpointOrBuilder() {
if (checkpointBuilder_ != null) {
return checkpointBuilder_.getMessageOrBuilder();
} else {
return checkpoint_ == null ?
dev.sigstore.proto.rekor.v1.Checkpoint.getDefaultInstance() : checkpoint_;
}
}
/**
* <pre>
* Signature of the tree head, as of the time of this proof was
* generated. See above info on 'Checkpoint' for more details.
* </pre>
*
* <code>.dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.rekor.v1.Checkpoint, dev.sigstore.proto.rekor.v1.Checkpoint.Builder, dev.sigstore.proto.rekor.v1.CheckpointOrBuilder>
internalGetCheckpointFieldBuilder() {
if (checkpointBuilder_ == null) {
checkpointBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.rekor.v1.Checkpoint, dev.sigstore.proto.rekor.v1.Checkpoint.Builder, dev.sigstore.proto.rekor.v1.CheckpointOrBuilder>(
getCheckpoint(),
getParentForChildren(),
isClean());
checkpoint_ = null;
}
return checkpointBuilder_;
}
// @@protoc_insertion_point(builder_scope:dev.sigstore.rekor.v1.InclusionProof)
}
// @@protoc_insertion_point(class_scope:dev.sigstore.rekor.v1.InclusionProof)
private static final dev.sigstore.proto.rekor.v1.InclusionProof DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.sigstore.proto.rekor.v1.InclusionProof();
}
public static dev.sigstore.proto.rekor.v1.InclusionProof getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<InclusionProof>
PARSER = new com.google.protobuf.AbstractParser<InclusionProof>() {
@java.lang.Override
public InclusionProof 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<InclusionProof> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<InclusionProof> getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.sigstore.proto.rekor.v1.InclusionProof getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}