Subversion Repositories SmartDukaan

Rev

Rev 4910 | Rev 5031 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4815 phani.kuma 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
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
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class OrderStatusGroups implements org.apache.thrift.TBase<OrderStatusGroups, OrderStatusGroups._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OrderStatusGroups");
25
 
26
  private static final org.apache.thrift.protocol.TField COD_CANCELLABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codCancellable", org.apache.thrift.protocol.TType.LIST, (short)1);
27
  private static final org.apache.thrift.protocol.TField PREPAID_CANCELLABLE_BEFORE_BILLED_FIELD_DESC = new org.apache.thrift.protocol.TField("prepaidCancellableBeforeBilled", org.apache.thrift.protocol.TType.LIST, (short)2);
28
  private static final org.apache.thrift.protocol.TField PREPAID_CANCELLABLE_AFTER_BILLED_FIELD_DESC = new org.apache.thrift.protocol.TField("prepaidCancellableAfterBilled", org.apache.thrift.protocol.TType.LIST, (short)3);
4837 varun.gupt 29
  private static final org.apache.thrift.protocol.TField OPEN_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("openOrders", org.apache.thrift.protocol.TType.LIST, (short)4);
4983 phani.kuma 30
  private static final org.apache.thrift.protocol.TField SHIPPED_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("shippedOrders", org.apache.thrift.protocol.TType.LIST, (short)5);
31
  private static final org.apache.thrift.protocol.TField FAILED_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("failedOrders", org.apache.thrift.protocol.TType.LIST, (short)6);
4815 phani.kuma 32
 
33
  private List<OrderStatus> codCancellable; // required
34
  private List<OrderStatus> prepaidCancellableBeforeBilled; // required
35
  private List<OrderStatus> prepaidCancellableAfterBilled; // required
4837 varun.gupt 36
  private List<OrderStatus> openOrders; // required
4983 phani.kuma 37
  private List<OrderStatus> shippedOrders; // required
38
  private List<OrderStatus> failedOrders; // required
4815 phani.kuma 39
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    COD_CANCELLABLE((short)1, "codCancellable"),
43
    PREPAID_CANCELLABLE_BEFORE_BILLED((short)2, "prepaidCancellableBeforeBilled"),
4837 varun.gupt 44
    PREPAID_CANCELLABLE_AFTER_BILLED((short)3, "prepaidCancellableAfterBilled"),
4983 phani.kuma 45
    OPEN_ORDERS((short)4, "openOrders"),
46
    SHIPPED_ORDERS((short)5, "shippedOrders"),
47
    FAILED_ORDERS((short)6, "failedOrders");
4815 phani.kuma 48
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
51
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
53
        byName.put(field.getFieldName(), field);
54
      }
55
    }
56
 
57
    /**
58
     * Find the _Fields constant that matches fieldId, or null if its not found.
59
     */
60
    public static _Fields findByThriftId(int fieldId) {
61
      switch(fieldId) {
62
        case 1: // COD_CANCELLABLE
63
          return COD_CANCELLABLE;
64
        case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
65
          return PREPAID_CANCELLABLE_BEFORE_BILLED;
66
        case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
67
          return PREPAID_CANCELLABLE_AFTER_BILLED;
4837 varun.gupt 68
        case 4: // OPEN_ORDERS
69
          return OPEN_ORDERS;
4983 phani.kuma 70
        case 5: // SHIPPED_ORDERS
71
          return SHIPPED_ORDERS;
72
        case 6: // FAILED_ORDERS
73
          return FAILED_ORDERS;
4815 phani.kuma 74
        default:
75
          return null;
76
      }
77
    }
78
 
79
    /**
80
     * Find the _Fields constant that matches fieldId, throwing an exception
81
     * if it is not found.
82
     */
83
    public static _Fields findByThriftIdOrThrow(int fieldId) {
84
      _Fields fields = findByThriftId(fieldId);
85
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
86
      return fields;
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches name, or null if its not found.
91
     */
92
    public static _Fields findByName(String name) {
93
      return byName.get(name);
94
    }
95
 
96
    private final short _thriftId;
97
    private final String _fieldName;
98
 
99
    _Fields(short thriftId, String fieldName) {
100
      _thriftId = thriftId;
101
      _fieldName = fieldName;
102
    }
103
 
104
    public short getThriftFieldId() {
105
      return _thriftId;
106
    }
107
 
108
    public String getFieldName() {
109
      return _fieldName;
110
    }
111
  }
112
 
113
  // isset id assignments
114
 
115
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
116
  static {
117
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
118
    tmpMap.put(_Fields.COD_CANCELLABLE, new org.apache.thrift.meta_data.FieldMetaData("codCancellable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
119
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
120
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
121
    tmpMap.put(_Fields.PREPAID_CANCELLABLE_BEFORE_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableBeforeBilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
122
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
123
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
124
    tmpMap.put(_Fields.PREPAID_CANCELLABLE_AFTER_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableAfterBilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
126
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
4837 varun.gupt 127
    tmpMap.put(_Fields.OPEN_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("openOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
129
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
4983 phani.kuma 130
    tmpMap.put(_Fields.SHIPPED_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("shippedOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
132
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
133
    tmpMap.put(_Fields.FAILED_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("failedOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
135
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
4815 phani.kuma 136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OrderStatusGroups.class, metaDataMap);
138
  }
139
 
140
  public OrderStatusGroups() {
141
    this.codCancellable = new ArrayList<OrderStatus>();
142
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
143
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
144
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
145
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
146
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
147
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
148
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
149
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
150
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
151
 
152
    this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
153
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
154
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
155
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
156
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
157
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
158
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
159
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
160
 
161
    this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
162
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
163
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
164
 
4837 varun.gupt 165
    this.openOrders = new ArrayList<OrderStatus>();
166
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_PENDING);
167
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
168
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
169
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
170
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
171
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
172
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
173
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
174
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
175
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED_DENIED);
4910 phani.kuma 176
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
177
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
4837 varun.gupt 178
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_RECEIVED);
179
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_CONFIRMED);
180
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
181
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
182
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
183
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
184
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
185
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
186
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
187
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
188
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
189
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
190
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
191
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED_TIMEOUT);
192
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_TIMEOUT);
4910 phani.kuma 193
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
4837 varun.gupt 194
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CAPTURE_IN_PROCESS);
195
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
196
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
197
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
198
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
199
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
200
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
201
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
202
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
203
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
204
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
205
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
206
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
207
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
208
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
209
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
210
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
211
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
212
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
213
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
214
 
4983 phani.kuma 215
    this.shippedOrders = new ArrayList<OrderStatus>();
216
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
217
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
218
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
219
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
220
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
221
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
222
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
223
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
224
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
225
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
226
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
227
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
228
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
229
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
230
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
231
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
232
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
233
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
234
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
235
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
236
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
237
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
238
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
239
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
240
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
241
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
242
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
243
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
244
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
245
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
246
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
247
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
248
 
249
    this.failedOrders = new ArrayList<OrderStatus>();
250
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FAILED);
251
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
252
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.REJECTED);
253
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
254
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_RESHIPPED);
255
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
256
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_RESHIPPED);
257
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
258
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RESHIPPED);
259
 
4815 phani.kuma 260
  }
261
 
262
  public OrderStatusGroups(
263
    List<OrderStatus> codCancellable,
264
    List<OrderStatus> prepaidCancellableBeforeBilled,
4837 varun.gupt 265
    List<OrderStatus> prepaidCancellableAfterBilled,
4983 phani.kuma 266
    List<OrderStatus> openOrders,
267
    List<OrderStatus> shippedOrders,
268
    List<OrderStatus> failedOrders)
4815 phani.kuma 269
  {
270
    this();
271
    this.codCancellable = codCancellable;
272
    this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
273
    this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
4837 varun.gupt 274
    this.openOrders = openOrders;
4983 phani.kuma 275
    this.shippedOrders = shippedOrders;
276
    this.failedOrders = failedOrders;
4815 phani.kuma 277
  }
278
 
279
  /**
280
   * Performs a deep copy on <i>other</i>.
281
   */
282
  public OrderStatusGroups(OrderStatusGroups other) {
283
    if (other.isSetCodCancellable()) {
284
      List<OrderStatus> __this__codCancellable = new ArrayList<OrderStatus>();
285
      for (OrderStatus other_element : other.codCancellable) {
286
        __this__codCancellable.add(other_element);
287
      }
288
      this.codCancellable = __this__codCancellable;
289
    }
290
    if (other.isSetPrepaidCancellableBeforeBilled()) {
291
      List<OrderStatus> __this__prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
292
      for (OrderStatus other_element : other.prepaidCancellableBeforeBilled) {
293
        __this__prepaidCancellableBeforeBilled.add(other_element);
294
      }
295
      this.prepaidCancellableBeforeBilled = __this__prepaidCancellableBeforeBilled;
296
    }
297
    if (other.isSetPrepaidCancellableAfterBilled()) {
298
      List<OrderStatus> __this__prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
299
      for (OrderStatus other_element : other.prepaidCancellableAfterBilled) {
300
        __this__prepaidCancellableAfterBilled.add(other_element);
301
      }
302
      this.prepaidCancellableAfterBilled = __this__prepaidCancellableAfterBilled;
303
    }
4837 varun.gupt 304
    if (other.isSetOpenOrders()) {
305
      List<OrderStatus> __this__openOrders = new ArrayList<OrderStatus>();
306
      for (OrderStatus other_element : other.openOrders) {
307
        __this__openOrders.add(other_element);
308
      }
309
      this.openOrders = __this__openOrders;
310
    }
4983 phani.kuma 311
    if (other.isSetShippedOrders()) {
312
      List<OrderStatus> __this__shippedOrders = new ArrayList<OrderStatus>();
313
      for (OrderStatus other_element : other.shippedOrders) {
314
        __this__shippedOrders.add(other_element);
315
      }
316
      this.shippedOrders = __this__shippedOrders;
317
    }
318
    if (other.isSetFailedOrders()) {
319
      List<OrderStatus> __this__failedOrders = new ArrayList<OrderStatus>();
320
      for (OrderStatus other_element : other.failedOrders) {
321
        __this__failedOrders.add(other_element);
322
      }
323
      this.failedOrders = __this__failedOrders;
324
    }
4815 phani.kuma 325
  }
326
 
327
  public OrderStatusGroups deepCopy() {
328
    return new OrderStatusGroups(this);
329
  }
330
 
331
  @Override
332
  public void clear() {
333
    this.codCancellable = new ArrayList<OrderStatus>();
334
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
335
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
336
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
337
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
338
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
339
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
340
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
341
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
342
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
343
 
344
    this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
345
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
346
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
347
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
348
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
349
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
350
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
351
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
352
 
353
    this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
354
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
355
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
356
 
4837 varun.gupt 357
    this.openOrders = new ArrayList<OrderStatus>();
358
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_PENDING);
359
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
360
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
361
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
362
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
363
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
364
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
365
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
366
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
367
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED_DENIED);
4910 phani.kuma 368
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
369
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
4837 varun.gupt 370
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_RECEIVED);
371
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_CONFIRMED);
372
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
373
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
374
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
375
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
376
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
377
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
378
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
379
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
380
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
381
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
382
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
383
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED_TIMEOUT);
384
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_TIMEOUT);
4910 phani.kuma 385
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
4837 varun.gupt 386
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CAPTURE_IN_PROCESS);
387
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
388
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
389
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
390
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
391
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
392
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
393
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
394
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
395
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
396
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
397
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
398
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
399
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
400
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
401
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
402
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
403
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
404
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
405
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
406
 
4983 phani.kuma 407
    this.shippedOrders = new ArrayList<OrderStatus>();
408
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
409
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
410
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
411
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
412
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
413
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
414
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
415
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
416
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
417
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
418
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
419
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
420
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
421
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
422
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
423
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
424
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
425
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
426
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
427
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
428
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
429
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
430
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
431
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
432
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
433
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
434
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
435
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
436
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
437
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
438
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
439
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
440
 
441
    this.failedOrders = new ArrayList<OrderStatus>();
442
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FAILED);
443
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
444
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.REJECTED);
445
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
446
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_RESHIPPED);
447
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
448
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_RESHIPPED);
449
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
450
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RESHIPPED);
451
 
4815 phani.kuma 452
  }
453
 
454
  public int getCodCancellableSize() {
455
    return (this.codCancellable == null) ? 0 : this.codCancellable.size();
456
  }
457
 
458
  public java.util.Iterator<OrderStatus> getCodCancellableIterator() {
459
    return (this.codCancellable == null) ? null : this.codCancellable.iterator();
460
  }
461
 
462
  public void addToCodCancellable(OrderStatus elem) {
463
    if (this.codCancellable == null) {
464
      this.codCancellable = new ArrayList<OrderStatus>();
465
    }
466
    this.codCancellable.add(elem);
467
  }
468
 
469
  public List<OrderStatus> getCodCancellable() {
470
    return this.codCancellable;
471
  }
472
 
473
  public void setCodCancellable(List<OrderStatus> codCancellable) {
474
    this.codCancellable = codCancellable;
475
  }
476
 
477
  public void unsetCodCancellable() {
478
    this.codCancellable = null;
479
  }
480
 
481
  /** Returns true if field codCancellable is set (has been assigned a value) and false otherwise */
482
  public boolean isSetCodCancellable() {
483
    return this.codCancellable != null;
484
  }
485
 
486
  public void setCodCancellableIsSet(boolean value) {
487
    if (!value) {
488
      this.codCancellable = null;
489
    }
490
  }
491
 
492
  public int getPrepaidCancellableBeforeBilledSize() {
493
    return (this.prepaidCancellableBeforeBilled == null) ? 0 : this.prepaidCancellableBeforeBilled.size();
494
  }
495
 
496
  public java.util.Iterator<OrderStatus> getPrepaidCancellableBeforeBilledIterator() {
497
    return (this.prepaidCancellableBeforeBilled == null) ? null : this.prepaidCancellableBeforeBilled.iterator();
498
  }
499
 
500
  public void addToPrepaidCancellableBeforeBilled(OrderStatus elem) {
501
    if (this.prepaidCancellableBeforeBilled == null) {
502
      this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
503
    }
504
    this.prepaidCancellableBeforeBilled.add(elem);
505
  }
506
 
507
  public List<OrderStatus> getPrepaidCancellableBeforeBilled() {
508
    return this.prepaidCancellableBeforeBilled;
509
  }
510
 
511
  public void setPrepaidCancellableBeforeBilled(List<OrderStatus> prepaidCancellableBeforeBilled) {
512
    this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
513
  }
514
 
515
  public void unsetPrepaidCancellableBeforeBilled() {
516
    this.prepaidCancellableBeforeBilled = null;
517
  }
518
 
519
  /** Returns true if field prepaidCancellableBeforeBilled is set (has been assigned a value) and false otherwise */
520
  public boolean isSetPrepaidCancellableBeforeBilled() {
521
    return this.prepaidCancellableBeforeBilled != null;
522
  }
523
 
524
  public void setPrepaidCancellableBeforeBilledIsSet(boolean value) {
525
    if (!value) {
526
      this.prepaidCancellableBeforeBilled = null;
527
    }
528
  }
529
 
530
  public int getPrepaidCancellableAfterBilledSize() {
531
    return (this.prepaidCancellableAfterBilled == null) ? 0 : this.prepaidCancellableAfterBilled.size();
532
  }
533
 
534
  public java.util.Iterator<OrderStatus> getPrepaidCancellableAfterBilledIterator() {
535
    return (this.prepaidCancellableAfterBilled == null) ? null : this.prepaidCancellableAfterBilled.iterator();
536
  }
537
 
538
  public void addToPrepaidCancellableAfterBilled(OrderStatus elem) {
539
    if (this.prepaidCancellableAfterBilled == null) {
540
      this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
541
    }
542
    this.prepaidCancellableAfterBilled.add(elem);
543
  }
544
 
545
  public List<OrderStatus> getPrepaidCancellableAfterBilled() {
546
    return this.prepaidCancellableAfterBilled;
547
  }
548
 
549
  public void setPrepaidCancellableAfterBilled(List<OrderStatus> prepaidCancellableAfterBilled) {
550
    this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
551
  }
552
 
553
  public void unsetPrepaidCancellableAfterBilled() {
554
    this.prepaidCancellableAfterBilled = null;
555
  }
556
 
557
  /** Returns true if field prepaidCancellableAfterBilled is set (has been assigned a value) and false otherwise */
558
  public boolean isSetPrepaidCancellableAfterBilled() {
559
    return this.prepaidCancellableAfterBilled != null;
560
  }
561
 
562
  public void setPrepaidCancellableAfterBilledIsSet(boolean value) {
563
    if (!value) {
564
      this.prepaidCancellableAfterBilled = null;
565
    }
566
  }
567
 
4837 varun.gupt 568
  public int getOpenOrdersSize() {
569
    return (this.openOrders == null) ? 0 : this.openOrders.size();
570
  }
571
 
572
  public java.util.Iterator<OrderStatus> getOpenOrdersIterator() {
573
    return (this.openOrders == null) ? null : this.openOrders.iterator();
574
  }
575
 
576
  public void addToOpenOrders(OrderStatus elem) {
577
    if (this.openOrders == null) {
578
      this.openOrders = new ArrayList<OrderStatus>();
579
    }
580
    this.openOrders.add(elem);
581
  }
582
 
583
  public List<OrderStatus> getOpenOrders() {
584
    return this.openOrders;
585
  }
586
 
587
  public void setOpenOrders(List<OrderStatus> openOrders) {
588
    this.openOrders = openOrders;
589
  }
590
 
591
  public void unsetOpenOrders() {
592
    this.openOrders = null;
593
  }
594
 
595
  /** Returns true if field openOrders is set (has been assigned a value) and false otherwise */
596
  public boolean isSetOpenOrders() {
597
    return this.openOrders != null;
598
  }
599
 
600
  public void setOpenOrdersIsSet(boolean value) {
601
    if (!value) {
602
      this.openOrders = null;
603
    }
604
  }
605
 
4983 phani.kuma 606
  public int getShippedOrdersSize() {
607
    return (this.shippedOrders == null) ? 0 : this.shippedOrders.size();
608
  }
609
 
610
  public java.util.Iterator<OrderStatus> getShippedOrdersIterator() {
611
    return (this.shippedOrders == null) ? null : this.shippedOrders.iterator();
612
  }
613
 
614
  public void addToShippedOrders(OrderStatus elem) {
615
    if (this.shippedOrders == null) {
616
      this.shippedOrders = new ArrayList<OrderStatus>();
617
    }
618
    this.shippedOrders.add(elem);
619
  }
620
 
621
  public List<OrderStatus> getShippedOrders() {
622
    return this.shippedOrders;
623
  }
624
 
625
  public void setShippedOrders(List<OrderStatus> shippedOrders) {
626
    this.shippedOrders = shippedOrders;
627
  }
628
 
629
  public void unsetShippedOrders() {
630
    this.shippedOrders = null;
631
  }
632
 
633
  /** Returns true if field shippedOrders is set (has been assigned a value) and false otherwise */
634
  public boolean isSetShippedOrders() {
635
    return this.shippedOrders != null;
636
  }
637
 
638
  public void setShippedOrdersIsSet(boolean value) {
639
    if (!value) {
640
      this.shippedOrders = null;
641
    }
642
  }
643
 
644
  public int getFailedOrdersSize() {
645
    return (this.failedOrders == null) ? 0 : this.failedOrders.size();
646
  }
647
 
648
  public java.util.Iterator<OrderStatus> getFailedOrdersIterator() {
649
    return (this.failedOrders == null) ? null : this.failedOrders.iterator();
650
  }
651
 
652
  public void addToFailedOrders(OrderStatus elem) {
653
    if (this.failedOrders == null) {
654
      this.failedOrders = new ArrayList<OrderStatus>();
655
    }
656
    this.failedOrders.add(elem);
657
  }
658
 
659
  public List<OrderStatus> getFailedOrders() {
660
    return this.failedOrders;
661
  }
662
 
663
  public void setFailedOrders(List<OrderStatus> failedOrders) {
664
    this.failedOrders = failedOrders;
665
  }
666
 
667
  public void unsetFailedOrders() {
668
    this.failedOrders = null;
669
  }
670
 
671
  /** Returns true if field failedOrders is set (has been assigned a value) and false otherwise */
672
  public boolean isSetFailedOrders() {
673
    return this.failedOrders != null;
674
  }
675
 
676
  public void setFailedOrdersIsSet(boolean value) {
677
    if (!value) {
678
      this.failedOrders = null;
679
    }
680
  }
681
 
4815 phani.kuma 682
  public void setFieldValue(_Fields field, Object value) {
683
    switch (field) {
684
    case COD_CANCELLABLE:
685
      if (value == null) {
686
        unsetCodCancellable();
687
      } else {
688
        setCodCancellable((List<OrderStatus>)value);
689
      }
690
      break;
691
 
692
    case PREPAID_CANCELLABLE_BEFORE_BILLED:
693
      if (value == null) {
694
        unsetPrepaidCancellableBeforeBilled();
695
      } else {
696
        setPrepaidCancellableBeforeBilled((List<OrderStatus>)value);
697
      }
698
      break;
699
 
700
    case PREPAID_CANCELLABLE_AFTER_BILLED:
701
      if (value == null) {
702
        unsetPrepaidCancellableAfterBilled();
703
      } else {
704
        setPrepaidCancellableAfterBilled((List<OrderStatus>)value);
705
      }
706
      break;
707
 
4837 varun.gupt 708
    case OPEN_ORDERS:
709
      if (value == null) {
710
        unsetOpenOrders();
711
      } else {
712
        setOpenOrders((List<OrderStatus>)value);
713
      }
714
      break;
715
 
4983 phani.kuma 716
    case SHIPPED_ORDERS:
717
      if (value == null) {
718
        unsetShippedOrders();
719
      } else {
720
        setShippedOrders((List<OrderStatus>)value);
721
      }
722
      break;
723
 
724
    case FAILED_ORDERS:
725
      if (value == null) {
726
        unsetFailedOrders();
727
      } else {
728
        setFailedOrders((List<OrderStatus>)value);
729
      }
730
      break;
731
 
4815 phani.kuma 732
    }
733
  }
734
 
735
  public Object getFieldValue(_Fields field) {
736
    switch (field) {
737
    case COD_CANCELLABLE:
738
      return getCodCancellable();
739
 
740
    case PREPAID_CANCELLABLE_BEFORE_BILLED:
741
      return getPrepaidCancellableBeforeBilled();
742
 
743
    case PREPAID_CANCELLABLE_AFTER_BILLED:
744
      return getPrepaidCancellableAfterBilled();
745
 
4837 varun.gupt 746
    case OPEN_ORDERS:
747
      return getOpenOrders();
748
 
4983 phani.kuma 749
    case SHIPPED_ORDERS:
750
      return getShippedOrders();
751
 
752
    case FAILED_ORDERS:
753
      return getFailedOrders();
754
 
4815 phani.kuma 755
    }
756
    throw new IllegalStateException();
757
  }
758
 
759
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
760
  public boolean isSet(_Fields field) {
761
    if (field == null) {
762
      throw new IllegalArgumentException();
763
    }
764
 
765
    switch (field) {
766
    case COD_CANCELLABLE:
767
      return isSetCodCancellable();
768
    case PREPAID_CANCELLABLE_BEFORE_BILLED:
769
      return isSetPrepaidCancellableBeforeBilled();
770
    case PREPAID_CANCELLABLE_AFTER_BILLED:
771
      return isSetPrepaidCancellableAfterBilled();
4837 varun.gupt 772
    case OPEN_ORDERS:
773
      return isSetOpenOrders();
4983 phani.kuma 774
    case SHIPPED_ORDERS:
775
      return isSetShippedOrders();
776
    case FAILED_ORDERS:
777
      return isSetFailedOrders();
4815 phani.kuma 778
    }
779
    throw new IllegalStateException();
780
  }
781
 
782
  @Override
783
  public boolean equals(Object that) {
784
    if (that == null)
785
      return false;
786
    if (that instanceof OrderStatusGroups)
787
      return this.equals((OrderStatusGroups)that);
788
    return false;
789
  }
790
 
791
  public boolean equals(OrderStatusGroups that) {
792
    if (that == null)
793
      return false;
794
 
795
    boolean this_present_codCancellable = true && this.isSetCodCancellable();
796
    boolean that_present_codCancellable = true && that.isSetCodCancellable();
797
    if (this_present_codCancellable || that_present_codCancellable) {
798
      if (!(this_present_codCancellable && that_present_codCancellable))
799
        return false;
800
      if (!this.codCancellable.equals(that.codCancellable))
801
        return false;
802
    }
803
 
804
    boolean this_present_prepaidCancellableBeforeBilled = true && this.isSetPrepaidCancellableBeforeBilled();
805
    boolean that_present_prepaidCancellableBeforeBilled = true && that.isSetPrepaidCancellableBeforeBilled();
806
    if (this_present_prepaidCancellableBeforeBilled || that_present_prepaidCancellableBeforeBilled) {
807
      if (!(this_present_prepaidCancellableBeforeBilled && that_present_prepaidCancellableBeforeBilled))
808
        return false;
809
      if (!this.prepaidCancellableBeforeBilled.equals(that.prepaidCancellableBeforeBilled))
810
        return false;
811
    }
812
 
813
    boolean this_present_prepaidCancellableAfterBilled = true && this.isSetPrepaidCancellableAfterBilled();
814
    boolean that_present_prepaidCancellableAfterBilled = true && that.isSetPrepaidCancellableAfterBilled();
815
    if (this_present_prepaidCancellableAfterBilled || that_present_prepaidCancellableAfterBilled) {
816
      if (!(this_present_prepaidCancellableAfterBilled && that_present_prepaidCancellableAfterBilled))
817
        return false;
818
      if (!this.prepaidCancellableAfterBilled.equals(that.prepaidCancellableAfterBilled))
819
        return false;
820
    }
821
 
4837 varun.gupt 822
    boolean this_present_openOrders = true && this.isSetOpenOrders();
823
    boolean that_present_openOrders = true && that.isSetOpenOrders();
824
    if (this_present_openOrders || that_present_openOrders) {
825
      if (!(this_present_openOrders && that_present_openOrders))
826
        return false;
827
      if (!this.openOrders.equals(that.openOrders))
828
        return false;
829
    }
830
 
4983 phani.kuma 831
    boolean this_present_shippedOrders = true && this.isSetShippedOrders();
832
    boolean that_present_shippedOrders = true && that.isSetShippedOrders();
833
    if (this_present_shippedOrders || that_present_shippedOrders) {
834
      if (!(this_present_shippedOrders && that_present_shippedOrders))
835
        return false;
836
      if (!this.shippedOrders.equals(that.shippedOrders))
837
        return false;
838
    }
839
 
840
    boolean this_present_failedOrders = true && this.isSetFailedOrders();
841
    boolean that_present_failedOrders = true && that.isSetFailedOrders();
842
    if (this_present_failedOrders || that_present_failedOrders) {
843
      if (!(this_present_failedOrders && that_present_failedOrders))
844
        return false;
845
      if (!this.failedOrders.equals(that.failedOrders))
846
        return false;
847
    }
848
 
4815 phani.kuma 849
    return true;
850
  }
851
 
852
  @Override
853
  public int hashCode() {
854
    return 0;
855
  }
856
 
857
  public int compareTo(OrderStatusGroups other) {
858
    if (!getClass().equals(other.getClass())) {
859
      return getClass().getName().compareTo(other.getClass().getName());
860
    }
861
 
862
    int lastComparison = 0;
863
    OrderStatusGroups typedOther = (OrderStatusGroups)other;
864
 
865
    lastComparison = Boolean.valueOf(isSetCodCancellable()).compareTo(typedOther.isSetCodCancellable());
866
    if (lastComparison != 0) {
867
      return lastComparison;
868
    }
869
    if (isSetCodCancellable()) {
870
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCancellable, typedOther.codCancellable);
871
      if (lastComparison != 0) {
872
        return lastComparison;
873
      }
874
    }
875
    lastComparison = Boolean.valueOf(isSetPrepaidCancellableBeforeBilled()).compareTo(typedOther.isSetPrepaidCancellableBeforeBilled());
876
    if (lastComparison != 0) {
877
      return lastComparison;
878
    }
879
    if (isSetPrepaidCancellableBeforeBilled()) {
880
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableBeforeBilled, typedOther.prepaidCancellableBeforeBilled);
881
      if (lastComparison != 0) {
882
        return lastComparison;
883
      }
884
    }
885
    lastComparison = Boolean.valueOf(isSetPrepaidCancellableAfterBilled()).compareTo(typedOther.isSetPrepaidCancellableAfterBilled());
886
    if (lastComparison != 0) {
887
      return lastComparison;
888
    }
889
    if (isSetPrepaidCancellableAfterBilled()) {
890
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableAfterBilled, typedOther.prepaidCancellableAfterBilled);
891
      if (lastComparison != 0) {
892
        return lastComparison;
893
      }
894
    }
4837 varun.gupt 895
    lastComparison = Boolean.valueOf(isSetOpenOrders()).compareTo(typedOther.isSetOpenOrders());
896
    if (lastComparison != 0) {
897
      return lastComparison;
898
    }
899
    if (isSetOpenOrders()) {
900
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openOrders, typedOther.openOrders);
901
      if (lastComparison != 0) {
902
        return lastComparison;
903
      }
904
    }
4983 phani.kuma 905
    lastComparison = Boolean.valueOf(isSetShippedOrders()).compareTo(typedOther.isSetShippedOrders());
906
    if (lastComparison != 0) {
907
      return lastComparison;
908
    }
909
    if (isSetShippedOrders()) {
910
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippedOrders, typedOther.shippedOrders);
911
      if (lastComparison != 0) {
912
        return lastComparison;
913
      }
914
    }
915
    lastComparison = Boolean.valueOf(isSetFailedOrders()).compareTo(typedOther.isSetFailedOrders());
916
    if (lastComparison != 0) {
917
      return lastComparison;
918
    }
919
    if (isSetFailedOrders()) {
920
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failedOrders, typedOther.failedOrders);
921
      if (lastComparison != 0) {
922
        return lastComparison;
923
      }
924
    }
4815 phani.kuma 925
    return 0;
926
  }
927
 
928
  public _Fields fieldForId(int fieldId) {
929
    return _Fields.findByThriftId(fieldId);
930
  }
931
 
932
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
933
    org.apache.thrift.protocol.TField field;
934
    iprot.readStructBegin();
935
    while (true)
936
    {
937
      field = iprot.readFieldBegin();
938
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
939
        break;
940
      }
941
      switch (field.id) {
942
        case 1: // COD_CANCELLABLE
943
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
944
            {
945
              org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
946
              this.codCancellable = new ArrayList<OrderStatus>(_list8.size);
947
              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
948
              {
949
                OrderStatus _elem10; // required
950
                _elem10 = OrderStatus.findByValue(iprot.readI32());
951
                this.codCancellable.add(_elem10);
952
              }
953
              iprot.readListEnd();
954
            }
955
          } else { 
956
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
957
          }
958
          break;
959
        case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
960
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
961
            {
962
              org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
963
              this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>(_list11.size);
964
              for (int _i12 = 0; _i12 < _list11.size; ++_i12)
965
              {
966
                OrderStatus _elem13; // required
967
                _elem13 = OrderStatus.findByValue(iprot.readI32());
968
                this.prepaidCancellableBeforeBilled.add(_elem13);
969
              }
970
              iprot.readListEnd();
971
            }
972
          } else { 
973
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
974
          }
975
          break;
976
        case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
977
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
978
            {
979
              org.apache.thrift.protocol.TList _list14 = iprot.readListBegin();
980
              this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>(_list14.size);
981
              for (int _i15 = 0; _i15 < _list14.size; ++_i15)
982
              {
983
                OrderStatus _elem16; // required
984
                _elem16 = OrderStatus.findByValue(iprot.readI32());
985
                this.prepaidCancellableAfterBilled.add(_elem16);
986
              }
987
              iprot.readListEnd();
988
            }
989
          } else { 
990
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
991
          }
992
          break;
4837 varun.gupt 993
        case 4: // OPEN_ORDERS
994
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
995
            {
996
              org.apache.thrift.protocol.TList _list17 = iprot.readListBegin();
997
              this.openOrders = new ArrayList<OrderStatus>(_list17.size);
998
              for (int _i18 = 0; _i18 < _list17.size; ++_i18)
999
              {
1000
                OrderStatus _elem19; // required
1001
                _elem19 = OrderStatus.findByValue(iprot.readI32());
1002
                this.openOrders.add(_elem19);
1003
              }
1004
              iprot.readListEnd();
1005
            }
1006
          } else { 
1007
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1008
          }
1009
          break;
4983 phani.kuma 1010
        case 5: // SHIPPED_ORDERS
1011
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1012
            {
1013
              org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
1014
              this.shippedOrders = new ArrayList<OrderStatus>(_list20.size);
1015
              for (int _i21 = 0; _i21 < _list20.size; ++_i21)
1016
              {
1017
                OrderStatus _elem22; // required
1018
                _elem22 = OrderStatus.findByValue(iprot.readI32());
1019
                this.shippedOrders.add(_elem22);
1020
              }
1021
              iprot.readListEnd();
1022
            }
1023
          } else { 
1024
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1025
          }
1026
          break;
1027
        case 6: // FAILED_ORDERS
1028
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1029
            {
1030
              org.apache.thrift.protocol.TList _list23 = iprot.readListBegin();
1031
              this.failedOrders = new ArrayList<OrderStatus>(_list23.size);
1032
              for (int _i24 = 0; _i24 < _list23.size; ++_i24)
1033
              {
1034
                OrderStatus _elem25; // required
1035
                _elem25 = OrderStatus.findByValue(iprot.readI32());
1036
                this.failedOrders.add(_elem25);
1037
              }
1038
              iprot.readListEnd();
1039
            }
1040
          } else { 
1041
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1042
          }
1043
          break;
4815 phani.kuma 1044
        default:
1045
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1046
      }
1047
      iprot.readFieldEnd();
1048
    }
1049
    iprot.readStructEnd();
1050
    validate();
1051
  }
1052
 
1053
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1054
    validate();
1055
 
1056
    oprot.writeStructBegin(STRUCT_DESC);
1057
    if (this.codCancellable != null) {
1058
      oprot.writeFieldBegin(COD_CANCELLABLE_FIELD_DESC);
1059
      {
1060
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.codCancellable.size()));
4983 phani.kuma 1061
        for (OrderStatus _iter26 : this.codCancellable)
4815 phani.kuma 1062
        {
4983 phani.kuma 1063
          oprot.writeI32(_iter26.getValue());
4815 phani.kuma 1064
        }
1065
        oprot.writeListEnd();
1066
      }
1067
      oprot.writeFieldEnd();
1068
    }
1069
    if (this.prepaidCancellableBeforeBilled != null) {
1070
      oprot.writeFieldBegin(PREPAID_CANCELLABLE_BEFORE_BILLED_FIELD_DESC);
1071
      {
1072
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableBeforeBilled.size()));
4983 phani.kuma 1073
        for (OrderStatus _iter27 : this.prepaidCancellableBeforeBilled)
4815 phani.kuma 1074
        {
4983 phani.kuma 1075
          oprot.writeI32(_iter27.getValue());
4815 phani.kuma 1076
        }
1077
        oprot.writeListEnd();
1078
      }
1079
      oprot.writeFieldEnd();
1080
    }
1081
    if (this.prepaidCancellableAfterBilled != null) {
1082
      oprot.writeFieldBegin(PREPAID_CANCELLABLE_AFTER_BILLED_FIELD_DESC);
1083
      {
1084
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableAfterBilled.size()));
4983 phani.kuma 1085
        for (OrderStatus _iter28 : this.prepaidCancellableAfterBilled)
4815 phani.kuma 1086
        {
4983 phani.kuma 1087
          oprot.writeI32(_iter28.getValue());
4815 phani.kuma 1088
        }
1089
        oprot.writeListEnd();
1090
      }
1091
      oprot.writeFieldEnd();
1092
    }
4837 varun.gupt 1093
    if (this.openOrders != null) {
1094
      oprot.writeFieldBegin(OPEN_ORDERS_FIELD_DESC);
1095
      {
1096
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.openOrders.size()));
4983 phani.kuma 1097
        for (OrderStatus _iter29 : this.openOrders)
4837 varun.gupt 1098
        {
4983 phani.kuma 1099
          oprot.writeI32(_iter29.getValue());
4837 varun.gupt 1100
        }
1101
        oprot.writeListEnd();
1102
      }
1103
      oprot.writeFieldEnd();
1104
    }
4983 phani.kuma 1105
    if (this.shippedOrders != null) {
1106
      oprot.writeFieldBegin(SHIPPED_ORDERS_FIELD_DESC);
1107
      {
1108
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.shippedOrders.size()));
1109
        for (OrderStatus _iter30 : this.shippedOrders)
1110
        {
1111
          oprot.writeI32(_iter30.getValue());
1112
        }
1113
        oprot.writeListEnd();
1114
      }
1115
      oprot.writeFieldEnd();
1116
    }
1117
    if (this.failedOrders != null) {
1118
      oprot.writeFieldBegin(FAILED_ORDERS_FIELD_DESC);
1119
      {
1120
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.failedOrders.size()));
1121
        for (OrderStatus _iter31 : this.failedOrders)
1122
        {
1123
          oprot.writeI32(_iter31.getValue());
1124
        }
1125
        oprot.writeListEnd();
1126
      }
1127
      oprot.writeFieldEnd();
1128
    }
4815 phani.kuma 1129
    oprot.writeFieldStop();
1130
    oprot.writeStructEnd();
1131
  }
1132
 
1133
  @Override
1134
  public String toString() {
1135
    StringBuilder sb = new StringBuilder("OrderStatusGroups(");
1136
    boolean first = true;
1137
 
1138
    sb.append("codCancellable:");
1139
    if (this.codCancellable == null) {
1140
      sb.append("null");
1141
    } else {
1142
      sb.append(this.codCancellable);
1143
    }
1144
    first = false;
1145
    if (!first) sb.append(", ");
1146
    sb.append("prepaidCancellableBeforeBilled:");
1147
    if (this.prepaidCancellableBeforeBilled == null) {
1148
      sb.append("null");
1149
    } else {
1150
      sb.append(this.prepaidCancellableBeforeBilled);
1151
    }
1152
    first = false;
1153
    if (!first) sb.append(", ");
1154
    sb.append("prepaidCancellableAfterBilled:");
1155
    if (this.prepaidCancellableAfterBilled == null) {
1156
      sb.append("null");
1157
    } else {
1158
      sb.append(this.prepaidCancellableAfterBilled);
1159
    }
1160
    first = false;
4837 varun.gupt 1161
    if (!first) sb.append(", ");
1162
    sb.append("openOrders:");
1163
    if (this.openOrders == null) {
1164
      sb.append("null");
1165
    } else {
1166
      sb.append(this.openOrders);
1167
    }
1168
    first = false;
4983 phani.kuma 1169
    if (!first) sb.append(", ");
1170
    sb.append("shippedOrders:");
1171
    if (this.shippedOrders == null) {
1172
      sb.append("null");
1173
    } else {
1174
      sb.append(this.shippedOrders);
1175
    }
1176
    first = false;
1177
    if (!first) sb.append(", ");
1178
    sb.append("failedOrders:");
1179
    if (this.failedOrders == null) {
1180
      sb.append("null");
1181
    } else {
1182
      sb.append(this.failedOrders);
1183
    }
1184
    first = false;
4815 phani.kuma 1185
    sb.append(")");
1186
    return sb.toString();
1187
  }
1188
 
1189
  public void validate() throws org.apache.thrift.TException {
1190
    // check for required fields
1191
  }
1192
 
1193
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1194
    try {
1195
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1196
    } catch (org.apache.thrift.TException te) {
1197
      throw new java.io.IOException(te);
1198
    }
1199
  }
1200
 
1201
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1202
    try {
1203
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1204
    } catch (org.apache.thrift.TException te) {
1205
      throw new java.io.IOException(te);
1206
    }
1207
  }
1208
 
1209
}
1210