• 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/common.proto
19 
20 package io.grafeas.v1;
21 
22 /**
23  *
24  *
25  * <pre>
26  * Kind represents the kinds of notes supported.
27  * </pre>
28  *
29  * Protobuf enum {@code grafeas.v1.NoteKind}
30  */
31 public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum {
32   /**
33    *
34    *
35    * <pre>
36    * Default value. This value is unused.
37    * </pre>
38    *
39    * <code>NOTE_KIND_UNSPECIFIED = 0;</code>
40    */
41   NOTE_KIND_UNSPECIFIED(0),
42   /**
43    *
44    *
45    * <pre>
46    * The note and occurrence represent a package vulnerability.
47    * </pre>
48    *
49    * <code>VULNERABILITY = 1;</code>
50    */
51   VULNERABILITY(1),
52   /**
53    *
54    *
55    * <pre>
56    * The note and occurrence assert build provenance.
57    * </pre>
58    *
59    * <code>BUILD = 2;</code>
60    */
61   BUILD(2),
62   /**
63    *
64    *
65    * <pre>
66    * This represents an image basis relationship.
67    * </pre>
68    *
69    * <code>IMAGE = 3;</code>
70    */
71   IMAGE(3),
72   /**
73    *
74    *
75    * <pre>
76    * This represents a package installed via a package manager.
77    * </pre>
78    *
79    * <code>PACKAGE = 4;</code>
80    */
81   PACKAGE(4),
82   /**
83    *
84    *
85    * <pre>
86    * The note and occurrence track deployment events.
87    * </pre>
88    *
89    * <code>DEPLOYMENT = 5;</code>
90    */
91   DEPLOYMENT(5),
92   /**
93    *
94    *
95    * <pre>
96    * The note and occurrence track the initial discovery status of a resource.
97    * </pre>
98    *
99    * <code>DISCOVERY = 6;</code>
100    */
101   DISCOVERY(6),
102   /**
103    *
104    *
105    * <pre>
106    * This represents a logical "role" that can attest to artifacts.
107    * </pre>
108    *
109    * <code>ATTESTATION = 7;</code>
110    */
111   ATTESTATION(7),
112   /**
113    *
114    *
115    * <pre>
116    * This represents an available package upgrade.
117    * </pre>
118    *
119    * <code>UPGRADE = 8;</code>
120    */
121   UPGRADE(8),
122   /**
123    *
124    *
125    * <pre>
126    * This represents a Compliance Note
127    * </pre>
128    *
129    * <code>COMPLIANCE = 9;</code>
130    */
131   COMPLIANCE(9),
132   /**
133    *
134    *
135    * <pre>
136    * This represents a DSSE attestation Note
137    * </pre>
138    *
139    * <code>DSSE_ATTESTATION = 10;</code>
140    */
141   DSSE_ATTESTATION(10),
142   /**
143    *
144    *
145    * <pre>
146    * This represents a Vulnerability Assessment.
147    * </pre>
148    *
149    * <code>VULNERABILITY_ASSESSMENT = 11;</code>
150    */
151   VULNERABILITY_ASSESSMENT(11),
152   UNRECOGNIZED(-1),
153   ;
154 
155   /**
156    *
157    *
158    * <pre>
159    * Default value. This value is unused.
160    * </pre>
161    *
162    * <code>NOTE_KIND_UNSPECIFIED = 0;</code>
163    */
164   public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0;
165   /**
166    *
167    *
168    * <pre>
169    * The note and occurrence represent a package vulnerability.
170    * </pre>
171    *
172    * <code>VULNERABILITY = 1;</code>
173    */
174   public static final int VULNERABILITY_VALUE = 1;
175   /**
176    *
177    *
178    * <pre>
179    * The note and occurrence assert build provenance.
180    * </pre>
181    *
182    * <code>BUILD = 2;</code>
183    */
184   public static final int BUILD_VALUE = 2;
185   /**
186    *
187    *
188    * <pre>
189    * This represents an image basis relationship.
190    * </pre>
191    *
192    * <code>IMAGE = 3;</code>
193    */
194   public static final int IMAGE_VALUE = 3;
195   /**
196    *
197    *
198    * <pre>
199    * This represents a package installed via a package manager.
200    * </pre>
201    *
202    * <code>PACKAGE = 4;</code>
203    */
204   public static final int PACKAGE_VALUE = 4;
205   /**
206    *
207    *
208    * <pre>
209    * The note and occurrence track deployment events.
210    * </pre>
211    *
212    * <code>DEPLOYMENT = 5;</code>
213    */
214   public static final int DEPLOYMENT_VALUE = 5;
215   /**
216    *
217    *
218    * <pre>
219    * The note and occurrence track the initial discovery status of a resource.
220    * </pre>
221    *
222    * <code>DISCOVERY = 6;</code>
223    */
224   public static final int DISCOVERY_VALUE = 6;
225   /**
226    *
227    *
228    * <pre>
229    * This represents a logical "role" that can attest to artifacts.
230    * </pre>
231    *
232    * <code>ATTESTATION = 7;</code>
233    */
234   public static final int ATTESTATION_VALUE = 7;
235   /**
236    *
237    *
238    * <pre>
239    * This represents an available package upgrade.
240    * </pre>
241    *
242    * <code>UPGRADE = 8;</code>
243    */
244   public static final int UPGRADE_VALUE = 8;
245   /**
246    *
247    *
248    * <pre>
249    * This represents a Compliance Note
250    * </pre>
251    *
252    * <code>COMPLIANCE = 9;</code>
253    */
254   public static final int COMPLIANCE_VALUE = 9;
255   /**
256    *
257    *
258    * <pre>
259    * This represents a DSSE attestation Note
260    * </pre>
261    *
262    * <code>DSSE_ATTESTATION = 10;</code>
263    */
264   public static final int DSSE_ATTESTATION_VALUE = 10;
265   /**
266    *
267    *
268    * <pre>
269    * This represents a Vulnerability Assessment.
270    * </pre>
271    *
272    * <code>VULNERABILITY_ASSESSMENT = 11;</code>
273    */
274   public static final int VULNERABILITY_ASSESSMENT_VALUE = 11;
275 
getNumber()276   public final int getNumber() {
277     if (this == UNRECOGNIZED) {
278       throw new java.lang.IllegalArgumentException(
279           "Can't get the number of an unknown enum value.");
280     }
281     return value;
282   }
283 
284   /**
285    * @param value The numeric wire value of the corresponding enum entry.
286    * @return The enum associated with the given numeric wire value.
287    * @deprecated Use {@link #forNumber(int)} instead.
288    */
289   @java.lang.Deprecated
valueOf(int value)290   public static NoteKind valueOf(int value) {
291     return forNumber(value);
292   }
293 
294   /**
295    * @param value The numeric wire value of the corresponding enum entry.
296    * @return The enum associated with the given numeric wire value.
297    */
forNumber(int value)298   public static NoteKind forNumber(int value) {
299     switch (value) {
300       case 0:
301         return NOTE_KIND_UNSPECIFIED;
302       case 1:
303         return VULNERABILITY;
304       case 2:
305         return BUILD;
306       case 3:
307         return IMAGE;
308       case 4:
309         return PACKAGE;
310       case 5:
311         return DEPLOYMENT;
312       case 6:
313         return DISCOVERY;
314       case 7:
315         return ATTESTATION;
316       case 8:
317         return UPGRADE;
318       case 9:
319         return COMPLIANCE;
320       case 10:
321         return DSSE_ATTESTATION;
322       case 11:
323         return VULNERABILITY_ASSESSMENT;
324       default:
325         return null;
326     }
327   }
328 
internalGetValueMap()329   public static com.google.protobuf.Internal.EnumLiteMap<NoteKind> internalGetValueMap() {
330     return internalValueMap;
331   }
332 
333   private static final com.google.protobuf.Internal.EnumLiteMap<NoteKind> internalValueMap =
334       new com.google.protobuf.Internal.EnumLiteMap<NoteKind>() {
335         public NoteKind findValueByNumber(int number) {
336           return NoteKind.forNumber(number);
337         }
338       };
339 
getValueDescriptor()340   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
341     if (this == UNRECOGNIZED) {
342       throw new java.lang.IllegalStateException(
343           "Can't get the descriptor of an unrecognized enum value.");
344     }
345     return getDescriptor().getValues().get(ordinal());
346   }
347 
getDescriptorForType()348   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
349     return getDescriptor();
350   }
351 
getDescriptor()352   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
353     return io.grafeas.v1.Common.getDescriptor().getEnumTypes().get(0);
354   }
355 
356   private static final NoteKind[] VALUES = values();
357 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)358   public static NoteKind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
359     if (desc.getType() != getDescriptor()) {
360       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
361     }
362     if (desc.getIndex() == -1) {
363       return UNRECOGNIZED;
364     }
365     return VALUES[desc.getIndex()];
366   }
367 
368   private final int value;
369 
NoteKind(int value)370   private NoteKind(int value) {
371     this.value = value;
372   }
373 
374   // @@protoc_insertion_point(enum_scope:grafeas.v1.NoteKind)
375 }
376