blob: 7ce299fa6267e884bb8a19a7b20cc5186e692e76 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2022 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr
* Fadwa Tmar (CEA LIST) fadwa.tmar@cea.fr
*******************************************************************************/
/**
*/
package org.eclipse.papyrus.opcua.opcuaprofile.OPC_UA_Library;
import java.lang.String;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Id Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.papyrus.opcua.opcuaprofile.OPC_UA_Library.OPC_UA_LibraryPackage#getIdType()
* @model
* @generated
*/
public enum IdType implements Enumerator {
/**
* The '<em><b>Numeric</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NUMERIC_VALUE
* @generated
* @ordered
*/
NUMERIC(0, "Numeric", "Numeric"),
/**
* The '<em><b>String</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STRING_VALUE
* @generated
* @ordered
*/
STRING(1, "String", "String"),
/**
* The '<em><b>Guid</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #GUID_VALUE
* @generated
* @ordered
*/
GUID(2, "Guid", "Guid"),
/**
* The '<em><b>Opaque</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OPAQUE_VALUE
* @generated
* @ordered
*/
OPAQUE(3, "Opaque", "Opaque");
/**
* The '<em><b>Numeric</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NUMERIC
* @model name="Numeric"
* @generated
* @ordered
*/
public static final int NUMERIC_VALUE = 0;
/**
* The '<em><b>String</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STRING
* @model name="String"
* @generated
* @ordered
*/
public static final int STRING_VALUE = 1;
/**
* The '<em><b>Guid</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #GUID
* @model name="Guid"
* @generated
* @ordered
*/
public static final int GUID_VALUE = 2;
/**
* The '<em><b>Opaque</b></em>' literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OPAQUE
* @model name="Opaque"
* @generated
* @ordered
*/
public static final int OPAQUE_VALUE = 3;
/**
* An array of all the '<em><b>Id Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final IdType[] VALUES_ARRAY =
new IdType[] {
NUMERIC,
STRING,
GUID,
OPAQUE,
};
/**
* A public read-only list of all the '<em><b>Id Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<IdType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Id Type</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IdType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Id Type</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IdType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Id Type</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static IdType get(int value) {
switch (value) {
case NUMERIC_VALUE: return NUMERIC;
case STRING_VALUE: return STRING;
case GUID_VALUE: return GUID;
case OPAQUE_VALUE: return OPAQUE;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private IdType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //IdType