blob: d0b968ab6bf6ea29ddd10e834bd19bc99df2ff80 [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/**
26 * <p>Java class for editOperationType.
27 *
28 * <p>The following schema fragment specifies the expected content contained within this class.
29 * <p>
30 * <pre>
31 * &lt;simpleType name="editOperationType"&gt;
32 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
33 * &lt;enumeration value="merge"/&gt;
34 * &lt;enumeration value="replace"/&gt;
35 * &lt;enumeration value="create"/&gt;
36 * &lt;enumeration value="delete"/&gt;
37 * &lt;enumeration value="remove"/&gt;
38 * &lt;/restriction&gt;
39 * &lt;/simpleType&gt;
40 * </pre>
41 *
42 */
43@XmlType(name = "editOperationType")
44@XmlEnum
45public enum EditOperationType {
46
47 @XmlEnumValue("merge")
48 MERGE("merge"),
49 @XmlEnumValue("replace")
50 REPLACE("replace"),
51 @XmlEnumValue("create")
52 CREATE("create"),
53 @XmlEnumValue("delete")
54 DELETE("delete"),
55 @XmlEnumValue("remove")
56 REMOVE("remove");
57 private final String value;
58
59 EditOperationType(String v) {
60 value = v;
61 }
62
63 public String value() {
64 return value;
65 }
66
67 public static EditOperationType fromValue(String v) {
68 for (EditOperationType c: EditOperationType.values()) {
69 if (c.value.equals(v)) {
70 return c;
71 }
72 }
73 throw new IllegalArgumentException(v);
74 }
75
76}