Subversion Repositories SmartDukaan

Rev

Rev 6019 | Rev 6188 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.order;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OrderStatusGroups implements org.apache.thrift.TBase<OrderStatusGroups, OrderStatusGroups._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OrderStatusGroups");

  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);
  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);
  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);
  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);
  private static final org.apache.thrift.protocol.TField REFUNDED_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("refundedOrders", org.apache.thrift.protocol.TType.LIST, (short)5);
  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)6);
  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)7);

  private List<OrderStatus> codCancellable; // required
  private List<OrderStatus> prepaidCancellableBeforeBilled; // required
  private List<OrderStatus> prepaidCancellableAfterBilled; // required
  private List<OrderStatus> openOrders; // required
  private List<OrderStatus> refundedOrders; // required
  private List<OrderStatus> shippedOrders; // required
  private List<OrderStatus> failedOrders; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    COD_CANCELLABLE((short)1, "codCancellable"),
    PREPAID_CANCELLABLE_BEFORE_BILLED((short)2, "prepaidCancellableBeforeBilled"),
    PREPAID_CANCELLABLE_AFTER_BILLED((short)3, "prepaidCancellableAfterBilled"),
    OPEN_ORDERS((short)4, "openOrders"),
    REFUNDED_ORDERS((short)5, "refundedOrders"),
    SHIPPED_ORDERS((short)6, "shippedOrders"),
    FAILED_ORDERS((short)7, "failedOrders");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // COD_CANCELLABLE
          return COD_CANCELLABLE;
        case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
          return PREPAID_CANCELLABLE_BEFORE_BILLED;
        case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
          return PREPAID_CANCELLABLE_AFTER_BILLED;
        case 4: // OPEN_ORDERS
          return OPEN_ORDERS;
        case 5: // REFUNDED_ORDERS
          return REFUNDED_ORDERS;
        case 6: // SHIPPED_ORDERS
          return SHIPPED_ORDERS;
        case 7: // FAILED_ORDERS
          return FAILED_ORDERS;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.COD_CANCELLABLE, new org.apache.thrift.meta_data.FieldMetaData("codCancellable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.PREPAID_CANCELLABLE_BEFORE_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableBeforeBilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.PREPAID_CANCELLABLE_AFTER_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableAfterBilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.OPEN_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("openOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.REFUNDED_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("refundedOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.SHIPPED_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("shippedOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    tmpMap.put(_Fields.FAILED_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("failedOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OrderStatusGroups.class, metaDataMap);
  }

  public OrderStatusGroups() {
    this.codCancellable = new ArrayList<OrderStatus>();
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);

    this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);

    this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);

    this.openOrders = new ArrayList<OrderStatus>();
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_PENDING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED_DENIED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED_TIMEOUT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_TIMEOUT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CAPTURE_IN_PROCESS);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DELIVERED_AT_STORE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RECEIVED_AT_STORE);

    this.refundedOrders = new ArrayList<OrderStatus>();
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REFUNDED_RCVD_DAMAGED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_DAMAGED_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REFUNDED_RCVD_DAMAGED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT_REFUNDED);

    this.shippedOrders = new ArrayList<OrderStatus>();
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DELIVERED_AT_STORE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RECEIVED_AT_STORE);

    this.failedOrders = new ArrayList<OrderStatus>();
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FAILED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.REJECTED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_RESHIPPED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_RESHIPPED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RESHIPPED);

  }

  public OrderStatusGroups(
    List<OrderStatus> codCancellable,
    List<OrderStatus> prepaidCancellableBeforeBilled,
    List<OrderStatus> prepaidCancellableAfterBilled,
    List<OrderStatus> openOrders,
    List<OrderStatus> refundedOrders,
    List<OrderStatus> shippedOrders,
    List<OrderStatus> failedOrders)
  {
    this();
    this.codCancellable = codCancellable;
    this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
    this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
    this.openOrders = openOrders;
    this.refundedOrders = refundedOrders;
    this.shippedOrders = shippedOrders;
    this.failedOrders = failedOrders;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public OrderStatusGroups(OrderStatusGroups other) {
    if (other.isSetCodCancellable()) {
      List<OrderStatus> __this__codCancellable = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.codCancellable) {
        __this__codCancellable.add(other_element);
      }
      this.codCancellable = __this__codCancellable;
    }
    if (other.isSetPrepaidCancellableBeforeBilled()) {
      List<OrderStatus> __this__prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.prepaidCancellableBeforeBilled) {
        __this__prepaidCancellableBeforeBilled.add(other_element);
      }
      this.prepaidCancellableBeforeBilled = __this__prepaidCancellableBeforeBilled;
    }
    if (other.isSetPrepaidCancellableAfterBilled()) {
      List<OrderStatus> __this__prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.prepaidCancellableAfterBilled) {
        __this__prepaidCancellableAfterBilled.add(other_element);
      }
      this.prepaidCancellableAfterBilled = __this__prepaidCancellableAfterBilled;
    }
    if (other.isSetOpenOrders()) {
      List<OrderStatus> __this__openOrders = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.openOrders) {
        __this__openOrders.add(other_element);
      }
      this.openOrders = __this__openOrders;
    }
    if (other.isSetRefundedOrders()) {
      List<OrderStatus> __this__refundedOrders = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.refundedOrders) {
        __this__refundedOrders.add(other_element);
      }
      this.refundedOrders = __this__refundedOrders;
    }
    if (other.isSetShippedOrders()) {
      List<OrderStatus> __this__shippedOrders = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.shippedOrders) {
        __this__shippedOrders.add(other_element);
      }
      this.shippedOrders = __this__shippedOrders;
    }
    if (other.isSetFailedOrders()) {
      List<OrderStatus> __this__failedOrders = new ArrayList<OrderStatus>();
      for (OrderStatus other_element : other.failedOrders) {
        __this__failedOrders.add(other_element);
      }
      this.failedOrders = __this__failedOrders;
    }
  }

  public OrderStatusGroups deepCopy() {
    return new OrderStatusGroups(this);
  }

  @Override
  public void clear() {
    this.codCancellable = new ArrayList<OrderStatus>();
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);

    this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);

    this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);

    this.openOrders = new ArrayList<OrderStatus>();
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_PENDING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED_DENIED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCEL_REQUEST_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED_TIMEOUT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_TIMEOUT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.CAPTURE_IN_PROCESS);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.DELIVERED_AT_STORE);
    this.openOrders.add(in.shop2020.model.v1.order.OrderStatus.RECEIVED_AT_STORE);

    this.refundedOrders = new ArrayList<OrderStatus>();
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REFUNDED_RCVD_DAMAGED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_DAMAGED_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REFUNDED_RCVD_DAMAGED);
    this.refundedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT_REFUNDED);

    this.shippedOrders = new ArrayList<OrderStatus>();
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_FROM_WH);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_LOGST);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.SHIPPED_TO_DESTINATION_CITY);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.REACHED_DESTINATION_CITY);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_REQUEST_RAISED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_PICKUP_CONFIRMED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RETURN_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_INVALID);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_CERT_VALID);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_RECEIVED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_REQUEST_AUTHORIZED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_INVENTORY_REVERSED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_RECEIVED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_REQUEST_AUTHORIZED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_REQUEST_RAISED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_DENIED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PICKUP_CONFIRMED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RETURN_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_PRESTINE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_RECEIVED_DAMAGED);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_USABLE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RET_PRODUCT_UNUSABLE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.LOST_IN_TRANSIT);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.DELIVERED_AT_STORE);
    this.shippedOrders.add(in.shop2020.model.v1.order.OrderStatus.RECEIVED_AT_STORE);

    this.failedOrders = new ArrayList<OrderStatus>();
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FAILED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.REJECTED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_INVALID_RESHIPPED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.DOA_VALID_RESHIPPED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_REFUNDED);
    this.failedOrders.add(in.shop2020.model.v1.order.OrderStatus.RTO_RESHIPPED);

  }

  public int getCodCancellableSize() {
    return (this.codCancellable == null) ? 0 : this.codCancellable.size();
  }

  public java.util.Iterator<OrderStatus> getCodCancellableIterator() {
    return (this.codCancellable == null) ? null : this.codCancellable.iterator();
  }

  public void addToCodCancellable(OrderStatus elem) {
    if (this.codCancellable == null) {
      this.codCancellable = new ArrayList<OrderStatus>();
    }
    this.codCancellable.add(elem);
  }

  public List<OrderStatus> getCodCancellable() {
    return this.codCancellable;
  }

  public void setCodCancellable(List<OrderStatus> codCancellable) {
    this.codCancellable = codCancellable;
  }

  public void unsetCodCancellable() {
    this.codCancellable = null;
  }

  /** Returns true if field codCancellable is set (has been assigned a value) and false otherwise */
  public boolean isSetCodCancellable() {
    return this.codCancellable != null;
  }

  public void setCodCancellableIsSet(boolean value) {
    if (!value) {
      this.codCancellable = null;
    }
  }

  public int getPrepaidCancellableBeforeBilledSize() {
    return (this.prepaidCancellableBeforeBilled == null) ? 0 : this.prepaidCancellableBeforeBilled.size();
  }

  public java.util.Iterator<OrderStatus> getPrepaidCancellableBeforeBilledIterator() {
    return (this.prepaidCancellableBeforeBilled == null) ? null : this.prepaidCancellableBeforeBilled.iterator();
  }

  public void addToPrepaidCancellableBeforeBilled(OrderStatus elem) {
    if (this.prepaidCancellableBeforeBilled == null) {
      this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
    }
    this.prepaidCancellableBeforeBilled.add(elem);
  }

  public List<OrderStatus> getPrepaidCancellableBeforeBilled() {
    return this.prepaidCancellableBeforeBilled;
  }

  public void setPrepaidCancellableBeforeBilled(List<OrderStatus> prepaidCancellableBeforeBilled) {
    this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
  }

  public void unsetPrepaidCancellableBeforeBilled() {
    this.prepaidCancellableBeforeBilled = null;
  }

  /** Returns true if field prepaidCancellableBeforeBilled is set (has been assigned a value) and false otherwise */
  public boolean isSetPrepaidCancellableBeforeBilled() {
    return this.prepaidCancellableBeforeBilled != null;
  }

  public void setPrepaidCancellableBeforeBilledIsSet(boolean value) {
    if (!value) {
      this.prepaidCancellableBeforeBilled = null;
    }
  }

  public int getPrepaidCancellableAfterBilledSize() {
    return (this.prepaidCancellableAfterBilled == null) ? 0 : this.prepaidCancellableAfterBilled.size();
  }

  public java.util.Iterator<OrderStatus> getPrepaidCancellableAfterBilledIterator() {
    return (this.prepaidCancellableAfterBilled == null) ? null : this.prepaidCancellableAfterBilled.iterator();
  }

  public void addToPrepaidCancellableAfterBilled(OrderStatus elem) {
    if (this.prepaidCancellableAfterBilled == null) {
      this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
    }
    this.prepaidCancellableAfterBilled.add(elem);
  }

  public List<OrderStatus> getPrepaidCancellableAfterBilled() {
    return this.prepaidCancellableAfterBilled;
  }

  public void setPrepaidCancellableAfterBilled(List<OrderStatus> prepaidCancellableAfterBilled) {
    this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
  }

  public void unsetPrepaidCancellableAfterBilled() {
    this.prepaidCancellableAfterBilled = null;
  }

  /** Returns true if field prepaidCancellableAfterBilled is set (has been assigned a value) and false otherwise */
  public boolean isSetPrepaidCancellableAfterBilled() {
    return this.prepaidCancellableAfterBilled != null;
  }

  public void setPrepaidCancellableAfterBilledIsSet(boolean value) {
    if (!value) {
      this.prepaidCancellableAfterBilled = null;
    }
  }

  public int getOpenOrdersSize() {
    return (this.openOrders == null) ? 0 : this.openOrders.size();
  }

  public java.util.Iterator<OrderStatus> getOpenOrdersIterator() {
    return (this.openOrders == null) ? null : this.openOrders.iterator();
  }

  public void addToOpenOrders(OrderStatus elem) {
    if (this.openOrders == null) {
      this.openOrders = new ArrayList<OrderStatus>();
    }
    this.openOrders.add(elem);
  }

  public List<OrderStatus> getOpenOrders() {
    return this.openOrders;
  }

  public void setOpenOrders(List<OrderStatus> openOrders) {
    this.openOrders = openOrders;
  }

  public void unsetOpenOrders() {
    this.openOrders = null;
  }

  /** Returns true if field openOrders is set (has been assigned a value) and false otherwise */
  public boolean isSetOpenOrders() {
    return this.openOrders != null;
  }

  public void setOpenOrdersIsSet(boolean value) {
    if (!value) {
      this.openOrders = null;
    }
  }

  public int getRefundedOrdersSize() {
    return (this.refundedOrders == null) ? 0 : this.refundedOrders.size();
  }

  public java.util.Iterator<OrderStatus> getRefundedOrdersIterator() {
    return (this.refundedOrders == null) ? null : this.refundedOrders.iterator();
  }

  public void addToRefundedOrders(OrderStatus elem) {
    if (this.refundedOrders == null) {
      this.refundedOrders = new ArrayList<OrderStatus>();
    }
    this.refundedOrders.add(elem);
  }

  public List<OrderStatus> getRefundedOrders() {
    return this.refundedOrders;
  }

  public void setRefundedOrders(List<OrderStatus> refundedOrders) {
    this.refundedOrders = refundedOrders;
  }

  public void unsetRefundedOrders() {
    this.refundedOrders = null;
  }

  /** Returns true if field refundedOrders is set (has been assigned a value) and false otherwise */
  public boolean isSetRefundedOrders() {
    return this.refundedOrders != null;
  }

  public void setRefundedOrdersIsSet(boolean value) {
    if (!value) {
      this.refundedOrders = null;
    }
  }

  public int getShippedOrdersSize() {
    return (this.shippedOrders == null) ? 0 : this.shippedOrders.size();
  }

  public java.util.Iterator<OrderStatus> getShippedOrdersIterator() {
    return (this.shippedOrders == null) ? null : this.shippedOrders.iterator();
  }

  public void addToShippedOrders(OrderStatus elem) {
    if (this.shippedOrders == null) {
      this.shippedOrders = new ArrayList<OrderStatus>();
    }
    this.shippedOrders.add(elem);
  }

  public List<OrderStatus> getShippedOrders() {
    return this.shippedOrders;
  }

  public void setShippedOrders(List<OrderStatus> shippedOrders) {
    this.shippedOrders = shippedOrders;
  }

  public void unsetShippedOrders() {
    this.shippedOrders = null;
  }

  /** Returns true if field shippedOrders is set (has been assigned a value) and false otherwise */
  public boolean isSetShippedOrders() {
    return this.shippedOrders != null;
  }

  public void setShippedOrdersIsSet(boolean value) {
    if (!value) {
      this.shippedOrders = null;
    }
  }

  public int getFailedOrdersSize() {
    return (this.failedOrders == null) ? 0 : this.failedOrders.size();
  }

  public java.util.Iterator<OrderStatus> getFailedOrdersIterator() {
    return (this.failedOrders == null) ? null : this.failedOrders.iterator();
  }

  public void addToFailedOrders(OrderStatus elem) {
    if (this.failedOrders == null) {
      this.failedOrders = new ArrayList<OrderStatus>();
    }
    this.failedOrders.add(elem);
  }

  public List<OrderStatus> getFailedOrders() {
    return this.failedOrders;
  }

  public void setFailedOrders(List<OrderStatus> failedOrders) {
    this.failedOrders = failedOrders;
  }

  public void unsetFailedOrders() {
    this.failedOrders = null;
  }

  /** Returns true if field failedOrders is set (has been assigned a value) and false otherwise */
  public boolean isSetFailedOrders() {
    return this.failedOrders != null;
  }

  public void setFailedOrdersIsSet(boolean value) {
    if (!value) {
      this.failedOrders = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case COD_CANCELLABLE:
      if (value == null) {
        unsetCodCancellable();
      } else {
        setCodCancellable((List<OrderStatus>)value);
      }
      break;

    case PREPAID_CANCELLABLE_BEFORE_BILLED:
      if (value == null) {
        unsetPrepaidCancellableBeforeBilled();
      } else {
        setPrepaidCancellableBeforeBilled((List<OrderStatus>)value);
      }
      break;

    case PREPAID_CANCELLABLE_AFTER_BILLED:
      if (value == null) {
        unsetPrepaidCancellableAfterBilled();
      } else {
        setPrepaidCancellableAfterBilled((List<OrderStatus>)value);
      }
      break;

    case OPEN_ORDERS:
      if (value == null) {
        unsetOpenOrders();
      } else {
        setOpenOrders((List<OrderStatus>)value);
      }
      break;

    case REFUNDED_ORDERS:
      if (value == null) {
        unsetRefundedOrders();
      } else {
        setRefundedOrders((List<OrderStatus>)value);
      }
      break;

    case SHIPPED_ORDERS:
      if (value == null) {
        unsetShippedOrders();
      } else {
        setShippedOrders((List<OrderStatus>)value);
      }
      break;

    case FAILED_ORDERS:
      if (value == null) {
        unsetFailedOrders();
      } else {
        setFailedOrders((List<OrderStatus>)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case COD_CANCELLABLE:
      return getCodCancellable();

    case PREPAID_CANCELLABLE_BEFORE_BILLED:
      return getPrepaidCancellableBeforeBilled();

    case PREPAID_CANCELLABLE_AFTER_BILLED:
      return getPrepaidCancellableAfterBilled();

    case OPEN_ORDERS:
      return getOpenOrders();

    case REFUNDED_ORDERS:
      return getRefundedOrders();

    case SHIPPED_ORDERS:
      return getShippedOrders();

    case FAILED_ORDERS:
      return getFailedOrders();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case COD_CANCELLABLE:
      return isSetCodCancellable();
    case PREPAID_CANCELLABLE_BEFORE_BILLED:
      return isSetPrepaidCancellableBeforeBilled();
    case PREPAID_CANCELLABLE_AFTER_BILLED:
      return isSetPrepaidCancellableAfterBilled();
    case OPEN_ORDERS:
      return isSetOpenOrders();
    case REFUNDED_ORDERS:
      return isSetRefundedOrders();
    case SHIPPED_ORDERS:
      return isSetShippedOrders();
    case FAILED_ORDERS:
      return isSetFailedOrders();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof OrderStatusGroups)
      return this.equals((OrderStatusGroups)that);
    return false;
  }

  public boolean equals(OrderStatusGroups that) {
    if (that == null)
      return false;

    boolean this_present_codCancellable = true && this.isSetCodCancellable();
    boolean that_present_codCancellable = true && that.isSetCodCancellable();
    if (this_present_codCancellable || that_present_codCancellable) {
      if (!(this_present_codCancellable && that_present_codCancellable))
        return false;
      if (!this.codCancellable.equals(that.codCancellable))
        return false;
    }

    boolean this_present_prepaidCancellableBeforeBilled = true && this.isSetPrepaidCancellableBeforeBilled();
    boolean that_present_prepaidCancellableBeforeBilled = true && that.isSetPrepaidCancellableBeforeBilled();
    if (this_present_prepaidCancellableBeforeBilled || that_present_prepaidCancellableBeforeBilled) {
      if (!(this_present_prepaidCancellableBeforeBilled && that_present_prepaidCancellableBeforeBilled))
        return false;
      if (!this.prepaidCancellableBeforeBilled.equals(that.prepaidCancellableBeforeBilled))
        return false;
    }

    boolean this_present_prepaidCancellableAfterBilled = true && this.isSetPrepaidCancellableAfterBilled();
    boolean that_present_prepaidCancellableAfterBilled = true && that.isSetPrepaidCancellableAfterBilled();
    if (this_present_prepaidCancellableAfterBilled || that_present_prepaidCancellableAfterBilled) {
      if (!(this_present_prepaidCancellableAfterBilled && that_present_prepaidCancellableAfterBilled))
        return false;
      if (!this.prepaidCancellableAfterBilled.equals(that.prepaidCancellableAfterBilled))
        return false;
    }

    boolean this_present_openOrders = true && this.isSetOpenOrders();
    boolean that_present_openOrders = true && that.isSetOpenOrders();
    if (this_present_openOrders || that_present_openOrders) {
      if (!(this_present_openOrders && that_present_openOrders))
        return false;
      if (!this.openOrders.equals(that.openOrders))
        return false;
    }

    boolean this_present_refundedOrders = true && this.isSetRefundedOrders();
    boolean that_present_refundedOrders = true && that.isSetRefundedOrders();
    if (this_present_refundedOrders || that_present_refundedOrders) {
      if (!(this_present_refundedOrders && that_present_refundedOrders))
        return false;
      if (!this.refundedOrders.equals(that.refundedOrders))
        return false;
    }

    boolean this_present_shippedOrders = true && this.isSetShippedOrders();
    boolean that_present_shippedOrders = true && that.isSetShippedOrders();
    if (this_present_shippedOrders || that_present_shippedOrders) {
      if (!(this_present_shippedOrders && that_present_shippedOrders))
        return false;
      if (!this.shippedOrders.equals(that.shippedOrders))
        return false;
    }

    boolean this_present_failedOrders = true && this.isSetFailedOrders();
    boolean that_present_failedOrders = true && that.isSetFailedOrders();
    if (this_present_failedOrders || that_present_failedOrders) {
      if (!(this_present_failedOrders && that_present_failedOrders))
        return false;
      if (!this.failedOrders.equals(that.failedOrders))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  public int compareTo(OrderStatusGroups other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    OrderStatusGroups typedOther = (OrderStatusGroups)other;

    lastComparison = Boolean.valueOf(isSetCodCancellable()).compareTo(typedOther.isSetCodCancellable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCodCancellable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCancellable, typedOther.codCancellable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPrepaidCancellableBeforeBilled()).compareTo(typedOther.isSetPrepaidCancellableBeforeBilled());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPrepaidCancellableBeforeBilled()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableBeforeBilled, typedOther.prepaidCancellableBeforeBilled);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPrepaidCancellableAfterBilled()).compareTo(typedOther.isSetPrepaidCancellableAfterBilled());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPrepaidCancellableAfterBilled()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableAfterBilled, typedOther.prepaidCancellableAfterBilled);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOpenOrders()).compareTo(typedOther.isSetOpenOrders());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOpenOrders()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openOrders, typedOther.openOrders);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRefundedOrders()).compareTo(typedOther.isSetRefundedOrders());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRefundedOrders()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refundedOrders, typedOther.refundedOrders);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetShippedOrders()).compareTo(typedOther.isSetShippedOrders());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShippedOrders()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippedOrders, typedOther.shippedOrders);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFailedOrders()).compareTo(typedOther.isSetFailedOrders());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFailedOrders()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failedOrders, typedOther.failedOrders);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // COD_CANCELLABLE
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
              this.codCancellable = new ArrayList<OrderStatus>(_list8.size);
              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
              {
                OrderStatus _elem10; // required
                _elem10 = OrderStatus.findByValue(iprot.readI32());
                this.codCancellable.add(_elem10);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
              this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>(_list11.size);
              for (int _i12 = 0; _i12 < _list11.size; ++_i12)
              {
                OrderStatus _elem13; // required
                _elem13 = OrderStatus.findByValue(iprot.readI32());
                this.prepaidCancellableBeforeBilled.add(_elem13);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list14 = iprot.readListBegin();
              this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>(_list14.size);
              for (int _i15 = 0; _i15 < _list14.size; ++_i15)
              {
                OrderStatus _elem16; // required
                _elem16 = OrderStatus.findByValue(iprot.readI32());
                this.prepaidCancellableAfterBilled.add(_elem16);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // OPEN_ORDERS
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list17 = iprot.readListBegin();
              this.openOrders = new ArrayList<OrderStatus>(_list17.size);
              for (int _i18 = 0; _i18 < _list17.size; ++_i18)
              {
                OrderStatus _elem19; // required
                _elem19 = OrderStatus.findByValue(iprot.readI32());
                this.openOrders.add(_elem19);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // REFUNDED_ORDERS
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
              this.refundedOrders = new ArrayList<OrderStatus>(_list20.size);
              for (int _i21 = 0; _i21 < _list20.size; ++_i21)
              {
                OrderStatus _elem22; // required
                _elem22 = OrderStatus.findByValue(iprot.readI32());
                this.refundedOrders.add(_elem22);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // SHIPPED_ORDERS
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list23 = iprot.readListBegin();
              this.shippedOrders = new ArrayList<OrderStatus>(_list23.size);
              for (int _i24 = 0; _i24 < _list23.size; ++_i24)
              {
                OrderStatus _elem25; // required
                _elem25 = OrderStatus.findByValue(iprot.readI32());
                this.shippedOrders.add(_elem25);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // FAILED_ORDERS
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
              this.failedOrders = new ArrayList<OrderStatus>(_list26.size);
              for (int _i27 = 0; _i27 < _list26.size; ++_i27)
              {
                OrderStatus _elem28; // required
                _elem28 = OrderStatus.findByValue(iprot.readI32());
                this.failedOrders.add(_elem28);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();
    validate();
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.codCancellable != null) {
      oprot.writeFieldBegin(COD_CANCELLABLE_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.codCancellable.size()));
        for (OrderStatus _iter29 : this.codCancellable)
        {
          oprot.writeI32(_iter29.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.prepaidCancellableBeforeBilled != null) {
      oprot.writeFieldBegin(PREPAID_CANCELLABLE_BEFORE_BILLED_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableBeforeBilled.size()));
        for (OrderStatus _iter30 : this.prepaidCancellableBeforeBilled)
        {
          oprot.writeI32(_iter30.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.prepaidCancellableAfterBilled != null) {
      oprot.writeFieldBegin(PREPAID_CANCELLABLE_AFTER_BILLED_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableAfterBilled.size()));
        for (OrderStatus _iter31 : this.prepaidCancellableAfterBilled)
        {
          oprot.writeI32(_iter31.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.openOrders != null) {
      oprot.writeFieldBegin(OPEN_ORDERS_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.openOrders.size()));
        for (OrderStatus _iter32 : this.openOrders)
        {
          oprot.writeI32(_iter32.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.refundedOrders != null) {
      oprot.writeFieldBegin(REFUNDED_ORDERS_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.refundedOrders.size()));
        for (OrderStatus _iter33 : this.refundedOrders)
        {
          oprot.writeI32(_iter33.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.shippedOrders != null) {
      oprot.writeFieldBegin(SHIPPED_ORDERS_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.shippedOrders.size()));
        for (OrderStatus _iter34 : this.shippedOrders)
        {
          oprot.writeI32(_iter34.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.failedOrders != null) {
      oprot.writeFieldBegin(FAILED_ORDERS_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.failedOrders.size()));
        for (OrderStatus _iter35 : this.failedOrders)
        {
          oprot.writeI32(_iter35.getValue());
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("OrderStatusGroups(");
    boolean first = true;

    sb.append("codCancellable:");
    if (this.codCancellable == null) {
      sb.append("null");
    } else {
      sb.append(this.codCancellable);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("prepaidCancellableBeforeBilled:");
    if (this.prepaidCancellableBeforeBilled == null) {
      sb.append("null");
    } else {
      sb.append(this.prepaidCancellableBeforeBilled);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("prepaidCancellableAfterBilled:");
    if (this.prepaidCancellableAfterBilled == null) {
      sb.append("null");
    } else {
      sb.append(this.prepaidCancellableAfterBilled);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("openOrders:");
    if (this.openOrders == null) {
      sb.append("null");
    } else {
      sb.append(this.openOrders);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("refundedOrders:");
    if (this.refundedOrders == null) {
      sb.append("null");
    } else {
      sb.append(this.refundedOrders);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("shippedOrders:");
    if (this.shippedOrders == null) {
      sb.append("null");
    } else {
      sb.append(this.shippedOrders);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("failedOrders:");
    if (this.failedOrders == null) {
      sb.append("null");
    } else {
      sb.append(this.failedOrders);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

}