GLS ShipIT
GLS ShipIT - REST services
 All Classes Namespaces Files Functions Variables Enumerator Pages
ProductType.java
Go to the documentation of this file.
1 
2 package eu.glsgroup.fpcs.datatypes.soap.v1.common;
3 
4 import javax.xml.bind.annotation.XmlEnum;
5 import javax.xml.bind.annotation.XmlEnumValue;
6 import javax.xml.bind.annotation.XmlType;
7 
8 
27 @XmlType(name = "ProductType")
28 @XmlEnum
29 public 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  private final String value;
42 
43  ProductType(String v) {
44  value = v;
45  }
46 
47  public String value() {
48  return value;
49  }
50 
51  public static ProductType fromValue(String v) {
52  for (ProductType c: ProductType.values()) {
53  if (c.value.equals(v)) {
54  return c;
55  }
56  }
57  throw new IllegalArgumentException(v);
58  }
59 
60 }