Subversion Repositories SmartDukaan

Rev

Rev 3378 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3378 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
8
 
8
 
9
import java.util.Map;
9
import java.util.Map;
10
import java.util.HashMap;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
11
import org.apache.thrift.TEnum;
-
 
12
 
12
/**
13
/**
13
 * Affiliate track log types for affiliate tracking
14
 * Affiliate track log types for affiliate tracking
14
 */
15
 */
15
public enum TrackLogType implements TEnum{
16
public enum TrackLogType implements org.apache.thrift.TEnum {
16
    NEW_REGISTRATION(1),
17
  NEW_REGISTRATION(1),
17
    PAYMENT_SUCCESS(2);
18
  PAYMENT_SUCCESS(2);
18
 
-
 
19
  private static final Map<Integer, TrackLogType> BY_VALUE = new HashMap<Integer,TrackLogType>() {{
-
 
20
    for(TrackLogType val : TrackLogType.values()) {
-
 
21
      put(val.getValue(), val);
-
 
22
    }
-
 
23
  }};
-
 
24
 
19
 
25
  private final int value;
20
  private final int value;
26
 
21
 
27
  private TrackLogType(int value) {
22
  private TrackLogType(int value) {
28
    this.value = value;
23
    this.value = value;
Line 38... Line 33...
38
  /**
33
  /**
39
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
34
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
40
   * @return null if the value is not found.
35
   * @return null if the value is not found.
41
   */
36
   */
42
  public static TrackLogType findByValue(int value) { 
37
  public static TrackLogType findByValue(int value) { 
-
 
38
    switch (value) {
-
 
39
      case 1:
-
 
40
        return NEW_REGISTRATION;
-
 
41
      case 2:
43
    return BY_VALUE.get(value);
42
        return PAYMENT_SUCCESS;
-
 
43
      default:
-
 
44
        return null;
-
 
45
    }
44
  }
46
  }
45
}
47
}