Class TransparencyLogEntry.Builder

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

    public static final class TransparencyLogEntry.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<TransparencyLogEntry.Builder>
    implements TransparencyLogEntryOrBuilder
     TransparencyLogEntry captures all the details required from Rekor to
     reconstruct an entry, given that the payload is provided via other means.
     This type can easily be created from the existing response from Rekor.
     Future iterations could rely on Rekor returning the minimal set of
     attributes (excluding the payload) that are required for verifying the
     inclusion promise. The inclusion promise (called SignedEntryTimestamp in
     the response from Rekor) is similar to a Signed Certificate Timestamp
     as described here https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.
     
    Protobuf type dev.sigstore.rekor.v1.TransparencyLogEntry
    • 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<TransparencyLogEntry.Builder>
      • clear

        public TransparencyLogEntry.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<TransparencyLogEntry.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<TransparencyLogEntry.Builder>
      • getDefaultInstanceForType

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

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

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

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

        public TransparencyLogEntry.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<TransparencyLogEntry.Builder>
        Throws:
        java.io.IOException
      • getLogIndex

        public long getLogIndex()
         The global index of the entry, used when querying the log by index.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLogIndex in interface TransparencyLogEntryOrBuilder
        Returns:
        The logIndex.
      • setLogIndex

        public TransparencyLogEntry.Builder setLogIndex​(long value)
         The global index of the entry, used when querying the log by index.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The logIndex to set.
        Returns:
        This builder for chaining.
      • clearLogIndex

        public TransparencyLogEntry.Builder clearLogIndex()
         The global index of the entry, used when querying the log by index.
         
        int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • hasLogId

        public boolean hasLogId()
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasLogId in interface TransparencyLogEntryOrBuilder
        Returns:
        Whether the logId field is set.
      • getLogId

        public LogId getLogId()
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLogId in interface TransparencyLogEntryOrBuilder
        Returns:
        The logId.
      • setLogId

        public TransparencyLogEntry.Builder setLogId​(LogId value)
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
      • setLogId

        public TransparencyLogEntry.Builder setLogId​(LogId.Builder builderForValue)
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
      • mergeLogId

        public TransparencyLogEntry.Builder mergeLogId​(LogId value)
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
      • clearLogId

        public TransparencyLogEntry.Builder clearLogId()
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
      • getLogIdBuilder

        public LogId.Builder getLogIdBuilder()
         The unique identifier of the log.
         
        .dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];
      • hasKindVersion

        public boolean hasKindVersion()
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasKindVersion in interface TransparencyLogEntryOrBuilder
        Returns:
        Whether the kindVersion field is set.
      • getKindVersion

        public KindVersion getKindVersion()
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getKindVersion in interface TransparencyLogEntryOrBuilder
        Returns:
        The kindVersion.
      • setKindVersion

        public TransparencyLogEntry.Builder setKindVersion​(KindVersion value)
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
      • setKindVersion

        public TransparencyLogEntry.Builder setKindVersion​(KindVersion.Builder builderForValue)
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
      • mergeKindVersion

        public TransparencyLogEntry.Builder mergeKindVersion​(KindVersion value)
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
      • clearKindVersion

        public TransparencyLogEntry.Builder clearKindVersion()
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
      • getKindVersionBuilder

        public KindVersion.Builder getKindVersionBuilder()
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
      • getKindVersionOrBuilder

        public KindVersionOrBuilder getKindVersionOrBuilder()
         The kind (type) and version of the object associated with this
         entry. These values are required to construct the entry during
         verification.
         
        .dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getKindVersionOrBuilder in interface TransparencyLogEntryOrBuilder
      • getIntegratedTime

        public long getIntegratedTime()
         The UNIX timestamp from the log when the entry was persisted.
         
        int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getIntegratedTime in interface TransparencyLogEntryOrBuilder
        Returns:
        The integratedTime.
      • setIntegratedTime

        public TransparencyLogEntry.Builder setIntegratedTime​(long value)
         The UNIX timestamp from the log when the entry was persisted.
         
        int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The integratedTime to set.
        Returns:
        This builder for chaining.
      • clearIntegratedTime

        public TransparencyLogEntry.Builder clearIntegratedTime()
         The UNIX timestamp from the log when the entry was persisted.
         
        int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • hasInclusionPromise

        public boolean hasInclusionPromise()
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
        Specified by:
        hasInclusionPromise in interface TransparencyLogEntryOrBuilder
        Returns:
        Whether the inclusionPromise field is set.
      • getInclusionPromise

        public InclusionPromise getInclusionPromise()
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
        Specified by:
        getInclusionPromise in interface TransparencyLogEntryOrBuilder
        Returns:
        The inclusionPromise.
      • setInclusionPromise

        public TransparencyLogEntry.Builder setInclusionPromise​(InclusionPromise value)
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
      • setInclusionPromise

        public TransparencyLogEntry.Builder setInclusionPromise​(InclusionPromise.Builder builderForValue)
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
      • mergeInclusionPromise

        public TransparencyLogEntry.Builder mergeInclusionPromise​(InclusionPromise value)
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
      • clearInclusionPromise

        public TransparencyLogEntry.Builder clearInclusionPromise()
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
      • getInclusionPromiseBuilder

        public InclusionPromise.Builder getInclusionPromiseBuilder()
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
      • getInclusionPromiseOrBuilder

        public InclusionPromiseOrBuilder getInclusionPromiseOrBuilder()
         The inclusion promise/signed entry timestamp from the log.
         Required for v0.1 bundles, and MUST be verified.
         Optional for >= v0.2 bundles, and SHOULD be verified when present.
         Also may be used as a signed timestamp.
         
        .dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;
        Specified by:
        getInclusionPromiseOrBuilder in interface TransparencyLogEntryOrBuilder
      • hasInclusionProof

        public boolean hasInclusionProof()
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasInclusionProof in interface TransparencyLogEntryOrBuilder
        Returns:
        Whether the inclusionProof field is set.
      • getInclusionProof

        public InclusionProof getInclusionProof()
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getInclusionProof in interface TransparencyLogEntryOrBuilder
        Returns:
        The inclusionProof.
      • setInclusionProof

        public TransparencyLogEntry.Builder setInclusionProof​(InclusionProof value)
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
      • setInclusionProof

        public TransparencyLogEntry.Builder setInclusionProof​(InclusionProof.Builder builderForValue)
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
      • mergeInclusionProof

        public TransparencyLogEntry.Builder mergeInclusionProof​(InclusionProof value)
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
      • clearInclusionProof

        public TransparencyLogEntry.Builder clearInclusionProof()
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
      • getInclusionProofBuilder

        public InclusionProof.Builder getInclusionProofBuilder()
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
      • getInclusionProofOrBuilder

        public InclusionProofOrBuilder getInclusionProofOrBuilder()
         The inclusion proof can be used for offline or online verification
         that the entry was appended to the log, and that the log has not been
         altered.
         
        .dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getInclusionProofOrBuilder in interface TransparencyLogEntryOrBuilder
      • getCanonicalizedBody

        public com.google.protobuf.ByteString getCanonicalizedBody()
         Optional. The canonicalized transparency log entry, used to
         reconstruct the Signed Entry Timestamp (SET) during verification.
         The contents of this field are the same as the `body` field in
         a Rekor response, meaning that it does **not** include the "full"
         canonicalized form (of log index, ID, etc.) which are
         exposed as separate fields. The verifier is responsible for
         combining the `canonicalized_body`, `log_index`, `log_id`,
         and `integrated_time` into the payload that the SET's signature
         is generated over.
         This field is intended to be used in cases where the SET cannot be
         produced determinisitically (e.g. inconsistent JSON field ordering,
         differing whitespace, etc).
        
         If set, clients MUST verify that the signature referenced in the
         `canonicalized_body` matches the signature provided in the
         `Bundle.content`.
         If not set, clients are responsible for constructing an equivalent
         payload from other sources to verify the signature.
         
        bytes canonicalized_body = 7;
        Specified by:
        getCanonicalizedBody in interface TransparencyLogEntryOrBuilder
        Returns:
        The canonicalizedBody.
      • setCanonicalizedBody

        public TransparencyLogEntry.Builder setCanonicalizedBody​(com.google.protobuf.ByteString value)
         Optional. The canonicalized transparency log entry, used to
         reconstruct the Signed Entry Timestamp (SET) during verification.
         The contents of this field are the same as the `body` field in
         a Rekor response, meaning that it does **not** include the "full"
         canonicalized form (of log index, ID, etc.) which are
         exposed as separate fields. The verifier is responsible for
         combining the `canonicalized_body`, `log_index`, `log_id`,
         and `integrated_time` into the payload that the SET's signature
         is generated over.
         This field is intended to be used in cases where the SET cannot be
         produced determinisitically (e.g. inconsistent JSON field ordering,
         differing whitespace, etc).
        
         If set, clients MUST verify that the signature referenced in the
         `canonicalized_body` matches the signature provided in the
         `Bundle.content`.
         If not set, clients are responsible for constructing an equivalent
         payload from other sources to verify the signature.
         
        bytes canonicalized_body = 7;
        Parameters:
        value - The canonicalizedBody to set.
        Returns:
        This builder for chaining.
      • clearCanonicalizedBody

        public TransparencyLogEntry.Builder clearCanonicalizedBody()
         Optional. The canonicalized transparency log entry, used to
         reconstruct the Signed Entry Timestamp (SET) during verification.
         The contents of this field are the same as the `body` field in
         a Rekor response, meaning that it does **not** include the "full"
         canonicalized form (of log index, ID, etc.) which are
         exposed as separate fields. The verifier is responsible for
         combining the `canonicalized_body`, `log_index`, `log_id`,
         and `integrated_time` into the payload that the SET's signature
         is generated over.
         This field is intended to be used in cases where the SET cannot be
         produced determinisitically (e.g. inconsistent JSON field ordering,
         differing whitespace, etc).
        
         If set, clients MUST verify that the signature referenced in the
         `canonicalized_body` matches the signature provided in the
         `Bundle.content`.
         If not set, clients are responsible for constructing an equivalent
         payload from other sources to verify the signature.
         
        bytes canonicalized_body = 7;
        Returns:
        This builder for chaining.