• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 The Grafeas Authors. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 // Generated by the protocol buffer compiler.  DO NOT EDIT!
18 // source: grafeas/v1/dsse_attestation.proto
19 
20 package io.grafeas.v1;
21 
22 /**
23  *
24  *
25  * <pre>
26  * Deprecated. Prefer to use a regular Occurrence, and populate the
27  * Envelope at the top level of the Occurrence.
28  * </pre>
29  *
30  * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence}
31  */
32 public final class DSSEAttestationOccurrence extends com.google.protobuf.GeneratedMessageV3
33     implements
34     // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence)
35     DSSEAttestationOccurrenceOrBuilder {
36   private static final long serialVersionUID = 0L;
37   // Use DSSEAttestationOccurrence.newBuilder() to construct.
DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38   private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
39     super(builder);
40   }
41 
DSSEAttestationOccurrence()42   private DSSEAttestationOccurrence() {}
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new DSSEAttestationOccurrence();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return io.grafeas.v1.DsseAttestation
57         .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return io.grafeas.v1.DsseAttestation
64         .internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             io.grafeas.v1.DSSEAttestationOccurrence.class,
67             io.grafeas.v1.DSSEAttestationOccurrence.Builder.class);
68   }
69 
70   private int decodedPayloadCase_ = 0;
71   private java.lang.Object decodedPayload_;
72 
73   public enum DecodedPayloadCase
74       implements
75           com.google.protobuf.Internal.EnumLite,
76           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
77     STATEMENT(2),
78     DECODEDPAYLOAD_NOT_SET(0);
79     private final int value;
80 
DecodedPayloadCase(int value)81     private DecodedPayloadCase(int value) {
82       this.value = value;
83     }
84     /**
85      * @param value The number of the enum to look for.
86      * @return The enum associated with the given number.
87      * @deprecated Use {@link #forNumber(int)} instead.
88      */
89     @java.lang.Deprecated
valueOf(int value)90     public static DecodedPayloadCase valueOf(int value) {
91       return forNumber(value);
92     }
93 
forNumber(int value)94     public static DecodedPayloadCase forNumber(int value) {
95       switch (value) {
96         case 2:
97           return STATEMENT;
98         case 0:
99           return DECODEDPAYLOAD_NOT_SET;
100         default:
101           return null;
102       }
103     }
104 
getNumber()105     public int getNumber() {
106       return this.value;
107     }
108   };
109 
getDecodedPayloadCase()110   public DecodedPayloadCase getDecodedPayloadCase() {
111     return DecodedPayloadCase.forNumber(decodedPayloadCase_);
112   }
113 
114   public static final int ENVELOPE_FIELD_NUMBER = 1;
115   private io.grafeas.v1.Envelope envelope_;
116   /**
117    *
118    *
119    * <pre>
120    * If doing something security critical, make sure to verify the signatures in
121    * this metadata.
122    * </pre>
123    *
124    * <code>.grafeas.v1.Envelope envelope = 1;</code>
125    *
126    * @return Whether the envelope field is set.
127    */
128   @java.lang.Override
hasEnvelope()129   public boolean hasEnvelope() {
130     return envelope_ != null;
131   }
132   /**
133    *
134    *
135    * <pre>
136    * If doing something security critical, make sure to verify the signatures in
137    * this metadata.
138    * </pre>
139    *
140    * <code>.grafeas.v1.Envelope envelope = 1;</code>
141    *
142    * @return The envelope.
143    */
144   @java.lang.Override
getEnvelope()145   public io.grafeas.v1.Envelope getEnvelope() {
146     return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
147   }
148   /**
149    *
150    *
151    * <pre>
152    * If doing something security critical, make sure to verify the signatures in
153    * this metadata.
154    * </pre>
155    *
156    * <code>.grafeas.v1.Envelope envelope = 1;</code>
157    */
158   @java.lang.Override
getEnvelopeOrBuilder()159   public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
160     return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
161   }
162 
163   public static final int STATEMENT_FIELD_NUMBER = 2;
164   /**
165    * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
166    *
167    * @return Whether the statement field is set.
168    */
169   @java.lang.Override
hasStatement()170   public boolean hasStatement() {
171     return decodedPayloadCase_ == 2;
172   }
173   /**
174    * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
175    *
176    * @return The statement.
177    */
178   @java.lang.Override
getStatement()179   public io.grafeas.v1.InTotoStatement getStatement() {
180     if (decodedPayloadCase_ == 2) {
181       return (io.grafeas.v1.InTotoStatement) decodedPayload_;
182     }
183     return io.grafeas.v1.InTotoStatement.getDefaultInstance();
184   }
185   /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
186   @java.lang.Override
getStatementOrBuilder()187   public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
188     if (decodedPayloadCase_ == 2) {
189       return (io.grafeas.v1.InTotoStatement) decodedPayload_;
190     }
191     return io.grafeas.v1.InTotoStatement.getDefaultInstance();
192   }
193 
194   private byte memoizedIsInitialized = -1;
195 
196   @java.lang.Override
isInitialized()197   public final boolean isInitialized() {
198     byte isInitialized = memoizedIsInitialized;
199     if (isInitialized == 1) return true;
200     if (isInitialized == 0) return false;
201 
202     memoizedIsInitialized = 1;
203     return true;
204   }
205 
206   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)207   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
208     if (envelope_ != null) {
209       output.writeMessage(1, getEnvelope());
210     }
211     if (decodedPayloadCase_ == 2) {
212       output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
213     }
214     getUnknownFields().writeTo(output);
215   }
216 
217   @java.lang.Override
getSerializedSize()218   public int getSerializedSize() {
219     int size = memoizedSize;
220     if (size != -1) return size;
221 
222     size = 0;
223     if (envelope_ != null) {
224       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvelope());
225     }
226     if (decodedPayloadCase_ == 2) {
227       size +=
228           com.google.protobuf.CodedOutputStream.computeMessageSize(
229               2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
230     }
231     size += getUnknownFields().getSerializedSize();
232     memoizedSize = size;
233     return size;
234   }
235 
236   @java.lang.Override
equals(final java.lang.Object obj)237   public boolean equals(final java.lang.Object obj) {
238     if (obj == this) {
239       return true;
240     }
241     if (!(obj instanceof io.grafeas.v1.DSSEAttestationOccurrence)) {
242       return super.equals(obj);
243     }
244     io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj;
245 
246     if (hasEnvelope() != other.hasEnvelope()) return false;
247     if (hasEnvelope()) {
248       if (!getEnvelope().equals(other.getEnvelope())) return false;
249     }
250     if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false;
251     switch (decodedPayloadCase_) {
252       case 2:
253         if (!getStatement().equals(other.getStatement())) return false;
254         break;
255       case 0:
256       default:
257     }
258     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
259     return true;
260   }
261 
262   @java.lang.Override
hashCode()263   public int hashCode() {
264     if (memoizedHashCode != 0) {
265       return memoizedHashCode;
266     }
267     int hash = 41;
268     hash = (19 * hash) + getDescriptor().hashCode();
269     if (hasEnvelope()) {
270       hash = (37 * hash) + ENVELOPE_FIELD_NUMBER;
271       hash = (53 * hash) + getEnvelope().hashCode();
272     }
273     switch (decodedPayloadCase_) {
274       case 2:
275         hash = (37 * hash) + STATEMENT_FIELD_NUMBER;
276         hash = (53 * hash) + getStatement().hashCode();
277         break;
278       case 0:
279       default:
280     }
281     hash = (29 * hash) + getUnknownFields().hashCode();
282     memoizedHashCode = hash;
283     return hash;
284   }
285 
parseFrom(java.nio.ByteBuffer data)286   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.nio.ByteBuffer data)
287       throws com.google.protobuf.InvalidProtocolBufferException {
288     return PARSER.parseFrom(data);
289   }
290 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)291   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
292       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293       throws com.google.protobuf.InvalidProtocolBufferException {
294     return PARSER.parseFrom(data, extensionRegistry);
295   }
296 
parseFrom( com.google.protobuf.ByteString data)297   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
298       com.google.protobuf.ByteString data)
299       throws com.google.protobuf.InvalidProtocolBufferException {
300     return PARSER.parseFrom(data);
301   }
302 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)303   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
304       com.google.protobuf.ByteString data,
305       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
306       throws com.google.protobuf.InvalidProtocolBufferException {
307     return PARSER.parseFrom(data, extensionRegistry);
308   }
309 
parseFrom(byte[] data)310   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data)
311       throws com.google.protobuf.InvalidProtocolBufferException {
312     return PARSER.parseFrom(data);
313   }
314 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)315   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
316       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
317       throws com.google.protobuf.InvalidProtocolBufferException {
318     return PARSER.parseFrom(data, extensionRegistry);
319   }
320 
parseFrom(java.io.InputStream input)321   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input)
322       throws java.io.IOException {
323     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
324   }
325 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)326   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
327       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328       throws java.io.IOException {
329     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
330         PARSER, input, extensionRegistry);
331   }
332 
parseDelimitedFrom( java.io.InputStream input)333   public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(
334       java.io.InputStream input) throws java.io.IOException {
335     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
336   }
337 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)338   public static io.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(
339       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
340       throws java.io.IOException {
341     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
342         PARSER, input, extensionRegistry);
343   }
344 
parseFrom( com.google.protobuf.CodedInputStream input)345   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
346       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
347     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
348   }
349 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)350   public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
351       com.google.protobuf.CodedInputStream input,
352       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
353       throws java.io.IOException {
354     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
355         PARSER, input, extensionRegistry);
356   }
357 
358   @java.lang.Override
newBuilderForType()359   public Builder newBuilderForType() {
360     return newBuilder();
361   }
362 
newBuilder()363   public static Builder newBuilder() {
364     return DEFAULT_INSTANCE.toBuilder();
365   }
366 
newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype)367   public static Builder newBuilder(io.grafeas.v1.DSSEAttestationOccurrence prototype) {
368     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
369   }
370 
371   @java.lang.Override
toBuilder()372   public Builder toBuilder() {
373     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
374   }
375 
376   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)377   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
378     Builder builder = new Builder(parent);
379     return builder;
380   }
381   /**
382    *
383    *
384    * <pre>
385    * Deprecated. Prefer to use a regular Occurrence, and populate the
386    * Envelope at the top level of the Occurrence.
387    * </pre>
388    *
389    * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence}
390    */
391   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
392       implements
393       // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence)
394       io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder {
getDescriptor()395     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
396       return io.grafeas.v1.DsseAttestation
397           .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
398     }
399 
400     @java.lang.Override
401     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()402         internalGetFieldAccessorTable() {
403       return io.grafeas.v1.DsseAttestation
404           .internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable
405           .ensureFieldAccessorsInitialized(
406               io.grafeas.v1.DSSEAttestationOccurrence.class,
407               io.grafeas.v1.DSSEAttestationOccurrence.Builder.class);
408     }
409 
410     // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder()
Builder()411     private Builder() {}
412 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)413     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
414       super(parent);
415     }
416 
417     @java.lang.Override
clear()418     public Builder clear() {
419       super.clear();
420       bitField0_ = 0;
421       envelope_ = null;
422       if (envelopeBuilder_ != null) {
423         envelopeBuilder_.dispose();
424         envelopeBuilder_ = null;
425       }
426       if (statementBuilder_ != null) {
427         statementBuilder_.clear();
428       }
429       decodedPayloadCase_ = 0;
430       decodedPayload_ = null;
431       return this;
432     }
433 
434     @java.lang.Override
getDescriptorForType()435     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
436       return io.grafeas.v1.DsseAttestation
437           .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
438     }
439 
440     @java.lang.Override
getDefaultInstanceForType()441     public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() {
442       return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance();
443     }
444 
445     @java.lang.Override
build()446     public io.grafeas.v1.DSSEAttestationOccurrence build() {
447       io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial();
448       if (!result.isInitialized()) {
449         throw newUninitializedMessageException(result);
450       }
451       return result;
452     }
453 
454     @java.lang.Override
buildPartial()455     public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() {
456       io.grafeas.v1.DSSEAttestationOccurrence result =
457           new io.grafeas.v1.DSSEAttestationOccurrence(this);
458       if (bitField0_ != 0) {
459         buildPartial0(result);
460       }
461       buildPartialOneofs(result);
462       onBuilt();
463       return result;
464     }
465 
buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result)466     private void buildPartial0(io.grafeas.v1.DSSEAttestationOccurrence result) {
467       int from_bitField0_ = bitField0_;
468       if (((from_bitField0_ & 0x00000001) != 0)) {
469         result.envelope_ = envelopeBuilder_ == null ? envelope_ : envelopeBuilder_.build();
470       }
471     }
472 
buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result)473     private void buildPartialOneofs(io.grafeas.v1.DSSEAttestationOccurrence result) {
474       result.decodedPayloadCase_ = decodedPayloadCase_;
475       result.decodedPayload_ = this.decodedPayload_;
476       if (decodedPayloadCase_ == 2 && statementBuilder_ != null) {
477         result.decodedPayload_ = statementBuilder_.build();
478       }
479     }
480 
481     @java.lang.Override
clone()482     public Builder clone() {
483       return super.clone();
484     }
485 
486     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)487     public Builder setField(
488         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
489       return super.setField(field, value);
490     }
491 
492     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)493     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
494       return super.clearField(field);
495     }
496 
497     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)498     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
499       return super.clearOneof(oneof);
500     }
501 
502     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)503     public Builder setRepeatedField(
504         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
505       return super.setRepeatedField(field, index, value);
506     }
507 
508     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)509     public Builder addRepeatedField(
510         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
511       return super.addRepeatedField(field, value);
512     }
513 
514     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)515     public Builder mergeFrom(com.google.protobuf.Message other) {
516       if (other instanceof io.grafeas.v1.DSSEAttestationOccurrence) {
517         return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence) other);
518       } else {
519         super.mergeFrom(other);
520         return this;
521       }
522     }
523 
mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other)524     public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) {
525       if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this;
526       if (other.hasEnvelope()) {
527         mergeEnvelope(other.getEnvelope());
528       }
529       switch (other.getDecodedPayloadCase()) {
530         case STATEMENT:
531           {
532             mergeStatement(other.getStatement());
533             break;
534           }
535         case DECODEDPAYLOAD_NOT_SET:
536           {
537             break;
538           }
539       }
540       this.mergeUnknownFields(other.getUnknownFields());
541       onChanged();
542       return this;
543     }
544 
545     @java.lang.Override
isInitialized()546     public final boolean isInitialized() {
547       return true;
548     }
549 
550     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)551     public Builder mergeFrom(
552         com.google.protobuf.CodedInputStream input,
553         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
554         throws java.io.IOException {
555       if (extensionRegistry == null) {
556         throw new java.lang.NullPointerException();
557       }
558       try {
559         boolean done = false;
560         while (!done) {
561           int tag = input.readTag();
562           switch (tag) {
563             case 0:
564               done = true;
565               break;
566             case 10:
567               {
568                 input.readMessage(getEnvelopeFieldBuilder().getBuilder(), extensionRegistry);
569                 bitField0_ |= 0x00000001;
570                 break;
571               } // case 10
572             case 18:
573               {
574                 input.readMessage(getStatementFieldBuilder().getBuilder(), extensionRegistry);
575                 decodedPayloadCase_ = 2;
576                 break;
577               } // case 18
578             default:
579               {
580                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
581                   done = true; // was an endgroup tag
582                 }
583                 break;
584               } // default:
585           } // switch (tag)
586         } // while (!done)
587       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
588         throw e.unwrapIOException();
589       } finally {
590         onChanged();
591       } // finally
592       return this;
593     }
594 
595     private int decodedPayloadCase_ = 0;
596     private java.lang.Object decodedPayload_;
597 
getDecodedPayloadCase()598     public DecodedPayloadCase getDecodedPayloadCase() {
599       return DecodedPayloadCase.forNumber(decodedPayloadCase_);
600     }
601 
clearDecodedPayload()602     public Builder clearDecodedPayload() {
603       decodedPayloadCase_ = 0;
604       decodedPayload_ = null;
605       onChanged();
606       return this;
607     }
608 
609     private int bitField0_;
610 
611     private io.grafeas.v1.Envelope envelope_;
612     private com.google.protobuf.SingleFieldBuilderV3<
613             io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>
614         envelopeBuilder_;
615     /**
616      *
617      *
618      * <pre>
619      * If doing something security critical, make sure to verify the signatures in
620      * this metadata.
621      * </pre>
622      *
623      * <code>.grafeas.v1.Envelope envelope = 1;</code>
624      *
625      * @return Whether the envelope field is set.
626      */
hasEnvelope()627     public boolean hasEnvelope() {
628       return ((bitField0_ & 0x00000001) != 0);
629     }
630     /**
631      *
632      *
633      * <pre>
634      * If doing something security critical, make sure to verify the signatures in
635      * this metadata.
636      * </pre>
637      *
638      * <code>.grafeas.v1.Envelope envelope = 1;</code>
639      *
640      * @return The envelope.
641      */
getEnvelope()642     public io.grafeas.v1.Envelope getEnvelope() {
643       if (envelopeBuilder_ == null) {
644         return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
645       } else {
646         return envelopeBuilder_.getMessage();
647       }
648     }
649     /**
650      *
651      *
652      * <pre>
653      * If doing something security critical, make sure to verify the signatures in
654      * this metadata.
655      * </pre>
656      *
657      * <code>.grafeas.v1.Envelope envelope = 1;</code>
658      */
setEnvelope(io.grafeas.v1.Envelope value)659     public Builder setEnvelope(io.grafeas.v1.Envelope value) {
660       if (envelopeBuilder_ == null) {
661         if (value == null) {
662           throw new NullPointerException();
663         }
664         envelope_ = value;
665       } else {
666         envelopeBuilder_.setMessage(value);
667       }
668       bitField0_ |= 0x00000001;
669       onChanged();
670       return this;
671     }
672     /**
673      *
674      *
675      * <pre>
676      * If doing something security critical, make sure to verify the signatures in
677      * this metadata.
678      * </pre>
679      *
680      * <code>.grafeas.v1.Envelope envelope = 1;</code>
681      */
setEnvelope(io.grafeas.v1.Envelope.Builder builderForValue)682     public Builder setEnvelope(io.grafeas.v1.Envelope.Builder builderForValue) {
683       if (envelopeBuilder_ == null) {
684         envelope_ = builderForValue.build();
685       } else {
686         envelopeBuilder_.setMessage(builderForValue.build());
687       }
688       bitField0_ |= 0x00000001;
689       onChanged();
690       return this;
691     }
692     /**
693      *
694      *
695      * <pre>
696      * If doing something security critical, make sure to verify the signatures in
697      * this metadata.
698      * </pre>
699      *
700      * <code>.grafeas.v1.Envelope envelope = 1;</code>
701      */
mergeEnvelope(io.grafeas.v1.Envelope value)702     public Builder mergeEnvelope(io.grafeas.v1.Envelope value) {
703       if (envelopeBuilder_ == null) {
704         if (((bitField0_ & 0x00000001) != 0)
705             && envelope_ != null
706             && envelope_ != io.grafeas.v1.Envelope.getDefaultInstance()) {
707           getEnvelopeBuilder().mergeFrom(value);
708         } else {
709           envelope_ = value;
710         }
711       } else {
712         envelopeBuilder_.mergeFrom(value);
713       }
714       bitField0_ |= 0x00000001;
715       onChanged();
716       return this;
717     }
718     /**
719      *
720      *
721      * <pre>
722      * If doing something security critical, make sure to verify the signatures in
723      * this metadata.
724      * </pre>
725      *
726      * <code>.grafeas.v1.Envelope envelope = 1;</code>
727      */
clearEnvelope()728     public Builder clearEnvelope() {
729       bitField0_ = (bitField0_ & ~0x00000001);
730       envelope_ = null;
731       if (envelopeBuilder_ != null) {
732         envelopeBuilder_.dispose();
733         envelopeBuilder_ = null;
734       }
735       onChanged();
736       return this;
737     }
738     /**
739      *
740      *
741      * <pre>
742      * If doing something security critical, make sure to verify the signatures in
743      * this metadata.
744      * </pre>
745      *
746      * <code>.grafeas.v1.Envelope envelope = 1;</code>
747      */
getEnvelopeBuilder()748     public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() {
749       bitField0_ |= 0x00000001;
750       onChanged();
751       return getEnvelopeFieldBuilder().getBuilder();
752     }
753     /**
754      *
755      *
756      * <pre>
757      * If doing something security critical, make sure to verify the signatures in
758      * this metadata.
759      * </pre>
760      *
761      * <code>.grafeas.v1.Envelope envelope = 1;</code>
762      */
getEnvelopeOrBuilder()763     public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
764       if (envelopeBuilder_ != null) {
765         return envelopeBuilder_.getMessageOrBuilder();
766       } else {
767         return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
768       }
769     }
770     /**
771      *
772      *
773      * <pre>
774      * If doing something security critical, make sure to verify the signatures in
775      * this metadata.
776      * </pre>
777      *
778      * <code>.grafeas.v1.Envelope envelope = 1;</code>
779      */
780     private com.google.protobuf.SingleFieldBuilderV3<
781             io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>
getEnvelopeFieldBuilder()782         getEnvelopeFieldBuilder() {
783       if (envelopeBuilder_ == null) {
784         envelopeBuilder_ =
785             new com.google.protobuf.SingleFieldBuilderV3<
786                 io.grafeas.v1.Envelope,
787                 io.grafeas.v1.Envelope.Builder,
788                 io.grafeas.v1.EnvelopeOrBuilder>(getEnvelope(), getParentForChildren(), isClean());
789         envelope_ = null;
790       }
791       return envelopeBuilder_;
792     }
793 
794     private com.google.protobuf.SingleFieldBuilderV3<
795             io.grafeas.v1.InTotoStatement,
796             io.grafeas.v1.InTotoStatement.Builder,
797             io.grafeas.v1.InTotoStatementOrBuilder>
798         statementBuilder_;
799     /**
800      * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
801      *
802      * @return Whether the statement field is set.
803      */
804     @java.lang.Override
hasStatement()805     public boolean hasStatement() {
806       return decodedPayloadCase_ == 2;
807     }
808     /**
809      * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
810      *
811      * @return The statement.
812      */
813     @java.lang.Override
getStatement()814     public io.grafeas.v1.InTotoStatement getStatement() {
815       if (statementBuilder_ == null) {
816         if (decodedPayloadCase_ == 2) {
817           return (io.grafeas.v1.InTotoStatement) decodedPayload_;
818         }
819         return io.grafeas.v1.InTotoStatement.getDefaultInstance();
820       } else {
821         if (decodedPayloadCase_ == 2) {
822           return statementBuilder_.getMessage();
823         }
824         return io.grafeas.v1.InTotoStatement.getDefaultInstance();
825       }
826     }
827     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
setStatement(io.grafeas.v1.InTotoStatement value)828     public Builder setStatement(io.grafeas.v1.InTotoStatement value) {
829       if (statementBuilder_ == null) {
830         if (value == null) {
831           throw new NullPointerException();
832         }
833         decodedPayload_ = value;
834         onChanged();
835       } else {
836         statementBuilder_.setMessage(value);
837       }
838       decodedPayloadCase_ = 2;
839       return this;
840     }
841     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
setStatement(io.grafeas.v1.InTotoStatement.Builder builderForValue)842     public Builder setStatement(io.grafeas.v1.InTotoStatement.Builder builderForValue) {
843       if (statementBuilder_ == null) {
844         decodedPayload_ = builderForValue.build();
845         onChanged();
846       } else {
847         statementBuilder_.setMessage(builderForValue.build());
848       }
849       decodedPayloadCase_ = 2;
850       return this;
851     }
852     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
mergeStatement(io.grafeas.v1.InTotoStatement value)853     public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) {
854       if (statementBuilder_ == null) {
855         if (decodedPayloadCase_ == 2
856             && decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) {
857           decodedPayload_ =
858               io.grafeas.v1.InTotoStatement.newBuilder(
859                       (io.grafeas.v1.InTotoStatement) decodedPayload_)
860                   .mergeFrom(value)
861                   .buildPartial();
862         } else {
863           decodedPayload_ = value;
864         }
865         onChanged();
866       } else {
867         if (decodedPayloadCase_ == 2) {
868           statementBuilder_.mergeFrom(value);
869         } else {
870           statementBuilder_.setMessage(value);
871         }
872       }
873       decodedPayloadCase_ = 2;
874       return this;
875     }
876     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
clearStatement()877     public Builder clearStatement() {
878       if (statementBuilder_ == null) {
879         if (decodedPayloadCase_ == 2) {
880           decodedPayloadCase_ = 0;
881           decodedPayload_ = null;
882           onChanged();
883         }
884       } else {
885         if (decodedPayloadCase_ == 2) {
886           decodedPayloadCase_ = 0;
887           decodedPayload_ = null;
888         }
889         statementBuilder_.clear();
890       }
891       return this;
892     }
893     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
getStatementBuilder()894     public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() {
895       return getStatementFieldBuilder().getBuilder();
896     }
897     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
898     @java.lang.Override
getStatementOrBuilder()899     public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
900       if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) {
901         return statementBuilder_.getMessageOrBuilder();
902       } else {
903         if (decodedPayloadCase_ == 2) {
904           return (io.grafeas.v1.InTotoStatement) decodedPayload_;
905         }
906         return io.grafeas.v1.InTotoStatement.getDefaultInstance();
907       }
908     }
909     /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
910     private com.google.protobuf.SingleFieldBuilderV3<
911             io.grafeas.v1.InTotoStatement,
912             io.grafeas.v1.InTotoStatement.Builder,
913             io.grafeas.v1.InTotoStatementOrBuilder>
getStatementFieldBuilder()914         getStatementFieldBuilder() {
915       if (statementBuilder_ == null) {
916         if (!(decodedPayloadCase_ == 2)) {
917           decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance();
918         }
919         statementBuilder_ =
920             new com.google.protobuf.SingleFieldBuilderV3<
921                 io.grafeas.v1.InTotoStatement,
922                 io.grafeas.v1.InTotoStatement.Builder,
923                 io.grafeas.v1.InTotoStatementOrBuilder>(
924                 (io.grafeas.v1.InTotoStatement) decodedPayload_, getParentForChildren(), isClean());
925         decodedPayload_ = null;
926       }
927       decodedPayloadCase_ = 2;
928       onChanged();
929       return statementBuilder_;
930     }
931 
932     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)933     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
934       return super.setUnknownFields(unknownFields);
935     }
936 
937     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)938     public final Builder mergeUnknownFields(
939         final com.google.protobuf.UnknownFieldSet unknownFields) {
940       return super.mergeUnknownFields(unknownFields);
941     }
942 
943     // @@protoc_insertion_point(builder_scope:grafeas.v1.DSSEAttestationOccurrence)
944   }
945 
946   // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence)
947   private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE;
948 
949   static {
950     DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence();
951   }
952 
getDefaultInstance()953   public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() {
954     return DEFAULT_INSTANCE;
955   }
956 
957   private static final com.google.protobuf.Parser<DSSEAttestationOccurrence> PARSER =
958       new com.google.protobuf.AbstractParser<DSSEAttestationOccurrence>() {
959         @java.lang.Override
960         public DSSEAttestationOccurrence parsePartialFrom(
961             com.google.protobuf.CodedInputStream input,
962             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
963             throws com.google.protobuf.InvalidProtocolBufferException {
964           Builder builder = newBuilder();
965           try {
966             builder.mergeFrom(input, extensionRegistry);
967           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
968             throw e.setUnfinishedMessage(builder.buildPartial());
969           } catch (com.google.protobuf.UninitializedMessageException e) {
970             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
971           } catch (java.io.IOException e) {
972             throw new com.google.protobuf.InvalidProtocolBufferException(e)
973                 .setUnfinishedMessage(builder.buildPartial());
974           }
975           return builder.buildPartial();
976         }
977       };
978 
parser()979   public static com.google.protobuf.Parser<DSSEAttestationOccurrence> parser() {
980     return PARSER;
981   }
982 
983   @java.lang.Override
getParserForType()984   public com.google.protobuf.Parser<DSSEAttestationOccurrence> getParserForType() {
985     return PARSER;
986   }
987 
988   @java.lang.Override
getDefaultInstanceForType()989   public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() {
990     return DEFAULT_INSTANCE;
991   }
992 }
993