blob: 73a1b5c45efe25d2bf37456cefa76b725c37ba14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
package org.example.orderservice;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for status.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="status">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Created"/>
* <enumeration value="Submitted"/>
* <enumeration value="Approved"/>
* <enumeration value="Rejected"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "status")
@XmlEnum
public enum Status {
@XmlEnumValue("Created")
CREATED("Created"),
@XmlEnumValue("Submitted")
SUBMITTED("Submitted"),
@XmlEnumValue("Approved")
APPROVED("Approved"),
@XmlEnumValue("Rejected")
REJECTED("Rejected");
private final String value;
Status(String v) {
value = v;
}
public String value() {
return value;
}
public static Status fromValue(String v) {
for (Status c: Status.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|