Class InclusionProof.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, InclusionProofOrBuilder, java.lang.Cloneable
    Enclosing class:
    InclusionProof

    public static final class InclusionProof.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<InclusionProof.Builder>
    implements InclusionProofOrBuilder
     InclusionProof is the proof returned from the transparency log. Can
     be used for offline or online verification against the log.
     
    Protobuf type dev.sigstore.rekor.v1.InclusionProof
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      InclusionProof.Builder addAllHashes​(java.lang.Iterable<? extends com.google.protobuf.ByteString> values)
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      InclusionProof.Builder addHashes​(com.google.protobuf.ByteString value)
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      InclusionProof build()  
      InclusionProof buildPartial()  
      InclusionProof.Builder clear()  
      InclusionProof.Builder clearCheckpoint()
      Signature of the tree head, as of the time of this proof was generated.
      InclusionProof.Builder clearHashes()
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      InclusionProof.Builder clearLogIndex()
      The index of the entry in the tree it was written to.
      InclusionProof.Builder clearRootHash()
      The hash digest stored at the root of the merkle tree at the time the proof was generated.
      InclusionProof.Builder clearTreeSize()
      The size of the merkle tree at the time the proof was generated.
      Checkpoint getCheckpoint()
      Signature of the tree head, as of the time of this proof was generated.
      Checkpoint.Builder getCheckpointBuilder()
      Signature of the tree head, as of the time of this proof was generated.
      CheckpointOrBuilder getCheckpointOrBuilder()
      Signature of the tree head, as of the time of this proof was generated.
      InclusionProof getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      com.google.protobuf.ByteString getHashes​(int index)
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      int getHashesCount()
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      java.util.List<com.google.protobuf.ByteString> getHashesList()
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      long getLogIndex()
      The index of the entry in the tree it was written to.
      com.google.protobuf.ByteString getRootHash()
      The hash digest stored at the root of the merkle tree at the time the proof was generated.
      long getTreeSize()
      The size of the merkle tree at the time the proof was generated.
      boolean hasCheckpoint()
      Signature of the tree head, as of the time of this proof was generated.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      InclusionProof.Builder mergeCheckpoint​(Checkpoint value)
      Signature of the tree head, as of the time of this proof was generated.
      InclusionProof.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      InclusionProof.Builder mergeFrom​(com.google.protobuf.Message other)  
      InclusionProof.Builder mergeFrom​(InclusionProof other)  
      InclusionProof.Builder setCheckpoint​(Checkpoint value)
      Signature of the tree head, as of the time of this proof was generated.
      InclusionProof.Builder setCheckpoint​(Checkpoint.Builder builderForValue)
      Signature of the tree head, as of the time of this proof was generated.
      InclusionProof.Builder setHashes​(int index, com.google.protobuf.ByteString value)
      A list of hashes required to compute the inclusion proof, sorted in order from leaf to root.
      InclusionProof.Builder setLogIndex​(long value)
      The index of the entry in the tree it was written to.
      InclusionProof.Builder setRootHash​(com.google.protobuf.ByteString value)
      The hash digest stored at the root of the merkle tree at the time the proof was generated.
      InclusionProof.Builder setTreeSize​(long value)
      The size of the merkle tree at the time the proof was generated.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<InclusionProof.Builder>
      • clear

        public InclusionProof.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessage.Builder<InclusionProof.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<InclusionProof.Builder>
      • getDefaultInstanceForType

        public InclusionProof getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public InclusionProof build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public InclusionProof buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • mergeFrom

        public InclusionProof.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<InclusionProof.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.Builder<InclusionProof.Builder>
      • mergeFrom

        public InclusionProof.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<InclusionProof.Builder>
        Throws:
        java.io.IOException
      • getLogIndex

        public long getLogIndex()
         The index of the entry in the tree it was written to.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLogIndex in interface InclusionProofOrBuilder
        Returns:
        The logIndex.
      • setLogIndex

        public InclusionProof.Builder setLogIndex​(long value)
         The index of the entry in the tree it was written to.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The logIndex to set.
        Returns:
        This builder for chaining.
      • clearLogIndex

        public InclusionProof.Builder clearLogIndex()
         The index of the entry in the tree it was written to.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getRootHash

        public com.google.protobuf.ByteString getRootHash()
         The hash digest stored at the root of the merkle tree at the time
         the proof was generated.
         
        bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRootHash in interface InclusionProofOrBuilder
        Returns:
        The rootHash.
      • setRootHash

        public InclusionProof.Builder setRootHash​(com.google.protobuf.ByteString value)
         The hash digest stored at the root of the merkle tree at the time
         the proof was generated.
         
        bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The rootHash to set.
        Returns:
        This builder for chaining.
      • clearRootHash

        public InclusionProof.Builder clearRootHash()
         The hash digest stored at the root of the merkle tree at the time
         the proof was generated.
         
        bytes root_hash = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getTreeSize

        public long getTreeSize()
         The size of the merkle tree at the time the proof was generated.
         
        int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTreeSize in interface InclusionProofOrBuilder
        Returns:
        The treeSize.
      • setTreeSize

        public InclusionProof.Builder setTreeSize​(long value)
         The size of the merkle tree at the time the proof was generated.
         
        int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The treeSize to set.
        Returns:
        This builder for chaining.
      • clearTreeSize

        public InclusionProof.Builder clearTreeSize()
         The size of the merkle tree at the time the proof was generated.
         
        int64 tree_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getHashesList

        public java.util.List<com.google.protobuf.ByteString> getHashesList()
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getHashesList in interface InclusionProofOrBuilder
        Returns:
        A list containing the hashes.
      • getHashesCount

        public int getHashesCount()
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getHashesCount in interface InclusionProofOrBuilder
        Returns:
        The count of hashes.
      • getHashes

        public com.google.protobuf.ByteString getHashes​(int index)
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getHashes in interface InclusionProofOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The hashes at the given index.
      • setHashes

        public InclusionProof.Builder setHashes​(int index,
                                                com.google.protobuf.ByteString value)
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        index - The index to set the value at.
        value - The hashes to set.
        Returns:
        This builder for chaining.
      • addHashes

        public InclusionProof.Builder addHashes​(com.google.protobuf.ByteString value)
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The hashes to add.
        Returns:
        This builder for chaining.
      • addAllHashes

        public InclusionProof.Builder addAllHashes​(java.lang.Iterable<? extends com.google.protobuf.ByteString> values)
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        values - The hashes to add.
        Returns:
        This builder for chaining.
      • clearHashes

        public InclusionProof.Builder clearHashes()
         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.
         
        repeated bytes hashes = 4 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • hasCheckpoint

        public boolean hasCheckpoint()
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasCheckpoint in interface InclusionProofOrBuilder
        Returns:
        Whether the checkpoint field is set.
      • getCheckpoint

        public Checkpoint getCheckpoint()
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCheckpoint in interface InclusionProofOrBuilder
        Returns:
        The checkpoint.
      • setCheckpoint

        public InclusionProof.Builder setCheckpoint​(Checkpoint value)
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
      • setCheckpoint

        public InclusionProof.Builder setCheckpoint​(Checkpoint.Builder builderForValue)
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
      • mergeCheckpoint

        public InclusionProof.Builder mergeCheckpoint​(Checkpoint value)
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
      • clearCheckpoint

        public InclusionProof.Builder clearCheckpoint()
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
      • getCheckpointBuilder

        public Checkpoint.Builder getCheckpointBuilder()
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
      • getCheckpointOrBuilder

        public CheckpointOrBuilder getCheckpointOrBuilder()
         Signature of the tree head, as of the time of this proof was
         generated. See above info on 'Checkpoint' for more details.
         
        .dev.sigstore.rekor.v1.Checkpoint checkpoint = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCheckpointOrBuilder in interface InclusionProofOrBuilder