blob: 79af7020ce0a5f43b676cb5830e6dfa606b003aa [file] [log] [blame]
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -08001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy
6 * of the License at
7 *
8 * http://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, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16// CHECKSTYLE:OFF
17
18package org.onosproject.netconf.rpc;
19
20import javax.xml.bind.annotation.XmlEnum;
21import javax.xml.bind.annotation.XmlEnumValue;
22import javax.xml.bind.annotation.XmlType;
23
24
25/**
Thomas Vachuskaa01ef782018-07-25 14:07:11 -070026 * Java class for ErrorSeverity.
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -080027 *
28 * <p>The following schema fragment specifies the expected content contained within this class.
Thomas Vachuskaa01ef782018-07-25 14:07:11 -070029 * </p>
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -080030 * <pre>
31 * &lt;simpleType name="ErrorSeverity"&gt;
32 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
33 * &lt;enumeration value="error"/&gt;
34 * &lt;enumeration value="warning"/&gt;
35 * &lt;/restriction&gt;
36 * &lt;/simpleType&gt;
37 * </pre>
38 *
39 */
40@XmlType(name = "ErrorSeverity")
41@XmlEnum
42public enum ErrorSeverity {
43
44 @XmlEnumValue("error")
45 ERROR("error"),
46 @XmlEnumValue("warning")
47 WARNING("warning");
48 private final String value;
49
50 ErrorSeverity(String v) {
51 value = v;
52 }
53
54 public String value() {
55 return value;
56 }
57
58 public static ErrorSeverity fromValue(String v) {
59 for (ErrorSeverity c: ErrorSeverity.values()) {
60 if (c.value.equals(v)) {
61 return c;
62 }
63 }
64 throw new IllegalArgumentException(v);
65 }
66
67}