001/** 002 */ 003package org.nasdanika.models.gitlab; 004 005import java.util.Arrays; 006import java.util.Collections; 007import java.util.List; 008 009import org.eclipse.emf.common.util.Enumerator; 010 011/** 012 * <!-- begin-user-doc --> 013 * A representation of the literals of the enumeration '<em><b>Status</b></em>', 014 * and utility methods for working with them. 015 * <!-- end-user-doc --> 016 * @see org.nasdanika.models.gitlab.GitLabPackage#getStatus() 017 * @model 018 * @generated 019 */ 020public enum Status implements Enumerator { 021 /** 022 * The '<em><b>Info</b></em>' literal object. 023 * <!-- begin-user-doc --> 024 * <!-- end-user-doc --> 025 * @see #INFO_VALUE 026 * @generated 027 * @ordered 028 */ 029 INFO(0, "Info", "Info"), 030 031 /** 032 * The '<em><b>Success</b></em>' literal object. 033 * <!-- begin-user-doc --> 034 * <!-- end-user-doc --> 035 * @see #SUCCESS_VALUE 036 * @generated 037 * @ordered 038 */ 039 SUCCESS(1, "Success", "Success"), 040 041 /** 042 * The '<em><b>Warning</b></em>' literal object. 043 * <!-- begin-user-doc --> 044 * <!-- end-user-doc --> 045 * @see #WARNING_VALUE 046 * @generated 047 * @ordered 048 */ 049 WARNING(2, "Warning", "Warning"), 050 051 /** 052 * The '<em><b>Error</b></em>' literal object. 053 * <!-- begin-user-doc --> 054 * <!-- end-user-doc --> 055 * @see #ERROR_VALUE 056 * @generated 057 * @ordered 058 */ 059 ERROR(3, "Error", "Error"), 060 061 /** 062 * The '<em><b>Fail</b></em>' literal object. 063 * <!-- begin-user-doc --> 064 * <!-- end-user-doc --> 065 * @see #FAIL_VALUE 066 * @generated 067 * @ordered 068 */ 069 FAIL(4, "Fail", "Fail"), 070 071 /** 072 * The '<em><b>Cancel</b></em>' literal object. 073 * <!-- begin-user-doc --> 074 * <!-- end-user-doc --> 075 * @see #CANCEL_VALUE 076 * @generated 077 * @ordered 078 */ 079 CANCEL(5, "Cancel", "Cancel"); 080 081 /** 082 * The '<em><b>Info</b></em>' literal value. 083 * <!-- begin-user-doc --> 084 * <!-- end-user-doc --> 085 * @see #INFO 086 * @model name="Info" 087 * @generated 088 * @ordered 089 */ 090 public static final int INFO_VALUE = 0; 091 092 /** 093 * The '<em><b>Success</b></em>' literal value. 094 * <!-- begin-user-doc --> 095 * <!-- end-user-doc --> 096 * @see #SUCCESS 097 * @model name="Success" 098 * @generated 099 * @ordered 100 */ 101 public static final int SUCCESS_VALUE = 1; 102 103 /** 104 * The '<em><b>Warning</b></em>' literal value. 105 * <!-- begin-user-doc --> 106 * <!-- end-user-doc --> 107 * @see #WARNING 108 * @model name="Warning" 109 * @generated 110 * @ordered 111 */ 112 public static final int WARNING_VALUE = 2; 113 114 /** 115 * The '<em><b>Error</b></em>' literal value. 116 * <!-- begin-user-doc --> 117 * <!-- end-user-doc --> 118 * @see #ERROR 119 * @model name="Error" 120 * @generated 121 * @ordered 122 */ 123 public static final int ERROR_VALUE = 3; 124 125 /** 126 * The '<em><b>Fail</b></em>' literal value. 127 * <!-- begin-user-doc --> 128 * <!-- end-user-doc --> 129 * @see #FAIL 130 * @model name="Fail" 131 * @generated 132 * @ordered 133 */ 134 public static final int FAIL_VALUE = 4; 135 136 /** 137 * The '<em><b>Cancel</b></em>' literal value. 138 * <!-- begin-user-doc --> 139 * <!-- end-user-doc --> 140 * @see #CANCEL 141 * @model name="Cancel" 142 * @generated 143 * @ordered 144 */ 145 public static final int CANCEL_VALUE = 5; 146 147 /** 148 * An array of all the '<em><b>Status</b></em>' enumerators. 149 * <!-- begin-user-doc --> 150 * <!-- end-user-doc --> 151 * @generated 152 */ 153 private static final Status[] VALUES_ARRAY = 154 new Status[] { 155 INFO, 156 SUCCESS, 157 WARNING, 158 ERROR, 159 FAIL, 160 CANCEL, 161 }; 162 163 /** 164 * A public read-only list of all the '<em><b>Status</b></em>' enumerators. 165 * <!-- begin-user-doc --> 166 * <!-- end-user-doc --> 167 * @generated 168 */ 169 public static final List<Status> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); 170 171 /** 172 * Returns the '<em><b>Status</b></em>' literal with the specified literal value. 173 * <!-- begin-user-doc --> 174 * <!-- end-user-doc --> 175 * @param literal the literal. 176 * @return the matching enumerator or <code>null</code>. 177 * @generated 178 */ 179 public static Status get(String literal) { 180 for (int i = 0; i < VALUES_ARRAY.length; ++i) { 181 Status result = VALUES_ARRAY[i]; 182 if (result.toString().equals(literal)) { 183 return result; 184 } 185 } 186 return null; 187 } 188 189 /** 190 * Returns the '<em><b>Status</b></em>' literal with the specified name. 191 * <!-- begin-user-doc --> 192 * <!-- end-user-doc --> 193 * @param name the name. 194 * @return the matching enumerator or <code>null</code>. 195 * @generated 196 */ 197 public static Status getByName(String name) { 198 for (int i = 0; i < VALUES_ARRAY.length; ++i) { 199 Status result = VALUES_ARRAY[i]; 200 if (result.getName().equals(name)) { 201 return result; 202 } 203 } 204 return null; 205 } 206 207 /** 208 * Returns the '<em><b>Status</b></em>' literal with the specified integer value. 209 * <!-- begin-user-doc --> 210 * <!-- end-user-doc --> 211 * @param value the integer value. 212 * @return the matching enumerator or <code>null</code>. 213 * @generated 214 */ 215 public static Status get(int value) { 216 switch (value) { 217 case INFO_VALUE: return INFO; 218 case SUCCESS_VALUE: return SUCCESS; 219 case WARNING_VALUE: return WARNING; 220 case ERROR_VALUE: return ERROR; 221 case FAIL_VALUE: return FAIL; 222 case CANCEL_VALUE: return CANCEL; 223 } 224 return null; 225 } 226 227 /** 228 * <!-- begin-user-doc --> 229 * <!-- end-user-doc --> 230 * @generated 231 */ 232 private final int value; 233 234 /** 235 * <!-- begin-user-doc --> 236 * <!-- end-user-doc --> 237 * @generated 238 */ 239 private final String name; 240 241 /** 242 * <!-- begin-user-doc --> 243 * <!-- end-user-doc --> 244 * @generated 245 */ 246 private final String literal; 247 248 /** 249 * Only this class can construct instances. 250 * <!-- begin-user-doc --> 251 * <!-- end-user-doc --> 252 * @generated 253 */ 254 private Status(int value, String name, String literal) { 255 this.value = value; 256 this.name = name; 257 this.literal = literal; 258 } 259 260 /** 261 * <!-- begin-user-doc --> 262 * <!-- end-user-doc --> 263 * @generated 264 */ 265 @Override 266 public int getValue() { 267 return value; 268 } 269 270 /** 271 * <!-- begin-user-doc --> 272 * <!-- end-user-doc --> 273 * @generated 274 */ 275 @Override 276 public String getName() { 277 return name; 278 } 279 280 /** 281 * <!-- begin-user-doc --> 282 * <!-- end-user-doc --> 283 * @generated 284 */ 285 @Override 286 public String getLiteral() { 287 return literal; 288 } 289 290 /** 291 * Returns the literal value of the enumerator, which is its string representation. 292 * <!-- begin-user-doc --> 293 * <!-- end-user-doc --> 294 * @generated 295 */ 296 @Override 297 public String toString() { 298 return literal; 299 } 300 301} //Status