VerificationMaterial.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_bundle.proto
// Protobuf Java Version: 4.30.2
package dev.sigstore.proto.bundle.v1;
/**
* <pre>
* VerificationMaterial captures details on the materials used to verify
* signatures. This message may be embedded in a DSSE envelope as a signature
* extension. Specifically, the `ext` field of the extension will expect this
* message when the signature extension is for Sigstore. This is identified by
* the `kind` field in the extension, which must be set to
* application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore.
* When used as a DSSE extension, if the `public_key` field is used to indicate
* the key identifier, it MUST match the `keyid` field of the signature the
* extension is attached to.
* </pre>
*
* Protobuf type {@code dev.sigstore.bundle.v1.VerificationMaterial}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:VerificationMaterial.java.pb.meta")
public final class VerificationMaterial extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:dev.sigstore.bundle.v1.VerificationMaterial)
VerificationMaterialOrBuilder {
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= */ "",
VerificationMaterial.class.getName());
}
// Use VerificationMaterial.newBuilder() to construct.
private VerificationMaterial(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private VerificationMaterial() {
tlogEntries_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.bundle.v1.BundleProto.internal_static_dev_sigstore_bundle_v1_VerificationMaterial_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.bundle.v1.BundleProto.internal_static_dev_sigstore_bundle_v1_VerificationMaterial_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.bundle.v1.VerificationMaterial.class, dev.sigstore.proto.bundle.v1.VerificationMaterial.Builder.class);
}
private int bitField0_;
private int contentCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object content_;
public enum ContentCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
PUBLIC_KEY(1),
X509_CERTIFICATE_CHAIN(2),
CERTIFICATE(5),
CONTENT_NOT_SET(0);
private final int value;
private ContentCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ContentCase valueOf(int value) {
return forNumber(value);
}
public static ContentCase forNumber(int value) {
switch (value) {
case 1: return PUBLIC_KEY;
case 2: return X509_CERTIFICATE_CHAIN;
case 5: return CERTIFICATE;
case 0: return CONTENT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public static final int PUBLIC_KEY_FIELD_NUMBER = 1;
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the publicKey field is set.
*/
@java.lang.Override
public boolean hasPublicKey() {
return contentCase_ == 1;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The publicKey.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.PublicKeyIdentifier getPublicKey() {
if (contentCase_ == 1) {
return (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_;
}
return dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.PublicKeyIdentifierOrBuilder getPublicKeyOrBuilder() {
if (contentCase_ == 1) {
return (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_;
}
return dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
}
public static final int X509_CERTIFICATE_CHAIN_FIELD_NUMBER = 2;
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the x509CertificateChain field is set.
*/
@java.lang.Override
public boolean hasX509CertificateChain() {
return contentCase_ == 2;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The x509CertificateChain.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateChain getX509CertificateChain() {
if (contentCase_ == 2) {
return (dev.sigstore.proto.common.v1.X509CertificateChain) content_;
}
return dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder getX509CertificateChainOrBuilder() {
if (contentCase_ == 2) {
return (dev.sigstore.proto.common.v1.X509CertificateChain) content_;
}
return dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
}
public static final int CERTIFICATE_FIELD_NUMBER = 5;
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the certificate field is set.
*/
@java.lang.Override
public boolean hasCertificate() {
return contentCase_ == 5;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The certificate.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509Certificate getCertificate() {
if (contentCase_ == 5) {
return (dev.sigstore.proto.common.v1.X509Certificate) content_;
}
return dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateOrBuilder getCertificateOrBuilder() {
if (contentCase_ == 5) {
return (dev.sigstore.proto.common.v1.X509Certificate) content_;
}
return dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
}
public static final int TLOG_ENTRIES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List<dev.sigstore.proto.rekor.v1.TransparencyLogEntry> tlogEntries_;
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
@java.lang.Override
public java.util.List<dev.sigstore.proto.rekor.v1.TransparencyLogEntry> getTlogEntriesList() {
return tlogEntries_;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
@java.lang.Override
public java.util.List<? extends dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder>
getTlogEntriesOrBuilderList() {
return tlogEntries_;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
@java.lang.Override
public int getTlogEntriesCount() {
return tlogEntries_.size();
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
@java.lang.Override
public dev.sigstore.proto.rekor.v1.TransparencyLogEntry getTlogEntries(int index) {
return tlogEntries_.get(index);
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
@java.lang.Override
public dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder getTlogEntriesOrBuilder(
int index) {
return tlogEntries_.get(index);
}
public static final int TIMESTAMP_VERIFICATION_DATA_FIELD_NUMBER = 4;
private dev.sigstore.proto.bundle.v1.TimestampVerificationData timestampVerificationData_;
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
* @return Whether the timestampVerificationData field is set.
*/
@java.lang.Override
public boolean hasTimestampVerificationData() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
* @return The timestampVerificationData.
*/
@java.lang.Override
public dev.sigstore.proto.bundle.v1.TimestampVerificationData getTimestampVerificationData() {
return timestampVerificationData_ == null ? dev.sigstore.proto.bundle.v1.TimestampVerificationData.getDefaultInstance() : timestampVerificationData_;
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
@java.lang.Override
public dev.sigstore.proto.bundle.v1.TimestampVerificationDataOrBuilder getTimestampVerificationDataOrBuilder() {
return timestampVerificationData_ == null ? dev.sigstore.proto.bundle.v1.TimestampVerificationData.getDefaultInstance() : timestampVerificationData_;
}
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 (contentCase_ == 1) {
output.writeMessage(1, (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_);
}
if (contentCase_ == 2) {
output.writeMessage(2, (dev.sigstore.proto.common.v1.X509CertificateChain) content_);
}
for (int i = 0; i < tlogEntries_.size(); i++) {
output.writeMessage(3, tlogEntries_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getTimestampVerificationData());
}
if (contentCase_ == 5) {
output.writeMessage(5, (dev.sigstore.proto.common.v1.X509Certificate) content_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (contentCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_);
}
if (contentCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (dev.sigstore.proto.common.v1.X509CertificateChain) content_);
}
for (int i = 0; i < tlogEntries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, tlogEntries_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getTimestampVerificationData());
}
if (contentCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (dev.sigstore.proto.common.v1.X509Certificate) content_);
}
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.bundle.v1.VerificationMaterial)) {
return super.equals(obj);
}
dev.sigstore.proto.bundle.v1.VerificationMaterial other = (dev.sigstore.proto.bundle.v1.VerificationMaterial) obj;
if (!getTlogEntriesList()
.equals(other.getTlogEntriesList())) return false;
if (hasTimestampVerificationData() != other.hasTimestampVerificationData()) return false;
if (hasTimestampVerificationData()) {
if (!getTimestampVerificationData()
.equals(other.getTimestampVerificationData())) return false;
}
if (!getContentCase().equals(other.getContentCase())) return false;
switch (contentCase_) {
case 1:
if (!getPublicKey()
.equals(other.getPublicKey())) return false;
break;
case 2:
if (!getX509CertificateChain()
.equals(other.getX509CertificateChain())) return false;
break;
case 5:
if (!getCertificate()
.equals(other.getCertificate())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTlogEntriesCount() > 0) {
hash = (37 * hash) + TLOG_ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getTlogEntriesList().hashCode();
}
if (hasTimestampVerificationData()) {
hash = (37 * hash) + TIMESTAMP_VERIFICATION_DATA_FIELD_NUMBER;
hash = (53 * hash) + getTimestampVerificationData().hashCode();
}
switch (contentCase_) {
case 1:
hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;
hash = (53 * hash) + getPublicKey().hashCode();
break;
case 2:
hash = (37 * hash) + X509_CERTIFICATE_CHAIN_FIELD_NUMBER;
hash = (53 * hash) + getX509CertificateChain().hashCode();
break;
case 5:
hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER;
hash = (53 * hash) + getCertificate().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial 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.bundle.v1.VerificationMaterial parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial 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.bundle.v1.VerificationMaterial parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial 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.bundle.v1.VerificationMaterial parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial 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.bundle.v1.VerificationMaterial parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial 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.bundle.v1.VerificationMaterial 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>
* VerificationMaterial captures details on the materials used to verify
* signatures. This message may be embedded in a DSSE envelope as a signature
* extension. Specifically, the `ext` field of the extension will expect this
* message when the signature extension is for Sigstore. This is identified by
* the `kind` field in the extension, which must be set to
* application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore.
* When used as a DSSE extension, if the `public_key` field is used to indicate
* the key identifier, it MUST match the `keyid` field of the signature the
* extension is attached to.
* </pre>
*
* Protobuf type {@code dev.sigstore.bundle.v1.VerificationMaterial}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:dev.sigstore.bundle.v1.VerificationMaterial)
dev.sigstore.proto.bundle.v1.VerificationMaterialOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.bundle.v1.BundleProto.internal_static_dev_sigstore_bundle_v1_VerificationMaterial_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.bundle.v1.BundleProto.internal_static_dev_sigstore_bundle_v1_VerificationMaterial_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.bundle.v1.VerificationMaterial.class, dev.sigstore.proto.bundle.v1.VerificationMaterial.Builder.class);
}
// Construct using dev.sigstore.proto.bundle.v1.VerificationMaterial.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
internalGetTlogEntriesFieldBuilder();
internalGetTimestampVerificationDataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (publicKeyBuilder_ != null) {
publicKeyBuilder_.clear();
}
if (x509CertificateChainBuilder_ != null) {
x509CertificateChainBuilder_.clear();
}
if (certificateBuilder_ != null) {
certificateBuilder_.clear();
}
if (tlogEntriesBuilder_ == null) {
tlogEntries_ = java.util.Collections.emptyList();
} else {
tlogEntries_ = null;
tlogEntriesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
timestampVerificationData_ = null;
if (timestampVerificationDataBuilder_ != null) {
timestampVerificationDataBuilder_.dispose();
timestampVerificationDataBuilder_ = null;
}
contentCase_ = 0;
content_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.sigstore.proto.bundle.v1.BundleProto.internal_static_dev_sigstore_bundle_v1_VerificationMaterial_descriptor;
}
@java.lang.Override
public dev.sigstore.proto.bundle.v1.VerificationMaterial getDefaultInstanceForType() {
return dev.sigstore.proto.bundle.v1.VerificationMaterial.getDefaultInstance();
}
@java.lang.Override
public dev.sigstore.proto.bundle.v1.VerificationMaterial build() {
dev.sigstore.proto.bundle.v1.VerificationMaterial result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.sigstore.proto.bundle.v1.VerificationMaterial buildPartial() {
dev.sigstore.proto.bundle.v1.VerificationMaterial result = new dev.sigstore.proto.bundle.v1.VerificationMaterial(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.sigstore.proto.bundle.v1.VerificationMaterial result) {
if (tlogEntriesBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
tlogEntries_ = java.util.Collections.unmodifiableList(tlogEntries_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.tlogEntries_ = tlogEntries_;
} else {
result.tlogEntries_ = tlogEntriesBuilder_.build();
}
}
private void buildPartial0(dev.sigstore.proto.bundle.v1.VerificationMaterial result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.timestampVerificationData_ = timestampVerificationDataBuilder_ == null
? timestampVerificationData_
: timestampVerificationDataBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(dev.sigstore.proto.bundle.v1.VerificationMaterial result) {
result.contentCase_ = contentCase_;
result.content_ = this.content_;
if (contentCase_ == 1 &&
publicKeyBuilder_ != null) {
result.content_ = publicKeyBuilder_.build();
}
if (contentCase_ == 2 &&
x509CertificateChainBuilder_ != null) {
result.content_ = x509CertificateChainBuilder_.build();
}
if (contentCase_ == 5 &&
certificateBuilder_ != null) {
result.content_ = certificateBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.sigstore.proto.bundle.v1.VerificationMaterial) {
return mergeFrom((dev.sigstore.proto.bundle.v1.VerificationMaterial)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.sigstore.proto.bundle.v1.VerificationMaterial other) {
if (other == dev.sigstore.proto.bundle.v1.VerificationMaterial.getDefaultInstance()) return this;
if (tlogEntriesBuilder_ == null) {
if (!other.tlogEntries_.isEmpty()) {
if (tlogEntries_.isEmpty()) {
tlogEntries_ = other.tlogEntries_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureTlogEntriesIsMutable();
tlogEntries_.addAll(other.tlogEntries_);
}
onChanged();
}
} else {
if (!other.tlogEntries_.isEmpty()) {
if (tlogEntriesBuilder_.isEmpty()) {
tlogEntriesBuilder_.dispose();
tlogEntriesBuilder_ = null;
tlogEntries_ = other.tlogEntries_;
bitField0_ = (bitField0_ & ~0x00000008);
tlogEntriesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
internalGetTlogEntriesFieldBuilder() : null;
} else {
tlogEntriesBuilder_.addAllMessages(other.tlogEntries_);
}
}
}
if (other.hasTimestampVerificationData()) {
mergeTimestampVerificationData(other.getTimestampVerificationData());
}
switch (other.getContentCase()) {
case PUBLIC_KEY: {
mergePublicKey(other.getPublicKey());
break;
}
case X509_CERTIFICATE_CHAIN: {
mergeX509CertificateChain(other.getX509CertificateChain());
break;
}
case CERTIFICATE: {
mergeCertificate(other.getCertificate());
break;
}
case CONTENT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
internalGetPublicKeyFieldBuilder().getBuilder(),
extensionRegistry);
contentCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
internalGetX509CertificateChainFieldBuilder().getBuilder(),
extensionRegistry);
contentCase_ = 2;
break;
} // case 18
case 26: {
dev.sigstore.proto.rekor.v1.TransparencyLogEntry m =
input.readMessage(
dev.sigstore.proto.rekor.v1.TransparencyLogEntry.parser(),
extensionRegistry);
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
tlogEntries_.add(m);
} else {
tlogEntriesBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
input.readMessage(
internalGetTimestampVerificationDataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 34
case 42: {
input.readMessage(
internalGetCertificateFieldBuilder().getBuilder(),
extensionRegistry);
contentCase_ = 5;
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 contentCase_ = 0;
private java.lang.Object content_;
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public Builder clearContent() {
contentCase_ = 0;
content_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.PublicKeyIdentifier, dev.sigstore.proto.common.v1.PublicKeyIdentifier.Builder, dev.sigstore.proto.common.v1.PublicKeyIdentifierOrBuilder> publicKeyBuilder_;
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the publicKey field is set.
*/
@java.lang.Override
public boolean hasPublicKey() {
return contentCase_ == 1;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The publicKey.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.PublicKeyIdentifier getPublicKey() {
if (publicKeyBuilder_ == null) {
if (contentCase_ == 1) {
return (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_;
}
return dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
} else {
if (contentCase_ == 1) {
return publicKeyBuilder_.getMessage();
}
return dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setPublicKey(dev.sigstore.proto.common.v1.PublicKeyIdentifier value) {
if (publicKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
content_ = value;
onChanged();
} else {
publicKeyBuilder_.setMessage(value);
}
contentCase_ = 1;
return this;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setPublicKey(
dev.sigstore.proto.common.v1.PublicKeyIdentifier.Builder builderForValue) {
if (publicKeyBuilder_ == null) {
content_ = builderForValue.build();
onChanged();
} else {
publicKeyBuilder_.setMessage(builderForValue.build());
}
contentCase_ = 1;
return this;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergePublicKey(dev.sigstore.proto.common.v1.PublicKeyIdentifier value) {
if (publicKeyBuilder_ == null) {
if (contentCase_ == 1 &&
content_ != dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance()) {
content_ = dev.sigstore.proto.common.v1.PublicKeyIdentifier.newBuilder((dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_)
.mergeFrom(value).buildPartial();
} else {
content_ = value;
}
onChanged();
} else {
if (contentCase_ == 1) {
publicKeyBuilder_.mergeFrom(value);
} else {
publicKeyBuilder_.setMessage(value);
}
}
contentCase_ = 1;
return this;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearPublicKey() {
if (publicKeyBuilder_ == null) {
if (contentCase_ == 1) {
contentCase_ = 0;
content_ = null;
onChanged();
}
} else {
if (contentCase_ == 1) {
contentCase_ = 0;
content_ = null;
}
publicKeyBuilder_.clear();
}
return this;
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.common.v1.PublicKeyIdentifier.Builder getPublicKeyBuilder() {
return internalGetPublicKeyFieldBuilder().getBuilder();
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.PublicKeyIdentifierOrBuilder getPublicKeyOrBuilder() {
if ((contentCase_ == 1) && (publicKeyBuilder_ != null)) {
return publicKeyBuilder_.getMessageOrBuilder();
} else {
if (contentCase_ == 1) {
return (dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_;
}
return dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.PublicKeyIdentifier, dev.sigstore.proto.common.v1.PublicKeyIdentifier.Builder, dev.sigstore.proto.common.v1.PublicKeyIdentifierOrBuilder>
internalGetPublicKeyFieldBuilder() {
if (publicKeyBuilder_ == null) {
if (!(contentCase_ == 1)) {
content_ = dev.sigstore.proto.common.v1.PublicKeyIdentifier.getDefaultInstance();
}
publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.PublicKeyIdentifier, dev.sigstore.proto.common.v1.PublicKeyIdentifier.Builder, dev.sigstore.proto.common.v1.PublicKeyIdentifierOrBuilder>(
(dev.sigstore.proto.common.v1.PublicKeyIdentifier) content_,
getParentForChildren(),
isClean());
content_ = null;
}
contentCase_ = 1;
onChanged();
return publicKeyBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder> x509CertificateChainBuilder_;
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the x509CertificateChain field is set.
*/
@java.lang.Override
public boolean hasX509CertificateChain() {
return contentCase_ == 2;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The x509CertificateChain.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateChain getX509CertificateChain() {
if (x509CertificateChainBuilder_ == null) {
if (contentCase_ == 2) {
return (dev.sigstore.proto.common.v1.X509CertificateChain) content_;
}
return dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
} else {
if (contentCase_ == 2) {
return x509CertificateChainBuilder_.getMessage();
}
return dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setX509CertificateChain(dev.sigstore.proto.common.v1.X509CertificateChain value) {
if (x509CertificateChainBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
content_ = value;
onChanged();
} else {
x509CertificateChainBuilder_.setMessage(value);
}
contentCase_ = 2;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setX509CertificateChain(
dev.sigstore.proto.common.v1.X509CertificateChain.Builder builderForValue) {
if (x509CertificateChainBuilder_ == null) {
content_ = builderForValue.build();
onChanged();
} else {
x509CertificateChainBuilder_.setMessage(builderForValue.build());
}
contentCase_ = 2;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergeX509CertificateChain(dev.sigstore.proto.common.v1.X509CertificateChain value) {
if (x509CertificateChainBuilder_ == null) {
if (contentCase_ == 2 &&
content_ != dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance()) {
content_ = dev.sigstore.proto.common.v1.X509CertificateChain.newBuilder((dev.sigstore.proto.common.v1.X509CertificateChain) content_)
.mergeFrom(value).buildPartial();
} else {
content_ = value;
}
onChanged();
} else {
if (contentCase_ == 2) {
x509CertificateChainBuilder_.mergeFrom(value);
} else {
x509CertificateChainBuilder_.setMessage(value);
}
}
contentCase_ = 2;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearX509CertificateChain() {
if (x509CertificateChainBuilder_ == null) {
if (contentCase_ == 2) {
contentCase_ = 0;
content_ = null;
onChanged();
}
} else {
if (contentCase_ == 2) {
contentCase_ = 0;
content_ = null;
}
x509CertificateChainBuilder_.clear();
}
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.common.v1.X509CertificateChain.Builder getX509CertificateChainBuilder() {
return internalGetX509CertificateChainFieldBuilder().getBuilder();
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder getX509CertificateChainOrBuilder() {
if ((contentCase_ == 2) && (x509CertificateChainBuilder_ != null)) {
return x509CertificateChainBuilder_.getMessageOrBuilder();
} else {
if (contentCase_ == 2) {
return (dev.sigstore.proto.common.v1.X509CertificateChain) content_;
}
return dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.X509CertificateChain x509_certificate_chain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder>
internalGetX509CertificateChainFieldBuilder() {
if (x509CertificateChainBuilder_ == null) {
if (!(contentCase_ == 2)) {
content_ = dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance();
}
x509CertificateChainBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder>(
(dev.sigstore.proto.common.v1.X509CertificateChain) content_,
getParentForChildren(),
isClean());
content_ = null;
}
contentCase_ = 2;
onChanged();
return x509CertificateChainBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509Certificate, dev.sigstore.proto.common.v1.X509Certificate.Builder, dev.sigstore.proto.common.v1.X509CertificateOrBuilder> certificateBuilder_;
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the certificate field is set.
*/
@java.lang.Override
public boolean hasCertificate() {
return contentCase_ == 5;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The certificate.
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509Certificate getCertificate() {
if (certificateBuilder_ == null) {
if (contentCase_ == 5) {
return (dev.sigstore.proto.common.v1.X509Certificate) content_;
}
return dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
} else {
if (contentCase_ == 5) {
return certificateBuilder_.getMessage();
}
return dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setCertificate(dev.sigstore.proto.common.v1.X509Certificate value) {
if (certificateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
content_ = value;
onChanged();
} else {
certificateBuilder_.setMessage(value);
}
contentCase_ = 5;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setCertificate(
dev.sigstore.proto.common.v1.X509Certificate.Builder builderForValue) {
if (certificateBuilder_ == null) {
content_ = builderForValue.build();
onChanged();
} else {
certificateBuilder_.setMessage(builderForValue.build());
}
contentCase_ = 5;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergeCertificate(dev.sigstore.proto.common.v1.X509Certificate value) {
if (certificateBuilder_ == null) {
if (contentCase_ == 5 &&
content_ != dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance()) {
content_ = dev.sigstore.proto.common.v1.X509Certificate.newBuilder((dev.sigstore.proto.common.v1.X509Certificate) content_)
.mergeFrom(value).buildPartial();
} else {
content_ = value;
}
onChanged();
} else {
if (contentCase_ == 5) {
certificateBuilder_.mergeFrom(value);
} else {
certificateBuilder_.setMessage(value);
}
}
contentCase_ = 5;
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearCertificate() {
if (certificateBuilder_ == null) {
if (contentCase_ == 5) {
contentCase_ = 0;
content_ = null;
onChanged();
}
} else {
if (contentCase_ == 5) {
contentCase_ = 0;
content_ = null;
}
certificateBuilder_.clear();
}
return this;
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.common.v1.X509Certificate.Builder getCertificateBuilder() {
return internalGetCertificateFieldBuilder().getBuilder();
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.common.v1.X509CertificateOrBuilder getCertificateOrBuilder() {
if ((contentCase_ == 5) && (certificateBuilder_ != null)) {
return certificateBuilder_.getMessageOrBuilder();
} else {
if (contentCase_ == 5) {
return (dev.sigstore.proto.common.v1.X509Certificate) content_;
}
return dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
}
}
/**
* <code>.dev.sigstore.common.v1.X509Certificate certificate = 5 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509Certificate, dev.sigstore.proto.common.v1.X509Certificate.Builder, dev.sigstore.proto.common.v1.X509CertificateOrBuilder>
internalGetCertificateFieldBuilder() {
if (certificateBuilder_ == null) {
if (!(contentCase_ == 5)) {
content_ = dev.sigstore.proto.common.v1.X509Certificate.getDefaultInstance();
}
certificateBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.common.v1.X509Certificate, dev.sigstore.proto.common.v1.X509Certificate.Builder, dev.sigstore.proto.common.v1.X509CertificateOrBuilder>(
(dev.sigstore.proto.common.v1.X509Certificate) content_,
getParentForChildren(),
isClean());
content_ = null;
}
contentCase_ = 5;
onChanged();
return certificateBuilder_;
}
private java.util.List<dev.sigstore.proto.rekor.v1.TransparencyLogEntry> tlogEntries_ =
java.util.Collections.emptyList();
private void ensureTlogEntriesIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
tlogEntries_ = new java.util.ArrayList<dev.sigstore.proto.rekor.v1.TransparencyLogEntry>(tlogEntries_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.sigstore.proto.rekor.v1.TransparencyLogEntry, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder, dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder> tlogEntriesBuilder_;
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public java.util.List<dev.sigstore.proto.rekor.v1.TransparencyLogEntry> getTlogEntriesList() {
if (tlogEntriesBuilder_ == null) {
return java.util.Collections.unmodifiableList(tlogEntries_);
} else {
return tlogEntriesBuilder_.getMessageList();
}
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public int getTlogEntriesCount() {
if (tlogEntriesBuilder_ == null) {
return tlogEntries_.size();
} else {
return tlogEntriesBuilder_.getCount();
}
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public dev.sigstore.proto.rekor.v1.TransparencyLogEntry getTlogEntries(int index) {
if (tlogEntriesBuilder_ == null) {
return tlogEntries_.get(index);
} else {
return tlogEntriesBuilder_.getMessage(index);
}
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder setTlogEntries(
int index, dev.sigstore.proto.rekor.v1.TransparencyLogEntry value) {
if (tlogEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTlogEntriesIsMutable();
tlogEntries_.set(index, value);
onChanged();
} else {
tlogEntriesBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder setTlogEntries(
int index, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder builderForValue) {
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
tlogEntries_.set(index, builderForValue.build());
onChanged();
} else {
tlogEntriesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder addTlogEntries(dev.sigstore.proto.rekor.v1.TransparencyLogEntry value) {
if (tlogEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTlogEntriesIsMutable();
tlogEntries_.add(value);
onChanged();
} else {
tlogEntriesBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder addTlogEntries(
int index, dev.sigstore.proto.rekor.v1.TransparencyLogEntry value) {
if (tlogEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTlogEntriesIsMutable();
tlogEntries_.add(index, value);
onChanged();
} else {
tlogEntriesBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder addTlogEntries(
dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder builderForValue) {
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
tlogEntries_.add(builderForValue.build());
onChanged();
} else {
tlogEntriesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder addTlogEntries(
int index, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder builderForValue) {
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
tlogEntries_.add(index, builderForValue.build());
onChanged();
} else {
tlogEntriesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder addAllTlogEntries(
java.lang.Iterable<? extends dev.sigstore.proto.rekor.v1.TransparencyLogEntry> values) {
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tlogEntries_);
onChanged();
} else {
tlogEntriesBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder clearTlogEntries() {
if (tlogEntriesBuilder_ == null) {
tlogEntries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
tlogEntriesBuilder_.clear();
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public Builder removeTlogEntries(int index) {
if (tlogEntriesBuilder_ == null) {
ensureTlogEntriesIsMutable();
tlogEntries_.remove(index);
onChanged();
} else {
tlogEntriesBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder getTlogEntriesBuilder(
int index) {
return internalGetTlogEntriesFieldBuilder().getBuilder(index);
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder getTlogEntriesOrBuilder(
int index) {
if (tlogEntriesBuilder_ == null) {
return tlogEntries_.get(index); } else {
return tlogEntriesBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public java.util.List<? extends dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder>
getTlogEntriesOrBuilderList() {
if (tlogEntriesBuilder_ != null) {
return tlogEntriesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tlogEntries_);
}
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder addTlogEntriesBuilder() {
return internalGetTlogEntriesFieldBuilder().addBuilder(
dev.sigstore.proto.rekor.v1.TransparencyLogEntry.getDefaultInstance());
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder addTlogEntriesBuilder(
int index) {
return internalGetTlogEntriesFieldBuilder().addBuilder(
index, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.getDefaultInstance());
}
/**
* <pre>
* An inclusion proof and an optional signed timestamp from the log.
* Client verification libraries MAY provide an option to support v0.1
* bundles for backwards compatibility, which may contain an inclusion
* promise and not an inclusion proof. In this case, the client MUST
* validate the promise.
* Verifiers SHOULD NOT allow v0.1 bundles if they're used in an
* ecosystem which never produced them.
* </pre>
*
* <code>repeated .dev.sigstore.rekor.v1.TransparencyLogEntry tlog_entries = 3;</code>
*/
public java.util.List<dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder>
getTlogEntriesBuilderList() {
return internalGetTlogEntriesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
dev.sigstore.proto.rekor.v1.TransparencyLogEntry, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder, dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder>
internalGetTlogEntriesFieldBuilder() {
if (tlogEntriesBuilder_ == null) {
tlogEntriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
dev.sigstore.proto.rekor.v1.TransparencyLogEntry, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder, dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder>(
tlogEntries_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
tlogEntries_ = null;
}
return tlogEntriesBuilder_;
}
private dev.sigstore.proto.bundle.v1.TimestampVerificationData timestampVerificationData_;
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.bundle.v1.TimestampVerificationData, dev.sigstore.proto.bundle.v1.TimestampVerificationData.Builder, dev.sigstore.proto.bundle.v1.TimestampVerificationDataOrBuilder> timestampVerificationDataBuilder_;
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
* @return Whether the timestampVerificationData field is set.
*/
public boolean hasTimestampVerificationData() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
* @return The timestampVerificationData.
*/
public dev.sigstore.proto.bundle.v1.TimestampVerificationData getTimestampVerificationData() {
if (timestampVerificationDataBuilder_ == null) {
return timestampVerificationData_ == null ? dev.sigstore.proto.bundle.v1.TimestampVerificationData.getDefaultInstance() : timestampVerificationData_;
} else {
return timestampVerificationDataBuilder_.getMessage();
}
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public Builder setTimestampVerificationData(dev.sigstore.proto.bundle.v1.TimestampVerificationData value) {
if (timestampVerificationDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestampVerificationData_ = value;
} else {
timestampVerificationDataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public Builder setTimestampVerificationData(
dev.sigstore.proto.bundle.v1.TimestampVerificationData.Builder builderForValue) {
if (timestampVerificationDataBuilder_ == null) {
timestampVerificationData_ = builderForValue.build();
} else {
timestampVerificationDataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public Builder mergeTimestampVerificationData(dev.sigstore.proto.bundle.v1.TimestampVerificationData value) {
if (timestampVerificationDataBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
timestampVerificationData_ != null &&
timestampVerificationData_ != dev.sigstore.proto.bundle.v1.TimestampVerificationData.getDefaultInstance()) {
getTimestampVerificationDataBuilder().mergeFrom(value);
} else {
timestampVerificationData_ = value;
}
} else {
timestampVerificationDataBuilder_.mergeFrom(value);
}
if (timestampVerificationData_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public Builder clearTimestampVerificationData() {
bitField0_ = (bitField0_ & ~0x00000010);
timestampVerificationData_ = null;
if (timestampVerificationDataBuilder_ != null) {
timestampVerificationDataBuilder_.dispose();
timestampVerificationDataBuilder_ = null;
}
onChanged();
return this;
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public dev.sigstore.proto.bundle.v1.TimestampVerificationData.Builder getTimestampVerificationDataBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return internalGetTimestampVerificationDataFieldBuilder().getBuilder();
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
public dev.sigstore.proto.bundle.v1.TimestampVerificationDataOrBuilder getTimestampVerificationDataOrBuilder() {
if (timestampVerificationDataBuilder_ != null) {
return timestampVerificationDataBuilder_.getMessageOrBuilder();
} else {
return timestampVerificationData_ == null ?
dev.sigstore.proto.bundle.v1.TimestampVerificationData.getDefaultInstance() : timestampVerificationData_;
}
}
/**
* <pre>
* Timestamp may also come from
* tlog_entries.inclusion_promise.signed_entry_timestamp.
* </pre>
*
* <code>.dev.sigstore.bundle.v1.TimestampVerificationData timestamp_verification_data = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.bundle.v1.TimestampVerificationData, dev.sigstore.proto.bundle.v1.TimestampVerificationData.Builder, dev.sigstore.proto.bundle.v1.TimestampVerificationDataOrBuilder>
internalGetTimestampVerificationDataFieldBuilder() {
if (timestampVerificationDataBuilder_ == null) {
timestampVerificationDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.bundle.v1.TimestampVerificationData, dev.sigstore.proto.bundle.v1.TimestampVerificationData.Builder, dev.sigstore.proto.bundle.v1.TimestampVerificationDataOrBuilder>(
getTimestampVerificationData(),
getParentForChildren(),
isClean());
timestampVerificationData_ = null;
}
return timestampVerificationDataBuilder_;
}
// @@protoc_insertion_point(builder_scope:dev.sigstore.bundle.v1.VerificationMaterial)
}
// @@protoc_insertion_point(class_scope:dev.sigstore.bundle.v1.VerificationMaterial)
private static final dev.sigstore.proto.bundle.v1.VerificationMaterial DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.sigstore.proto.bundle.v1.VerificationMaterial();
}
public static dev.sigstore.proto.bundle.v1.VerificationMaterial getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<VerificationMaterial>
PARSER = new com.google.protobuf.AbstractParser<VerificationMaterial>() {
@java.lang.Override
public VerificationMaterial 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<VerificationMaterial> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<VerificationMaterial> getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.sigstore.proto.bundle.v1.VerificationMaterial getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}