/*- * ============LICENSE_START========================================== * OPENECOMP - DCAE * =================================================================== * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END============================================ */ /** */ package org.openecomp.ncomp.core.logs; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'Log Severity', * and utility methods for working with them. * * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogSeverity() * @model * @generated */ public enum LogSeverity implements Enumerator { /** * The 'UNKNOWN' literal object. * * * @see #UNKNOWN_VALUE * @generated * @ordered */ UNKNOWN(0, "UNKNOWN", "UNKNOWN"), /** * The 'SEV1' literal object. * * * @see #SEV1_VALUE * @generated * @ordered */ SEV1(0, "SEV1", "SEV1"), /** * The 'SEV2' literal object. * * * @see #SEV2_VALUE * @generated * @ordered */ SEV2(0, "SEV2", "SEV2"), /** * The 'SEV3' literal object. * * * @see #SEV3_VALUE * @generated * @ordered */ SEV3(0, "SEV3", "SEV3"), /** * The 'SEV4' literal object. * * * @see #SEV4_VALUE * @generated * @ordered */ SEV4(0, "SEV4", "SEV4"); /** * The 'UNKNOWN' literal value. * *

* If the meaning of 'UNKNOWN' literal object isn't clear, * there really should be more of a description here... *

* * @see #UNKNOWN * @model * @generated * @ordered */ public static final int UNKNOWN_VALUE = 0; /** * The 'SEV1' literal value. * *

* If the meaning of 'SEV1' literal object isn't clear, * there really should be more of a description here... *

* * @see #SEV1 * @model * @generated * @ordered */ public static final int SEV1_VALUE = 0; /** * The 'SEV2' literal value. * *

* If the meaning of 'SEV2' literal object isn't clear, * there really should be more of a description here... *

* * @see #SEV2 * @model * @generated * @ordered */ public static final int SEV2_VALUE = 0; /** * The 'SEV3' literal value. * *

* If the meaning of 'SEV3' literal object isn't clear, * there really should be more of a description here... *

* * @see #SEV3 * @model * @generated * @ordered */ public static final int SEV3_VALUE = 0; /** * The 'SEV4' literal value. * *

* If the meaning of 'SEV4' literal object isn't clear, * there really should be more of a description here... *

* * @see #SEV4 * @model * @generated * @ordered */ public static final int SEV4_VALUE = 0; /** * An array of all the 'Log Severity' enumerators. * * * @generated */ private static final LogSeverity[] VALUES_ARRAY = new LogSeverity[] { UNKNOWN, SEV1, SEV2, SEV3, SEV4, }; /** * A public read-only list of all the 'Log Severity' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Log Severity' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static LogSeverity get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LogSeverity result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Log Severity' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static LogSeverity getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LogSeverity result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Log Severity' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static LogSeverity get(int value) { switch (value) { case UNKNOWN_VALUE: return UNKNOWN; } return null; } /** * * * @generated */ private final int value; /** * * * @generated */ private final String name; /** * * * @generated */ private final String literal; /** * Only this class can construct instances. * * * @generated */ private LogSeverity(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * @generated */ public int getValue() { return value; } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * @generated */ @Override public String toString() { return literal; } } //LogSeverity