EnvelopeOuterClass.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: envelope.proto
// Protobuf Java Version: 4.30.2
package io.intoto;
@javax.annotation.Generated(value="protoc", comments="annotations:EnvelopeOuterClass.java.pb.meta")
public final class EnvelopeOuterClass {
private EnvelopeOuterClass() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 30,
/* patch= */ 2,
/* suffix= */ "",
EnvelopeOuterClass.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface EnvelopeOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.intoto.Envelope)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Message to be signed. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes payload = 1;</code>
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The payloadType.
*/
java.lang.String getPayloadType();
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The bytes for payloadType.
*/
com.google.protobuf.ByteString
getPayloadTypeBytes();
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
java.util.List<io.intoto.EnvelopeOuterClass.Signature>
getSignaturesList();
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
io.intoto.EnvelopeOuterClass.Signature getSignatures(int index);
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
int getSignaturesCount();
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
java.util.List<? extends io.intoto.EnvelopeOuterClass.SignatureOrBuilder>
getSignaturesOrBuilderList();
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
io.intoto.EnvelopeOuterClass.SignatureOrBuilder getSignaturesOrBuilder(
int index);
}
/**
* <pre>
* An authenticated message of arbitrary type.
* </pre>
*
* Protobuf type {@code io.intoto.Envelope}
*/
public static final class Envelope extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:io.intoto.Envelope)
EnvelopeOrBuilder {
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= */ "",
Envelope.class.getName());
}
// Use Envelope.newBuilder() to construct.
private Envelope(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Envelope() {
payload_ = com.google.protobuf.ByteString.EMPTY;
payloadType_ = "";
signatures_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Envelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.intoto.EnvelopeOuterClass.Envelope.class, io.intoto.EnvelopeOuterClass.Envelope.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Message to be signed. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes payload = 1;</code>
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int PAYLOADTYPE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object payloadType_ = "";
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The payloadType.
*/
@java.lang.Override
public java.lang.String getPayloadType() {
java.lang.Object ref = payloadType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
payloadType_ = s;
return s;
}
}
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The bytes for payloadType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPayloadTypeBytes() {
java.lang.Object ref = payloadType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payloadType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SIGNATURES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List<io.intoto.EnvelopeOuterClass.Signature> signatures_;
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
@java.lang.Override
public java.util.List<io.intoto.EnvelopeOuterClass.Signature> getSignaturesList() {
return signatures_;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
@java.lang.Override
public java.util.List<? extends io.intoto.EnvelopeOuterClass.SignatureOrBuilder>
getSignaturesOrBuilderList() {
return signatures_;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
@java.lang.Override
public int getSignaturesCount() {
return signatures_.size();
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Signature getSignatures(int index) {
return signatures_.get(index);
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
@java.lang.Override
public io.intoto.EnvelopeOuterClass.SignatureOrBuilder getSignaturesOrBuilder(
int index) {
return signatures_.get(index);
}
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 (!payload_.isEmpty()) {
output.writeBytes(1, payload_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(payloadType_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, payloadType_);
}
for (int i = 0; i < signatures_.size(); i++) {
output.writeMessage(3, signatures_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, payload_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(payloadType_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, payloadType_);
}
for (int i = 0; i < signatures_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, signatures_.get(i));
}
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 io.intoto.EnvelopeOuterClass.Envelope)) {
return super.equals(obj);
}
io.intoto.EnvelopeOuterClass.Envelope other = (io.intoto.EnvelopeOuterClass.Envelope) obj;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getPayloadType()
.equals(other.getPayloadType())) return false;
if (!getSignaturesList()
.equals(other.getSignaturesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + PAYLOADTYPE_FIELD_NUMBER;
hash = (53 * hash) + getPayloadType().hashCode();
if (getSignaturesCount() > 0) {
hash = (37 * hash) + SIGNATURES_FIELD_NUMBER;
hash = (53 * hash) + getSignaturesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Envelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Envelope 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 io.intoto.EnvelopeOuterClass.Envelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Envelope 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 io.intoto.EnvelopeOuterClass.Envelope parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Envelope 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(io.intoto.EnvelopeOuterClass.Envelope 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>
* An authenticated message of arbitrary type.
* </pre>
*
* Protobuf type {@code io.intoto.Envelope}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:io.intoto.Envelope)
io.intoto.EnvelopeOuterClass.EnvelopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Envelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.intoto.EnvelopeOuterClass.Envelope.class, io.intoto.EnvelopeOuterClass.Envelope.Builder.class);
}
// Construct using io.intoto.EnvelopeOuterClass.Envelope.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
payload_ = com.google.protobuf.ByteString.EMPTY;
payloadType_ = "";
if (signaturesBuilder_ == null) {
signatures_ = java.util.Collections.emptyList();
} else {
signatures_ = null;
signaturesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Envelope_descriptor;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Envelope getDefaultInstanceForType() {
return io.intoto.EnvelopeOuterClass.Envelope.getDefaultInstance();
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Envelope build() {
io.intoto.EnvelopeOuterClass.Envelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Envelope buildPartial() {
io.intoto.EnvelopeOuterClass.Envelope result = new io.intoto.EnvelopeOuterClass.Envelope(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.intoto.EnvelopeOuterClass.Envelope result) {
if (signaturesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
signatures_ = java.util.Collections.unmodifiableList(signatures_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.signatures_ = signatures_;
} else {
result.signatures_ = signaturesBuilder_.build();
}
}
private void buildPartial0(io.intoto.EnvelopeOuterClass.Envelope result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.payload_ = payload_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.payloadType_ = payloadType_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.intoto.EnvelopeOuterClass.Envelope) {
return mergeFrom((io.intoto.EnvelopeOuterClass.Envelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.intoto.EnvelopeOuterClass.Envelope other) {
if (other == io.intoto.EnvelopeOuterClass.Envelope.getDefaultInstance()) return this;
if (!other.getPayload().isEmpty()) {
setPayload(other.getPayload());
}
if (!other.getPayloadType().isEmpty()) {
payloadType_ = other.payloadType_;
bitField0_ |= 0x00000002;
onChanged();
}
if (signaturesBuilder_ == null) {
if (!other.signatures_.isEmpty()) {
if (signatures_.isEmpty()) {
signatures_ = other.signatures_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureSignaturesIsMutable();
signatures_.addAll(other.signatures_);
}
onChanged();
}
} else {
if (!other.signatures_.isEmpty()) {
if (signaturesBuilder_.isEmpty()) {
signaturesBuilder_.dispose();
signaturesBuilder_ = null;
signatures_ = other.signatures_;
bitField0_ = (bitField0_ & ~0x00000004);
signaturesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
internalGetSignaturesFieldBuilder() : null;
} else {
signaturesBuilder_.addAllMessages(other.signatures_);
}
}
}
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: {
payload_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
payloadType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
io.intoto.EnvelopeOuterClass.Signature m =
input.readMessage(
io.intoto.EnvelopeOuterClass.Signature.parser(),
extensionRegistry);
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.add(m);
} else {
signaturesBuilder_.addMessage(m);
}
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Message to be signed. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes payload = 1;</code>
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* <pre>
* Message to be signed. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes payload = 1;</code>
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
payload_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* Message to be signed. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes payload = 1;</code>
* @return This builder for chaining.
*/
public Builder clearPayload() {
bitField0_ = (bitField0_ & ~0x00000001);
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private java.lang.Object payloadType_ = "";
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The payloadType.
*/
public java.lang.String getPayloadType() {
java.lang.Object ref = payloadType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
payloadType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return The bytes for payloadType.
*/
public com.google.protobuf.ByteString
getPayloadTypeBytes() {
java.lang.Object ref = payloadType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payloadType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @param value The payloadType to set.
* @return This builder for chaining.
*/
public Builder setPayloadType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
payloadType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @return This builder for chaining.
*/
public Builder clearPayloadType() {
payloadType_ = getDefaultInstance().getPayloadType();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* String unambiguously identifying how to interpret payload.
* REQUIRED.
* </pre>
*
* <code>string payloadType = 2;</code>
* @param value The bytes for payloadType to set.
* @return This builder for chaining.
*/
public Builder setPayloadTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
payloadType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List<io.intoto.EnvelopeOuterClass.Signature> signatures_ =
java.util.Collections.emptyList();
private void ensureSignaturesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
signatures_ = new java.util.ArrayList<io.intoto.EnvelopeOuterClass.Signature>(signatures_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
io.intoto.EnvelopeOuterClass.Signature, io.intoto.EnvelopeOuterClass.Signature.Builder, io.intoto.EnvelopeOuterClass.SignatureOrBuilder> signaturesBuilder_;
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public java.util.List<io.intoto.EnvelopeOuterClass.Signature> getSignaturesList() {
if (signaturesBuilder_ == null) {
return java.util.Collections.unmodifiableList(signatures_);
} else {
return signaturesBuilder_.getMessageList();
}
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public int getSignaturesCount() {
if (signaturesBuilder_ == null) {
return signatures_.size();
} else {
return signaturesBuilder_.getCount();
}
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public io.intoto.EnvelopeOuterClass.Signature getSignatures(int index) {
if (signaturesBuilder_ == null) {
return signatures_.get(index);
} else {
return signaturesBuilder_.getMessage(index);
}
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder setSignatures(
int index, io.intoto.EnvelopeOuterClass.Signature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.set(index, value);
onChanged();
} else {
signaturesBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder setSignatures(
int index, io.intoto.EnvelopeOuterClass.Signature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.set(index, builderForValue.build());
onChanged();
} else {
signaturesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder addSignatures(io.intoto.EnvelopeOuterClass.Signature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.add(value);
onChanged();
} else {
signaturesBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder addSignatures(
int index, io.intoto.EnvelopeOuterClass.Signature value) {
if (signaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSignaturesIsMutable();
signatures_.add(index, value);
onChanged();
} else {
signaturesBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder addSignatures(
io.intoto.EnvelopeOuterClass.Signature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.add(builderForValue.build());
onChanged();
} else {
signaturesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder addSignatures(
int index, io.intoto.EnvelopeOuterClass.Signature.Builder builderForValue) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.add(index, builderForValue.build());
onChanged();
} else {
signaturesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder addAllSignatures(
java.lang.Iterable<? extends io.intoto.EnvelopeOuterClass.Signature> values) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, signatures_);
onChanged();
} else {
signaturesBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder clearSignatures() {
if (signaturesBuilder_ == null) {
signatures_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
signaturesBuilder_.clear();
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public Builder removeSignatures(int index) {
if (signaturesBuilder_ == null) {
ensureSignaturesIsMutable();
signatures_.remove(index);
onChanged();
} else {
signaturesBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public io.intoto.EnvelopeOuterClass.Signature.Builder getSignaturesBuilder(
int index) {
return internalGetSignaturesFieldBuilder().getBuilder(index);
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public io.intoto.EnvelopeOuterClass.SignatureOrBuilder getSignaturesOrBuilder(
int index) {
if (signaturesBuilder_ == null) {
return signatures_.get(index); } else {
return signaturesBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public java.util.List<? extends io.intoto.EnvelopeOuterClass.SignatureOrBuilder>
getSignaturesOrBuilderList() {
if (signaturesBuilder_ != null) {
return signaturesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(signatures_);
}
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public io.intoto.EnvelopeOuterClass.Signature.Builder addSignaturesBuilder() {
return internalGetSignaturesFieldBuilder().addBuilder(
io.intoto.EnvelopeOuterClass.Signature.getDefaultInstance());
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public io.intoto.EnvelopeOuterClass.Signature.Builder addSignaturesBuilder(
int index) {
return internalGetSignaturesFieldBuilder().addBuilder(
index, io.intoto.EnvelopeOuterClass.Signature.getDefaultInstance());
}
/**
* <pre>
* Signature over:
* PAE(type, payload)
* Where PAE is defined as:
* PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
* + = concatenation
* SP = ASCII space [0x20]
* "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
* LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
* REQUIRED (length >= 1).
* </pre>
*
* <code>repeated .io.intoto.Signature signatures = 3;</code>
*/
public java.util.List<io.intoto.EnvelopeOuterClass.Signature.Builder>
getSignaturesBuilderList() {
return internalGetSignaturesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
io.intoto.EnvelopeOuterClass.Signature, io.intoto.EnvelopeOuterClass.Signature.Builder, io.intoto.EnvelopeOuterClass.SignatureOrBuilder>
internalGetSignaturesFieldBuilder() {
if (signaturesBuilder_ == null) {
signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
io.intoto.EnvelopeOuterClass.Signature, io.intoto.EnvelopeOuterClass.Signature.Builder, io.intoto.EnvelopeOuterClass.SignatureOrBuilder>(
signatures_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
signatures_ = null;
}
return signaturesBuilder_;
}
// @@protoc_insertion_point(builder_scope:io.intoto.Envelope)
}
// @@protoc_insertion_point(class_scope:io.intoto.Envelope)
private static final io.intoto.EnvelopeOuterClass.Envelope DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.intoto.EnvelopeOuterClass.Envelope();
}
public static io.intoto.EnvelopeOuterClass.Envelope getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Envelope>
PARSER = new com.google.protobuf.AbstractParser<Envelope>() {
@java.lang.Override
public Envelope 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<Envelope> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Envelope> getParserForType() {
return PARSER;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Envelope getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SignatureOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.intoto.Signature)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Signature itself. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes sig = 1;</code>
* @return The sig.
*/
com.google.protobuf.ByteString getSig();
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The keyid.
*/
java.lang.String getKeyid();
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The bytes for keyid.
*/
com.google.protobuf.ByteString
getKeyidBytes();
}
/**
* Protobuf type {@code io.intoto.Signature}
*/
public static final class Signature extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:io.intoto.Signature)
SignatureOrBuilder {
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= */ "",
Signature.class.getName());
}
// Use Signature.newBuilder() to construct.
private Signature(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Signature() {
sig_ = com.google.protobuf.ByteString.EMPTY;
keyid_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Signature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Signature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.intoto.EnvelopeOuterClass.Signature.class, io.intoto.EnvelopeOuterClass.Signature.Builder.class);
}
public static final int SIG_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Signature itself. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes sig = 1;</code>
* @return The sig.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSig() {
return sig_;
}
public static final int KEYID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object keyid_ = "";
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The keyid.
*/
@java.lang.Override
public java.lang.String getKeyid() {
java.lang.Object ref = keyid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyid_ = s;
return s;
}
}
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The bytes for keyid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKeyidBytes() {
java.lang.Object ref = keyid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!sig_.isEmpty()) {
output.writeBytes(1, sig_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(keyid_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, keyid_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!sig_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, sig_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(keyid_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, keyid_);
}
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 io.intoto.EnvelopeOuterClass.Signature)) {
return super.equals(obj);
}
io.intoto.EnvelopeOuterClass.Signature other = (io.intoto.EnvelopeOuterClass.Signature) obj;
if (!getSig()
.equals(other.getSig())) return false;
if (!getKeyid()
.equals(other.getKeyid())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SIG_FIELD_NUMBER;
hash = (53 * hash) + getSig().hashCode();
hash = (37 * hash) + KEYID_FIELD_NUMBER;
hash = (53 * hash) + getKeyid().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.intoto.EnvelopeOuterClass.Signature parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Signature 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 io.intoto.EnvelopeOuterClass.Signature parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Signature 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 io.intoto.EnvelopeOuterClass.Signature parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static io.intoto.EnvelopeOuterClass.Signature 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(io.intoto.EnvelopeOuterClass.Signature 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;
}
/**
* Protobuf type {@code io.intoto.Signature}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:io.intoto.Signature)
io.intoto.EnvelopeOuterClass.SignatureOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Signature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Signature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.intoto.EnvelopeOuterClass.Signature.class, io.intoto.EnvelopeOuterClass.Signature.Builder.class);
}
// Construct using io.intoto.EnvelopeOuterClass.Signature.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
sig_ = com.google.protobuf.ByteString.EMPTY;
keyid_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.intoto.EnvelopeOuterClass.internal_static_io_intoto_Signature_descriptor;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Signature getDefaultInstanceForType() {
return io.intoto.EnvelopeOuterClass.Signature.getDefaultInstance();
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Signature build() {
io.intoto.EnvelopeOuterClass.Signature result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Signature buildPartial() {
io.intoto.EnvelopeOuterClass.Signature result = new io.intoto.EnvelopeOuterClass.Signature(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.intoto.EnvelopeOuterClass.Signature result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.sig_ = sig_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.keyid_ = keyid_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.intoto.EnvelopeOuterClass.Signature) {
return mergeFrom((io.intoto.EnvelopeOuterClass.Signature)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.intoto.EnvelopeOuterClass.Signature other) {
if (other == io.intoto.EnvelopeOuterClass.Signature.getDefaultInstance()) return this;
if (!other.getSig().isEmpty()) {
setSig(other.getSig());
}
if (!other.getKeyid().isEmpty()) {
keyid_ = other.keyid_;
bitField0_ |= 0x00000002;
onChanged();
}
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: {
sig_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
keyid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString sig_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
* Signature itself. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes sig = 1;</code>
* @return The sig.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSig() {
return sig_;
}
/**
* <pre>
* Signature itself. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes sig = 1;</code>
* @param value The sig to set.
* @return This builder for chaining.
*/
public Builder setSig(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
sig_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* Signature itself. (In JSON, this is encoded as base64.)
* REQUIRED.
* </pre>
*
* <code>bytes sig = 1;</code>
* @return This builder for chaining.
*/
public Builder clearSig() {
bitField0_ = (bitField0_ & ~0x00000001);
sig_ = getDefaultInstance().getSig();
onChanged();
return this;
}
private java.lang.Object keyid_ = "";
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The keyid.
*/
public java.lang.String getKeyid() {
java.lang.Object ref = keyid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return The bytes for keyid.
*/
public com.google.protobuf.ByteString
getKeyidBytes() {
java.lang.Object ref = keyid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @param value The keyid to set.
* @return This builder for chaining.
*/
public Builder setKeyid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
keyid_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @return This builder for chaining.
*/
public Builder clearKeyid() {
keyid_ = getDefaultInstance().getKeyid();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* *Unauthenticated* hint identifying which public key was used.
* OPTIONAL.
* </pre>
*
* <code>string keyid = 2;</code>
* @param value The bytes for keyid to set.
* @return This builder for chaining.
*/
public Builder setKeyidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
keyid_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:io.intoto.Signature)
}
// @@protoc_insertion_point(class_scope:io.intoto.Signature)
private static final io.intoto.EnvelopeOuterClass.Signature DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.intoto.EnvelopeOuterClass.Signature();
}
public static io.intoto.EnvelopeOuterClass.Signature getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Signature>
PARSER = new com.google.protobuf.AbstractParser<Signature>() {
@java.lang.Override
public Signature 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<Signature> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Signature> getParserForType() {
return PARSER;
}
@java.lang.Override
public io.intoto.EnvelopeOuterClass.Signature getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_intoto_Envelope_descriptor;
private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_io_intoto_Envelope_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_intoto_Signature_descriptor;
private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_io_intoto_Signature_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\016envelope.proto\022\tio.intoto\"Z\n\010Envelope\022" +
"\017\n\007payload\030\001 \001(\014\022\023\n\013payloadType\030\002 \001(\t\022(\n" +
"\nsignatures\030\003 \003(\0132\024.io.intoto.Signature\"" +
"\'\n\tSignature\022\013\n\003sig\030\001 \001(\014\022\r\n\005keyid\030\002 \001(\t" +
"BDZ1github.com/sigstore/protobuf-specs/g" +
"en/pb-go/dsse\352\002\016Sigstore::DSSEb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_io_intoto_Envelope_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_io_intoto_Envelope_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_io_intoto_Envelope_descriptor,
new java.lang.String[] { "Payload", "PayloadType", "Signatures", });
internal_static_io_intoto_Signature_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_io_intoto_Signature_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_io_intoto_Signature_descriptor,
new java.lang.String[] { "Sig", "Keyid", });
descriptor.resolveAllFeaturesImmutable();
}
// @@protoc_insertion_point(outer_class_scope)
}