GLS ShipIT 4.0.f2
GLS ShipIT - REST services
Loading...
Searching...
No Matches
ProductType.java
Go to the documentation of this file.
1
2package eu.gls_group.fpcs.v1.common;
3
4import javax.xml.bind.annotation.XmlEnum;
5import javax.xml.bind.annotation.XmlEnumValue;
6import javax.xml.bind.annotation.XmlType;
7
8
27@XmlType(name = "ProductType")
28@XmlEnum
29public enum ProductType {
30
31 @XmlEnumValue("Parcel")
32 PARCEL("Parcel"),
33 @XmlEnumValue("Express")
34 EXPRESS("Express"),
35 @XmlEnumValue("Freight")
36 FREIGHT("Freight"),
37 @XmlEnumValue("Pharma")
38 PHARMA("Pharma"),
39 @XmlEnumValue("Pharmaplus")
40 PHARMAPLUS("Pharmaplus"),
41 @XmlEnumValue("Economy")
42 ECONOMY("Economy");
43 private final String value;
44
45 ProductType(String v) {
46 value = v;
47 }
48
49 public String value() {
50 return value;
51 }
52
53 public static ProductType fromValue(String v) {
54 for (ProductType c: ProductType.values()) {
55 if (c.value.equals(v)) {
56 return c;
57 }
58 }
59 throw new IllegalArgumentException(v);
60 }
61
62}
static ProductType fromValue(String v)