/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/dsse_attestation.proto package io.grafeas.v1; /** * * *
* Deprecated. Prefer to use a regular Occurrence, and populate the * Envelope at the top level of the Occurrence. ** * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} */ public final class DSSEAttestationOccurrence extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence) DSSEAttestationOccurrenceOrBuilder { private static final long serialVersionUID = 0L; // Use DSSEAttestationOccurrence.newBuilder() to construct. private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private DSSEAttestationOccurrence() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new DSSEAttestationOccurrence(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.DsseAttestation .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.DsseAttestation .internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.DSSEAttestationOccurrence.class, io.grafeas.v1.DSSEAttestationOccurrence.Builder.class); } private int decodedPayloadCase_ = 0; private java.lang.Object decodedPayload_; public enum DecodedPayloadCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STATEMENT(2), DECODEDPAYLOAD_NOT_SET(0); private final int value; private DecodedPayloadCase(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 DecodedPayloadCase valueOf(int value) { return forNumber(value); } public static DecodedPayloadCase forNumber(int value) { switch (value) { case 2: return STATEMENT; case 0: return DECODEDPAYLOAD_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public DecodedPayloadCase getDecodedPayloadCase() { return DecodedPayloadCase.forNumber(decodedPayloadCase_); } public static final int ENVELOPE_FIELD_NUMBER = 1; private io.grafeas.v1.Envelope envelope_; /** * * *
* If doing something security critical, make sure to verify the signatures in * this metadata. ** *
.grafeas.v1.Envelope envelope = 1;
*
* @return Whether the envelope field is set.
*/
@java.lang.Override
public boolean hasEnvelope() {
return envelope_ != null;
}
/**
*
*
* * If doing something security critical, make sure to verify the signatures in * this metadata. ** *
.grafeas.v1.Envelope envelope = 1;
*
* @return The envelope.
*/
@java.lang.Override
public io.grafeas.v1.Envelope getEnvelope() {
return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
}
/**
*
*
* * If doing something security critical, make sure to verify the signatures in * this metadata. ** *
.grafeas.v1.Envelope envelope = 1;
*/
@java.lang.Override
public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
}
public static final int STATEMENT_FIELD_NUMBER = 2;
/**
* .grafeas.v1.InTotoStatement statement = 2;
*
* @return Whether the statement field is set.
*/
@java.lang.Override
public boolean hasStatement() {
return decodedPayloadCase_ == 2;
}
/**
* .grafeas.v1.InTotoStatement statement = 2;
*
* @return The statement.
*/
@java.lang.Override
public io.grafeas.v1.InTotoStatement getStatement() {
if (decodedPayloadCase_ == 2) {
return (io.grafeas.v1.InTotoStatement) decodedPayload_;
}
return io.grafeas.v1.InTotoStatement.getDefaultInstance();
}
/** .grafeas.v1.InTotoStatement statement = 2; */
@java.lang.Override
public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
if (decodedPayloadCase_ == 2) {
return (io.grafeas.v1.InTotoStatement) decodedPayload_;
}
return io.grafeas.v1.InTotoStatement.getDefaultInstance();
}
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 (envelope_ != null) {
output.writeMessage(1, getEnvelope());
}
if (decodedPayloadCase_ == 2) {
output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (envelope_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvelope());
}
if (decodedPayloadCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
}
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.grafeas.v1.DSSEAttestationOccurrence)) {
return super.equals(obj);
}
io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj;
if (hasEnvelope() != other.hasEnvelope()) return false;
if (hasEnvelope()) {
if (!getEnvelope().equals(other.getEnvelope())) return false;
}
if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false;
switch (decodedPayloadCase_) {
case 2:
if (!getStatement().equals(other.getStatement())) 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 (hasEnvelope()) {
hash = (37 * hash) + ENVELOPE_FIELD_NUMBER;
hash = (53 * hash) + getEnvelope().hashCode();
}
switch (decodedPayloadCase_) {
case 2:
hash = (37 * hash) + STATEMENT_FIELD_NUMBER;
hash = (53 * hash) + getStatement().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.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.grafeas.v1.DSSEAttestationOccurrence 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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
* * Deprecated. Prefer to use a regular Occurrence, and populate the * Envelope at the top level of the Occurrence. ** * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*
* @return Whether the envelope field is set.
*/
public boolean hasEnvelope() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*
* @return The envelope.
*/
public io.grafeas.v1.Envelope getEnvelope() {
if (envelopeBuilder_ == null) {
return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
} else {
return envelopeBuilder_.getMessage();
}
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public Builder setEnvelope(io.grafeas.v1.Envelope value) {
if (envelopeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
envelope_ = value;
} else {
envelopeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public Builder setEnvelope(io.grafeas.v1.Envelope.Builder builderForValue) {
if (envelopeBuilder_ == null) {
envelope_ = builderForValue.build();
} else {
envelopeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public Builder mergeEnvelope(io.grafeas.v1.Envelope value) {
if (envelopeBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& envelope_ != null
&& envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) {
getEnvelopeBuilder().mergeFrom(value);
} else {
envelope_ = value;
}
} else {
envelopeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public Builder clearEnvelope() {
bitField0_ = (bitField0_ & ~0x00000001);
envelope_ = null;
if (envelopeBuilder_ != null) {
envelopeBuilder_.dispose();
envelopeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getEnvelopeFieldBuilder().getBuilder();
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
if (envelopeBuilder_ != null) {
return envelopeBuilder_.getMessageOrBuilder();
} else {
return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
}
}
/**
*
*
*
* If doing something security critical, make sure to verify the signatures in
* this metadata.
*
*
* .grafeas.v1.Envelope envelope = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>
getEnvelopeFieldBuilder() {
if (envelopeBuilder_ == null) {
envelopeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Envelope,
io.grafeas.v1.Envelope.Builder,
io.grafeas.v1.EnvelopeOrBuilder>(getEnvelope(), getParentForChildren(), isClean());
envelope_ = null;
}
return envelopeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.InTotoStatement,
io.grafeas.v1.InTotoStatement.Builder,
io.grafeas.v1.InTotoStatementOrBuilder>
statementBuilder_;
/**
* .grafeas.v1.InTotoStatement statement = 2;
*
* @return Whether the statement field is set.
*/
@java.lang.Override
public boolean hasStatement() {
return decodedPayloadCase_ == 2;
}
/**
* .grafeas.v1.InTotoStatement statement = 2;
*
* @return The statement.
*/
@java.lang.Override
public io.grafeas.v1.InTotoStatement getStatement() {
if (statementBuilder_ == null) {
if (decodedPayloadCase_ == 2) {
return (io.grafeas.v1.InTotoStatement) decodedPayload_;
}
return io.grafeas.v1.InTotoStatement.getDefaultInstance();
} else {
if (decodedPayloadCase_ == 2) {
return statementBuilder_.getMessage();
}
return io.grafeas.v1.InTotoStatement.getDefaultInstance();
}
}
/** .grafeas.v1.InTotoStatement statement = 2; */
public Builder setStatement(io.grafeas.v1.InTotoStatement value) {
if (statementBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
decodedPayload_ = value;
onChanged();
} else {
statementBuilder_.setMessage(value);
}
decodedPayloadCase_ = 2;
return this;
}
/** .grafeas.v1.InTotoStatement statement = 2; */
public Builder setStatement(io.grafeas.v1.InTotoStatement.Builder builderForValue) {
if (statementBuilder_ == null) {
decodedPayload_ = builderForValue.build();
onChanged();
} else {
statementBuilder_.setMessage(builderForValue.build());
}
decodedPayloadCase_ = 2;
return this;
}
/** .grafeas.v1.InTotoStatement statement = 2; */
public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) {
if (statementBuilder_ == null) {
if (decodedPayloadCase_ == 2
&& decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) {
decodedPayload_ =
io.grafeas.v1.InTotoStatement.newBuilder(
(io.grafeas.v1.InTotoStatement) decodedPayload_)
.mergeFrom(value)
.buildPartial();
} else {
decodedPayload_ = value;
}
onChanged();
} else {
if (decodedPayloadCase_ == 2) {
statementBuilder_.mergeFrom(value);
} else {
statementBuilder_.setMessage(value);
}
}
decodedPayloadCase_ = 2;
return this;
}
/** .grafeas.v1.InTotoStatement statement = 2; */
public Builder clearStatement() {
if (statementBuilder_ == null) {
if (decodedPayloadCase_ == 2) {
decodedPayloadCase_ = 0;
decodedPayload_ = null;
onChanged();
}
} else {
if (decodedPayloadCase_ == 2) {
decodedPayloadCase_ = 0;
decodedPayload_ = null;
}
statementBuilder_.clear();
}
return this;
}
/** .grafeas.v1.InTotoStatement statement = 2; */
public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() {
return getStatementFieldBuilder().getBuilder();
}
/** .grafeas.v1.InTotoStatement statement = 2; */
@java.lang.Override
public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) {
return statementBuilder_.getMessageOrBuilder();
} else {
if (decodedPayloadCase_ == 2) {
return (io.grafeas.v1.InTotoStatement) decodedPayload_;
}
return io.grafeas.v1.InTotoStatement.getDefaultInstance();
}
}
/** .grafeas.v1.InTotoStatement statement = 2; */
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.InTotoStatement,
io.grafeas.v1.InTotoStatement.Builder,
io.grafeas.v1.InTotoStatementOrBuilder>
getStatementFieldBuilder() {
if (statementBuilder_ == null) {
if (!(decodedPayloadCase_ == 2)) {
decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance();
}
statementBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.InTotoStatement,
io.grafeas.v1.InTotoStatement.Builder,
io.grafeas.v1.InTotoStatementOrBuilder>(
(io.grafeas.v1.InTotoStatement) decodedPayload_, getParentForChildren(), isClean());
decodedPayload_ = null;
}
decodedPayloadCase_ = 2;
onChanged();
return statementBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence)
private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence();
}
public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser