Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
 
9
import java.util.Map;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
12
public enum ShipmentStatus implements TEnum{
195 ashish 13
    YET_TO_SHIP(0),
14
    SHIPPED(1),
15
    IN_TRANSIT(2),
16
    DELIVERY_SUCCESS(3),
17
    DELIVERY_FAILED_FIRST_ATTEMPT(4),
18
    DELIVERY_FAILED_SECOND_ATTEMPT(5),
19
    DELIVERY_FAILED_THIRD_ATTEMPT(6),
20
    DELIVERY_FAILED_WORNG_ADDRESS(7);
68 ashish 21
 
22
  private static final Map<Integer, ShipmentStatus> BY_VALUE = new HashMap<Integer,ShipmentStatus>() {{
23
    for(ShipmentStatus val : ShipmentStatus.values()) {
24
      put(val.getValue(), val);
25
    }
26
  }};
27
 
28
  private final int value;
29
 
30
  private ShipmentStatus(int value) {
31
    this.value = value;
32
  }
33
 
34
  /**
35
   * Get the integer value of this enum value, as defined in the Thrift IDL.
36
   */
37
  public int getValue() {
38
    return value;
39
  }
40
 
41
  /**
42
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
43
   * @return null if the value is not found.
44
   */
45
  public static ShipmentStatus findByValue(int value) { 
46
    return BY_VALUE.get(value);
47
  }
48
}