1 /* 2 * Copyright 2020 Google LLC 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 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/devtools/containeranalysis/v1beta1/common/common.proto 18 19 package io.grafeas.v1beta1.common; 20 21 /** 22 * 23 * 24 * <pre> 25 * Kind represents the kinds of notes supported. 26 * </pre> 27 * 28 * Protobuf enum {@code grafeas.v1beta1.NoteKind} 29 */ 30 public enum NoteKind implements com.google.protobuf.ProtocolMessageEnum { 31 /** 32 * 33 * 34 * <pre> 35 * Unknown. 36 * </pre> 37 * 38 * <code>NOTE_KIND_UNSPECIFIED = 0;</code> 39 */ 40 NOTE_KIND_UNSPECIFIED(0), 41 /** 42 * 43 * 44 * <pre> 45 * The note and occurrence represent a package vulnerability. 46 * </pre> 47 * 48 * <code>VULNERABILITY = 1;</code> 49 */ 50 VULNERABILITY(1), 51 /** 52 * 53 * 54 * <pre> 55 * The note and occurrence assert build provenance. 56 * </pre> 57 * 58 * <code>BUILD = 2;</code> 59 */ 60 BUILD(2), 61 /** 62 * 63 * 64 * <pre> 65 * This represents an image basis relationship. 66 * </pre> 67 * 68 * <code>IMAGE = 3;</code> 69 */ 70 IMAGE(3), 71 /** 72 * 73 * 74 * <pre> 75 * This represents a package installed via a package manager. 76 * </pre> 77 * 78 * <code>PACKAGE = 4;</code> 79 */ 80 PACKAGE(4), 81 /** 82 * 83 * 84 * <pre> 85 * The note and occurrence track deployment events. 86 * </pre> 87 * 88 * <code>DEPLOYMENT = 5;</code> 89 */ 90 DEPLOYMENT(5), 91 /** 92 * 93 * 94 * <pre> 95 * The note and occurrence track the initial discovery status of a resource. 96 * </pre> 97 * 98 * <code>DISCOVERY = 6;</code> 99 */ 100 DISCOVERY(6), 101 /** 102 * 103 * 104 * <pre> 105 * This represents a logical "role" that can attest to artifacts. 106 * </pre> 107 * 108 * <code>ATTESTATION = 7;</code> 109 */ 110 ATTESTATION(7), 111 UNRECOGNIZED(-1), 112 ; 113 114 /** 115 * 116 * 117 * <pre> 118 * Unknown. 119 * </pre> 120 * 121 * <code>NOTE_KIND_UNSPECIFIED = 0;</code> 122 */ 123 public static final int NOTE_KIND_UNSPECIFIED_VALUE = 0; 124 /** 125 * 126 * 127 * <pre> 128 * The note and occurrence represent a package vulnerability. 129 * </pre> 130 * 131 * <code>VULNERABILITY = 1;</code> 132 */ 133 public static final int VULNERABILITY_VALUE = 1; 134 /** 135 * 136 * 137 * <pre> 138 * The note and occurrence assert build provenance. 139 * </pre> 140 * 141 * <code>BUILD = 2;</code> 142 */ 143 public static final int BUILD_VALUE = 2; 144 /** 145 * 146 * 147 * <pre> 148 * This represents an image basis relationship. 149 * </pre> 150 * 151 * <code>IMAGE = 3;</code> 152 */ 153 public static final int IMAGE_VALUE = 3; 154 /** 155 * 156 * 157 * <pre> 158 * This represents a package installed via a package manager. 159 * </pre> 160 * 161 * <code>PACKAGE = 4;</code> 162 */ 163 public static final int PACKAGE_VALUE = 4; 164 /** 165 * 166 * 167 * <pre> 168 * The note and occurrence track deployment events. 169 * </pre> 170 * 171 * <code>DEPLOYMENT = 5;</code> 172 */ 173 public static final int DEPLOYMENT_VALUE = 5; 174 /** 175 * 176 * 177 * <pre> 178 * The note and occurrence track the initial discovery status of a resource. 179 * </pre> 180 * 181 * <code>DISCOVERY = 6;</code> 182 */ 183 public static final int DISCOVERY_VALUE = 6; 184 /** 185 * 186 * 187 * <pre> 188 * This represents a logical "role" that can attest to artifacts. 189 * </pre> 190 * 191 * <code>ATTESTATION = 7;</code> 192 */ 193 public static final int ATTESTATION_VALUE = 7; 194 getNumber()195 public final int getNumber() { 196 if (this == UNRECOGNIZED) { 197 throw new java.lang.IllegalArgumentException( 198 "Can't get the number of an unknown enum value."); 199 } 200 return value; 201 } 202 203 /** 204 * @param value The numeric wire value of the corresponding enum entry. 205 * @return The enum associated with the given numeric wire value. 206 * @deprecated Use {@link #forNumber(int)} instead. 207 */ 208 @java.lang.Deprecated valueOf(int value)209 public static NoteKind valueOf(int value) { 210 return forNumber(value); 211 } 212 213 /** 214 * @param value The numeric wire value of the corresponding enum entry. 215 * @return The enum associated with the given numeric wire value. 216 */ forNumber(int value)217 public static NoteKind forNumber(int value) { 218 switch (value) { 219 case 0: 220 return NOTE_KIND_UNSPECIFIED; 221 case 1: 222 return VULNERABILITY; 223 case 2: 224 return BUILD; 225 case 3: 226 return IMAGE; 227 case 4: 228 return PACKAGE; 229 case 5: 230 return DEPLOYMENT; 231 case 6: 232 return DISCOVERY; 233 case 7: 234 return ATTESTATION; 235 default: 236 return null; 237 } 238 } 239 internalGetValueMap()240 public static com.google.protobuf.Internal.EnumLiteMap<NoteKind> internalGetValueMap() { 241 return internalValueMap; 242 } 243 244 private static final com.google.protobuf.Internal.EnumLiteMap<NoteKind> internalValueMap = 245 new com.google.protobuf.Internal.EnumLiteMap<NoteKind>() { 246 public NoteKind findValueByNumber(int number) { 247 return NoteKind.forNumber(number); 248 } 249 }; 250 getValueDescriptor()251 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 252 if (this == UNRECOGNIZED) { 253 throw new java.lang.IllegalStateException( 254 "Can't get the descriptor of an unrecognized enum value."); 255 } 256 return getDescriptor().getValues().get(ordinal()); 257 } 258 getDescriptorForType()259 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 260 return getDescriptor(); 261 } 262 getDescriptor()263 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 264 return io.grafeas.v1beta1.common.Common.getDescriptor().getEnumTypes().get(0); 265 } 266 267 private static final NoteKind[] VALUES = values(); 268 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)269 public static NoteKind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 270 if (desc.getType() != getDescriptor()) { 271 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 272 } 273 if (desc.getIndex() == -1) { 274 return UNRECOGNIZED; 275 } 276 return VALUES[desc.getIndex()]; 277 } 278 279 private final int value; 280 NoteKind(int value)281 private NoteKind(int value) { 282 this.value = value; 283 } 284 285 // @@protoc_insertion_point(enum_scope:grafeas.v1beta1.NoteKind) 286 } 287