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/severity.proto 19 20 package io.grafeas.v1; 21 22 /** 23 * 24 * 25 * <pre> 26 * Note provider assigned severity/impact ranking. 27 * </pre> 28 * 29 * Protobuf enum {@code grafeas.v1.Severity} 30 */ 31 public enum Severity implements com.google.protobuf.ProtocolMessageEnum { 32 /** 33 * 34 * 35 * <pre> 36 * Unknown. 37 * </pre> 38 * 39 * <code>SEVERITY_UNSPECIFIED = 0;</code> 40 */ 41 SEVERITY_UNSPECIFIED(0), 42 /** 43 * 44 * 45 * <pre> 46 * Minimal severity. 47 * </pre> 48 * 49 * <code>MINIMAL = 1;</code> 50 */ 51 MINIMAL(1), 52 /** 53 * 54 * 55 * <pre> 56 * Low severity. 57 * </pre> 58 * 59 * <code>LOW = 2;</code> 60 */ 61 LOW(2), 62 /** 63 * 64 * 65 * <pre> 66 * Medium severity. 67 * </pre> 68 * 69 * <code>MEDIUM = 3;</code> 70 */ 71 MEDIUM(3), 72 /** 73 * 74 * 75 * <pre> 76 * High severity. 77 * </pre> 78 * 79 * <code>HIGH = 4;</code> 80 */ 81 HIGH(4), 82 /** 83 * 84 * 85 * <pre> 86 * Critical severity. 87 * </pre> 88 * 89 * <code>CRITICAL = 5;</code> 90 */ 91 CRITICAL(5), 92 UNRECOGNIZED(-1), 93 ; 94 95 /** 96 * 97 * 98 * <pre> 99 * Unknown. 100 * </pre> 101 * 102 * <code>SEVERITY_UNSPECIFIED = 0;</code> 103 */ 104 public static final int SEVERITY_UNSPECIFIED_VALUE = 0; 105 /** 106 * 107 * 108 * <pre> 109 * Minimal severity. 110 * </pre> 111 * 112 * <code>MINIMAL = 1;</code> 113 */ 114 public static final int MINIMAL_VALUE = 1; 115 /** 116 * 117 * 118 * <pre> 119 * Low severity. 120 * </pre> 121 * 122 * <code>LOW = 2;</code> 123 */ 124 public static final int LOW_VALUE = 2; 125 /** 126 * 127 * 128 * <pre> 129 * Medium severity. 130 * </pre> 131 * 132 * <code>MEDIUM = 3;</code> 133 */ 134 public static final int MEDIUM_VALUE = 3; 135 /** 136 * 137 * 138 * <pre> 139 * High severity. 140 * </pre> 141 * 142 * <code>HIGH = 4;</code> 143 */ 144 public static final int HIGH_VALUE = 4; 145 /** 146 * 147 * 148 * <pre> 149 * Critical severity. 150 * </pre> 151 * 152 * <code>CRITICAL = 5;</code> 153 */ 154 public static final int CRITICAL_VALUE = 5; 155 getNumber()156 public final int getNumber() { 157 if (this == UNRECOGNIZED) { 158 throw new java.lang.IllegalArgumentException( 159 "Can't get the number of an unknown enum value."); 160 } 161 return value; 162 } 163 164 /** 165 * @param value The numeric wire value of the corresponding enum entry. 166 * @return The enum associated with the given numeric wire value. 167 * @deprecated Use {@link #forNumber(int)} instead. 168 */ 169 @java.lang.Deprecated valueOf(int value)170 public static Severity valueOf(int value) { 171 return forNumber(value); 172 } 173 174 /** 175 * @param value The numeric wire value of the corresponding enum entry. 176 * @return The enum associated with the given numeric wire value. 177 */ forNumber(int value)178 public static Severity forNumber(int value) { 179 switch (value) { 180 case 0: 181 return SEVERITY_UNSPECIFIED; 182 case 1: 183 return MINIMAL; 184 case 2: 185 return LOW; 186 case 3: 187 return MEDIUM; 188 case 4: 189 return HIGH; 190 case 5: 191 return CRITICAL; 192 default: 193 return null; 194 } 195 } 196 internalGetValueMap()197 public static com.google.protobuf.Internal.EnumLiteMap<Severity> internalGetValueMap() { 198 return internalValueMap; 199 } 200 201 private static final com.google.protobuf.Internal.EnumLiteMap<Severity> internalValueMap = 202 new com.google.protobuf.Internal.EnumLiteMap<Severity>() { 203 public Severity findValueByNumber(int number) { 204 return Severity.forNumber(number); 205 } 206 }; 207 getValueDescriptor()208 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 209 if (this == UNRECOGNIZED) { 210 throw new java.lang.IllegalStateException( 211 "Can't get the descriptor of an unrecognized enum value."); 212 } 213 return getDescriptor().getValues().get(ordinal()); 214 } 215 getDescriptorForType()216 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 217 return getDescriptor(); 218 } 219 getDescriptor()220 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 221 return io.grafeas.v1.SeverityOuterClass.getDescriptor().getEnumTypes().get(0); 222 } 223 224 private static final Severity[] VALUES = values(); 225 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)226 public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 227 if (desc.getType() != getDescriptor()) { 228 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 229 } 230 if (desc.getIndex() == -1) { 231 return UNRECOGNIZED; 232 } 233 return VALUES[desc.getIndex()]; 234 } 235 236 private final int value; 237 Severity(int value)238 private Severity(int value) { 239 this.value = value; 240 } 241 242 // @@protoc_insertion_point(enum_scope:grafeas.v1.Severity) 243 } 244