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