| 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);
|
|
|
29 |
|
|
|
30 |
private List<OrderStatus> codCancellable; // required
|
|
|
31 |
private List<OrderStatus> prepaidCancellableBeforeBilled; // required
|
|
|
32 |
private List<OrderStatus> prepaidCancellableAfterBilled; // required
|
|
|
33 |
|
|
|
34 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
35 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
36 |
COD_CANCELLABLE((short)1, "codCancellable"),
|
|
|
37 |
PREPAID_CANCELLABLE_BEFORE_BILLED((short)2, "prepaidCancellableBeforeBilled"),
|
|
|
38 |
PREPAID_CANCELLABLE_AFTER_BILLED((short)3, "prepaidCancellableAfterBilled");
|
|
|
39 |
|
|
|
40 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
41 |
|
|
|
42 |
static {
|
|
|
43 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
44 |
byName.put(field.getFieldName(), field);
|
|
|
45 |
}
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
/**
|
|
|
49 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
50 |
*/
|
|
|
51 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
52 |
switch(fieldId) {
|
|
|
53 |
case 1: // COD_CANCELLABLE
|
|
|
54 |
return COD_CANCELLABLE;
|
|
|
55 |
case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
|
|
|
56 |
return PREPAID_CANCELLABLE_BEFORE_BILLED;
|
|
|
57 |
case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
|
|
|
58 |
return PREPAID_CANCELLABLE_AFTER_BILLED;
|
|
|
59 |
default:
|
|
|
60 |
return null;
|
|
|
61 |
}
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
/**
|
|
|
65 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
66 |
* if it is not found.
|
|
|
67 |
*/
|
|
|
68 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
69 |
_Fields fields = findByThriftId(fieldId);
|
|
|
70 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
71 |
return fields;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
/**
|
|
|
75 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
76 |
*/
|
|
|
77 |
public static _Fields findByName(String name) {
|
|
|
78 |
return byName.get(name);
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
private final short _thriftId;
|
|
|
82 |
private final String _fieldName;
|
|
|
83 |
|
|
|
84 |
_Fields(short thriftId, String fieldName) {
|
|
|
85 |
_thriftId = thriftId;
|
|
|
86 |
_fieldName = fieldName;
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
public short getThriftFieldId() {
|
|
|
90 |
return _thriftId;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public String getFieldName() {
|
|
|
94 |
return _fieldName;
|
|
|
95 |
}
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
// isset id assignments
|
|
|
99 |
|
|
|
100 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
101 |
static {
|
|
|
102 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
103 |
tmpMap.put(_Fields.COD_CANCELLABLE, new org.apache.thrift.meta_data.FieldMetaData("codCancellable", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
104 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
105 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
|
|
|
106 |
tmpMap.put(_Fields.PREPAID_CANCELLABLE_BEFORE_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableBeforeBilled", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
107 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
108 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
|
|
|
109 |
tmpMap.put(_Fields.PREPAID_CANCELLABLE_AFTER_BILLED, new org.apache.thrift.meta_data.FieldMetaData("prepaidCancellableAfterBilled", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
110 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
111 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class))));
|
|
|
112 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
113 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OrderStatusGroups.class, metaDataMap);
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
public OrderStatusGroups() {
|
|
|
117 |
this.codCancellable = new ArrayList<OrderStatus>();
|
|
|
118 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
|
|
|
119 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
|
|
|
120 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
|
|
|
121 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
|
|
|
122 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
|
|
|
123 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
|
|
|
124 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
|
|
|
125 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
|
|
|
126 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
|
|
|
127 |
|
|
|
128 |
this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
|
|
|
129 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
|
|
|
130 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
|
|
|
131 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
|
|
|
132 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
|
|
|
133 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
|
|
|
134 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
|
|
|
135 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
|
|
|
136 |
|
|
|
137 |
this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
|
|
|
138 |
this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
|
|
|
139 |
this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
|
|
|
140 |
|
|
|
141 |
}
|
|
|
142 |
|
|
|
143 |
public OrderStatusGroups(
|
|
|
144 |
List<OrderStatus> codCancellable,
|
|
|
145 |
List<OrderStatus> prepaidCancellableBeforeBilled,
|
|
|
146 |
List<OrderStatus> prepaidCancellableAfterBilled)
|
|
|
147 |
{
|
|
|
148 |
this();
|
|
|
149 |
this.codCancellable = codCancellable;
|
|
|
150 |
this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
|
|
|
151 |
this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
/**
|
|
|
155 |
* Performs a deep copy on <i>other</i>.
|
|
|
156 |
*/
|
|
|
157 |
public OrderStatusGroups(OrderStatusGroups other) {
|
|
|
158 |
if (other.isSetCodCancellable()) {
|
|
|
159 |
List<OrderStatus> __this__codCancellable = new ArrayList<OrderStatus>();
|
|
|
160 |
for (OrderStatus other_element : other.codCancellable) {
|
|
|
161 |
__this__codCancellable.add(other_element);
|
|
|
162 |
}
|
|
|
163 |
this.codCancellable = __this__codCancellable;
|
|
|
164 |
}
|
|
|
165 |
if (other.isSetPrepaidCancellableBeforeBilled()) {
|
|
|
166 |
List<OrderStatus> __this__prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
|
|
|
167 |
for (OrderStatus other_element : other.prepaidCancellableBeforeBilled) {
|
|
|
168 |
__this__prepaidCancellableBeforeBilled.add(other_element);
|
|
|
169 |
}
|
|
|
170 |
this.prepaidCancellableBeforeBilled = __this__prepaidCancellableBeforeBilled;
|
|
|
171 |
}
|
|
|
172 |
if (other.isSetPrepaidCancellableAfterBilled()) {
|
|
|
173 |
List<OrderStatus> __this__prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
|
|
|
174 |
for (OrderStatus other_element : other.prepaidCancellableAfterBilled) {
|
|
|
175 |
__this__prepaidCancellableAfterBilled.add(other_element);
|
|
|
176 |
}
|
|
|
177 |
this.prepaidCancellableAfterBilled = __this__prepaidCancellableAfterBilled;
|
|
|
178 |
}
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
public OrderStatusGroups deepCopy() {
|
|
|
182 |
return new OrderStatusGroups(this);
|
|
|
183 |
}
|
|
|
184 |
|
|
|
185 |
@Override
|
|
|
186 |
public void clear() {
|
|
|
187 |
this.codCancellable = new ArrayList<OrderStatus>();
|
|
|
188 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
|
|
|
189 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
|
|
|
190 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
|
|
|
191 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
|
|
|
192 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
|
|
|
193 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
|
|
|
194 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
|
|
|
195 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
|
|
|
196 |
this.codCancellable.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
|
|
|
197 |
|
|
|
198 |
this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
|
|
|
199 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.COD_VERIFICATION_PENDING);
|
|
|
200 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.SUBMITTED_FOR_PROCESSING);
|
|
|
201 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.ACCEPTED);
|
|
|
202 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.INVENTORY_LOW);
|
|
|
203 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_PO_RAISED);
|
|
|
204 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
|
|
|
205 |
this.prepaidCancellableBeforeBilled.add(in.shop2020.model.v1.order.OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
|
|
|
206 |
|
|
|
207 |
this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
|
|
|
208 |
this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.BILLED);
|
|
|
209 |
this.prepaidCancellableAfterBilled.add(in.shop2020.model.v1.order.OrderStatus.PAYMENT_FLAGGED);
|
|
|
210 |
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
public int getCodCancellableSize() {
|
|
|
214 |
return (this.codCancellable == null) ? 0 : this.codCancellable.size();
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
public java.util.Iterator<OrderStatus> getCodCancellableIterator() {
|
|
|
218 |
return (this.codCancellable == null) ? null : this.codCancellable.iterator();
|
|
|
219 |
}
|
|
|
220 |
|
|
|
221 |
public void addToCodCancellable(OrderStatus elem) {
|
|
|
222 |
if (this.codCancellable == null) {
|
|
|
223 |
this.codCancellable = new ArrayList<OrderStatus>();
|
|
|
224 |
}
|
|
|
225 |
this.codCancellable.add(elem);
|
|
|
226 |
}
|
|
|
227 |
|
|
|
228 |
public List<OrderStatus> getCodCancellable() {
|
|
|
229 |
return this.codCancellable;
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
public void setCodCancellable(List<OrderStatus> codCancellable) {
|
|
|
233 |
this.codCancellable = codCancellable;
|
|
|
234 |
}
|
|
|
235 |
|
|
|
236 |
public void unsetCodCancellable() {
|
|
|
237 |
this.codCancellable = null;
|
|
|
238 |
}
|
|
|
239 |
|
|
|
240 |
/** Returns true if field codCancellable is set (has been assigned a value) and false otherwise */
|
|
|
241 |
public boolean isSetCodCancellable() {
|
|
|
242 |
return this.codCancellable != null;
|
|
|
243 |
}
|
|
|
244 |
|
|
|
245 |
public void setCodCancellableIsSet(boolean value) {
|
|
|
246 |
if (!value) {
|
|
|
247 |
this.codCancellable = null;
|
|
|
248 |
}
|
|
|
249 |
}
|
|
|
250 |
|
|
|
251 |
public int getPrepaidCancellableBeforeBilledSize() {
|
|
|
252 |
return (this.prepaidCancellableBeforeBilled == null) ? 0 : this.prepaidCancellableBeforeBilled.size();
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public java.util.Iterator<OrderStatus> getPrepaidCancellableBeforeBilledIterator() {
|
|
|
256 |
return (this.prepaidCancellableBeforeBilled == null) ? null : this.prepaidCancellableBeforeBilled.iterator();
|
|
|
257 |
}
|
|
|
258 |
|
|
|
259 |
public void addToPrepaidCancellableBeforeBilled(OrderStatus elem) {
|
|
|
260 |
if (this.prepaidCancellableBeforeBilled == null) {
|
|
|
261 |
this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>();
|
|
|
262 |
}
|
|
|
263 |
this.prepaidCancellableBeforeBilled.add(elem);
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
public List<OrderStatus> getPrepaidCancellableBeforeBilled() {
|
|
|
267 |
return this.prepaidCancellableBeforeBilled;
|
|
|
268 |
}
|
|
|
269 |
|
|
|
270 |
public void setPrepaidCancellableBeforeBilled(List<OrderStatus> prepaidCancellableBeforeBilled) {
|
|
|
271 |
this.prepaidCancellableBeforeBilled = prepaidCancellableBeforeBilled;
|
|
|
272 |
}
|
|
|
273 |
|
|
|
274 |
public void unsetPrepaidCancellableBeforeBilled() {
|
|
|
275 |
this.prepaidCancellableBeforeBilled = null;
|
|
|
276 |
}
|
|
|
277 |
|
|
|
278 |
/** Returns true if field prepaidCancellableBeforeBilled is set (has been assigned a value) and false otherwise */
|
|
|
279 |
public boolean isSetPrepaidCancellableBeforeBilled() {
|
|
|
280 |
return this.prepaidCancellableBeforeBilled != null;
|
|
|
281 |
}
|
|
|
282 |
|
|
|
283 |
public void setPrepaidCancellableBeforeBilledIsSet(boolean value) {
|
|
|
284 |
if (!value) {
|
|
|
285 |
this.prepaidCancellableBeforeBilled = null;
|
|
|
286 |
}
|
|
|
287 |
}
|
|
|
288 |
|
|
|
289 |
public int getPrepaidCancellableAfterBilledSize() {
|
|
|
290 |
return (this.prepaidCancellableAfterBilled == null) ? 0 : this.prepaidCancellableAfterBilled.size();
|
|
|
291 |
}
|
|
|
292 |
|
|
|
293 |
public java.util.Iterator<OrderStatus> getPrepaidCancellableAfterBilledIterator() {
|
|
|
294 |
return (this.prepaidCancellableAfterBilled == null) ? null : this.prepaidCancellableAfterBilled.iterator();
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
public void addToPrepaidCancellableAfterBilled(OrderStatus elem) {
|
|
|
298 |
if (this.prepaidCancellableAfterBilled == null) {
|
|
|
299 |
this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>();
|
|
|
300 |
}
|
|
|
301 |
this.prepaidCancellableAfterBilled.add(elem);
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
public List<OrderStatus> getPrepaidCancellableAfterBilled() {
|
|
|
305 |
return this.prepaidCancellableAfterBilled;
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
public void setPrepaidCancellableAfterBilled(List<OrderStatus> prepaidCancellableAfterBilled) {
|
|
|
309 |
this.prepaidCancellableAfterBilled = prepaidCancellableAfterBilled;
|
|
|
310 |
}
|
|
|
311 |
|
|
|
312 |
public void unsetPrepaidCancellableAfterBilled() {
|
|
|
313 |
this.prepaidCancellableAfterBilled = null;
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
/** Returns true if field prepaidCancellableAfterBilled is set (has been assigned a value) and false otherwise */
|
|
|
317 |
public boolean isSetPrepaidCancellableAfterBilled() {
|
|
|
318 |
return this.prepaidCancellableAfterBilled != null;
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
public void setPrepaidCancellableAfterBilledIsSet(boolean value) {
|
|
|
322 |
if (!value) {
|
|
|
323 |
this.prepaidCancellableAfterBilled = null;
|
|
|
324 |
}
|
|
|
325 |
}
|
|
|
326 |
|
|
|
327 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
328 |
switch (field) {
|
|
|
329 |
case COD_CANCELLABLE:
|
|
|
330 |
if (value == null) {
|
|
|
331 |
unsetCodCancellable();
|
|
|
332 |
} else {
|
|
|
333 |
setCodCancellable((List<OrderStatus>)value);
|
|
|
334 |
}
|
|
|
335 |
break;
|
|
|
336 |
|
|
|
337 |
case PREPAID_CANCELLABLE_BEFORE_BILLED:
|
|
|
338 |
if (value == null) {
|
|
|
339 |
unsetPrepaidCancellableBeforeBilled();
|
|
|
340 |
} else {
|
|
|
341 |
setPrepaidCancellableBeforeBilled((List<OrderStatus>)value);
|
|
|
342 |
}
|
|
|
343 |
break;
|
|
|
344 |
|
|
|
345 |
case PREPAID_CANCELLABLE_AFTER_BILLED:
|
|
|
346 |
if (value == null) {
|
|
|
347 |
unsetPrepaidCancellableAfterBilled();
|
|
|
348 |
} else {
|
|
|
349 |
setPrepaidCancellableAfterBilled((List<OrderStatus>)value);
|
|
|
350 |
}
|
|
|
351 |
break;
|
|
|
352 |
|
|
|
353 |
}
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
public Object getFieldValue(_Fields field) {
|
|
|
357 |
switch (field) {
|
|
|
358 |
case COD_CANCELLABLE:
|
|
|
359 |
return getCodCancellable();
|
|
|
360 |
|
|
|
361 |
case PREPAID_CANCELLABLE_BEFORE_BILLED:
|
|
|
362 |
return getPrepaidCancellableBeforeBilled();
|
|
|
363 |
|
|
|
364 |
case PREPAID_CANCELLABLE_AFTER_BILLED:
|
|
|
365 |
return getPrepaidCancellableAfterBilled();
|
|
|
366 |
|
|
|
367 |
}
|
|
|
368 |
throw new IllegalStateException();
|
|
|
369 |
}
|
|
|
370 |
|
|
|
371 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
372 |
public boolean isSet(_Fields field) {
|
|
|
373 |
if (field == null) {
|
|
|
374 |
throw new IllegalArgumentException();
|
|
|
375 |
}
|
|
|
376 |
|
|
|
377 |
switch (field) {
|
|
|
378 |
case COD_CANCELLABLE:
|
|
|
379 |
return isSetCodCancellable();
|
|
|
380 |
case PREPAID_CANCELLABLE_BEFORE_BILLED:
|
|
|
381 |
return isSetPrepaidCancellableBeforeBilled();
|
|
|
382 |
case PREPAID_CANCELLABLE_AFTER_BILLED:
|
|
|
383 |
return isSetPrepaidCancellableAfterBilled();
|
|
|
384 |
}
|
|
|
385 |
throw new IllegalStateException();
|
|
|
386 |
}
|
|
|
387 |
|
|
|
388 |
@Override
|
|
|
389 |
public boolean equals(Object that) {
|
|
|
390 |
if (that == null)
|
|
|
391 |
return false;
|
|
|
392 |
if (that instanceof OrderStatusGroups)
|
|
|
393 |
return this.equals((OrderStatusGroups)that);
|
|
|
394 |
return false;
|
|
|
395 |
}
|
|
|
396 |
|
|
|
397 |
public boolean equals(OrderStatusGroups that) {
|
|
|
398 |
if (that == null)
|
|
|
399 |
return false;
|
|
|
400 |
|
|
|
401 |
boolean this_present_codCancellable = true && this.isSetCodCancellable();
|
|
|
402 |
boolean that_present_codCancellable = true && that.isSetCodCancellable();
|
|
|
403 |
if (this_present_codCancellable || that_present_codCancellable) {
|
|
|
404 |
if (!(this_present_codCancellable && that_present_codCancellable))
|
|
|
405 |
return false;
|
|
|
406 |
if (!this.codCancellable.equals(that.codCancellable))
|
|
|
407 |
return false;
|
|
|
408 |
}
|
|
|
409 |
|
|
|
410 |
boolean this_present_prepaidCancellableBeforeBilled = true && this.isSetPrepaidCancellableBeforeBilled();
|
|
|
411 |
boolean that_present_prepaidCancellableBeforeBilled = true && that.isSetPrepaidCancellableBeforeBilled();
|
|
|
412 |
if (this_present_prepaidCancellableBeforeBilled || that_present_prepaidCancellableBeforeBilled) {
|
|
|
413 |
if (!(this_present_prepaidCancellableBeforeBilled && that_present_prepaidCancellableBeforeBilled))
|
|
|
414 |
return false;
|
|
|
415 |
if (!this.prepaidCancellableBeforeBilled.equals(that.prepaidCancellableBeforeBilled))
|
|
|
416 |
return false;
|
|
|
417 |
}
|
|
|
418 |
|
|
|
419 |
boolean this_present_prepaidCancellableAfterBilled = true && this.isSetPrepaidCancellableAfterBilled();
|
|
|
420 |
boolean that_present_prepaidCancellableAfterBilled = true && that.isSetPrepaidCancellableAfterBilled();
|
|
|
421 |
if (this_present_prepaidCancellableAfterBilled || that_present_prepaidCancellableAfterBilled) {
|
|
|
422 |
if (!(this_present_prepaidCancellableAfterBilled && that_present_prepaidCancellableAfterBilled))
|
|
|
423 |
return false;
|
|
|
424 |
if (!this.prepaidCancellableAfterBilled.equals(that.prepaidCancellableAfterBilled))
|
|
|
425 |
return false;
|
|
|
426 |
}
|
|
|
427 |
|
|
|
428 |
return true;
|
|
|
429 |
}
|
|
|
430 |
|
|
|
431 |
@Override
|
|
|
432 |
public int hashCode() {
|
|
|
433 |
return 0;
|
|
|
434 |
}
|
|
|
435 |
|
|
|
436 |
public int compareTo(OrderStatusGroups other) {
|
|
|
437 |
if (!getClass().equals(other.getClass())) {
|
|
|
438 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
439 |
}
|
|
|
440 |
|
|
|
441 |
int lastComparison = 0;
|
|
|
442 |
OrderStatusGroups typedOther = (OrderStatusGroups)other;
|
|
|
443 |
|
|
|
444 |
lastComparison = Boolean.valueOf(isSetCodCancellable()).compareTo(typedOther.isSetCodCancellable());
|
|
|
445 |
if (lastComparison != 0) {
|
|
|
446 |
return lastComparison;
|
|
|
447 |
}
|
|
|
448 |
if (isSetCodCancellable()) {
|
|
|
449 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codCancellable, typedOther.codCancellable);
|
|
|
450 |
if (lastComparison != 0) {
|
|
|
451 |
return lastComparison;
|
|
|
452 |
}
|
|
|
453 |
}
|
|
|
454 |
lastComparison = Boolean.valueOf(isSetPrepaidCancellableBeforeBilled()).compareTo(typedOther.isSetPrepaidCancellableBeforeBilled());
|
|
|
455 |
if (lastComparison != 0) {
|
|
|
456 |
return lastComparison;
|
|
|
457 |
}
|
|
|
458 |
if (isSetPrepaidCancellableBeforeBilled()) {
|
|
|
459 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableBeforeBilled, typedOther.prepaidCancellableBeforeBilled);
|
|
|
460 |
if (lastComparison != 0) {
|
|
|
461 |
return lastComparison;
|
|
|
462 |
}
|
|
|
463 |
}
|
|
|
464 |
lastComparison = Boolean.valueOf(isSetPrepaidCancellableAfterBilled()).compareTo(typedOther.isSetPrepaidCancellableAfterBilled());
|
|
|
465 |
if (lastComparison != 0) {
|
|
|
466 |
return lastComparison;
|
|
|
467 |
}
|
|
|
468 |
if (isSetPrepaidCancellableAfterBilled()) {
|
|
|
469 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidCancellableAfterBilled, typedOther.prepaidCancellableAfterBilled);
|
|
|
470 |
if (lastComparison != 0) {
|
|
|
471 |
return lastComparison;
|
|
|
472 |
}
|
|
|
473 |
}
|
|
|
474 |
return 0;
|
|
|
475 |
}
|
|
|
476 |
|
|
|
477 |
public _Fields fieldForId(int fieldId) {
|
|
|
478 |
return _Fields.findByThriftId(fieldId);
|
|
|
479 |
}
|
|
|
480 |
|
|
|
481 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
482 |
org.apache.thrift.protocol.TField field;
|
|
|
483 |
iprot.readStructBegin();
|
|
|
484 |
while (true)
|
|
|
485 |
{
|
|
|
486 |
field = iprot.readFieldBegin();
|
|
|
487 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
488 |
break;
|
|
|
489 |
}
|
|
|
490 |
switch (field.id) {
|
|
|
491 |
case 1: // COD_CANCELLABLE
|
|
|
492 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
493 |
{
|
|
|
494 |
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
|
|
|
495 |
this.codCancellable = new ArrayList<OrderStatus>(_list8.size);
|
|
|
496 |
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
|
|
497 |
{
|
|
|
498 |
OrderStatus _elem10; // required
|
|
|
499 |
_elem10 = OrderStatus.findByValue(iprot.readI32());
|
|
|
500 |
this.codCancellable.add(_elem10);
|
|
|
501 |
}
|
|
|
502 |
iprot.readListEnd();
|
|
|
503 |
}
|
|
|
504 |
} else {
|
|
|
505 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
506 |
}
|
|
|
507 |
break;
|
|
|
508 |
case 2: // PREPAID_CANCELLABLE_BEFORE_BILLED
|
|
|
509 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
510 |
{
|
|
|
511 |
org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
|
|
|
512 |
this.prepaidCancellableBeforeBilled = new ArrayList<OrderStatus>(_list11.size);
|
|
|
513 |
for (int _i12 = 0; _i12 < _list11.size; ++_i12)
|
|
|
514 |
{
|
|
|
515 |
OrderStatus _elem13; // required
|
|
|
516 |
_elem13 = OrderStatus.findByValue(iprot.readI32());
|
|
|
517 |
this.prepaidCancellableBeforeBilled.add(_elem13);
|
|
|
518 |
}
|
|
|
519 |
iprot.readListEnd();
|
|
|
520 |
}
|
|
|
521 |
} else {
|
|
|
522 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
523 |
}
|
|
|
524 |
break;
|
|
|
525 |
case 3: // PREPAID_CANCELLABLE_AFTER_BILLED
|
|
|
526 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
527 |
{
|
|
|
528 |
org.apache.thrift.protocol.TList _list14 = iprot.readListBegin();
|
|
|
529 |
this.prepaidCancellableAfterBilled = new ArrayList<OrderStatus>(_list14.size);
|
|
|
530 |
for (int _i15 = 0; _i15 < _list14.size; ++_i15)
|
|
|
531 |
{
|
|
|
532 |
OrderStatus _elem16; // required
|
|
|
533 |
_elem16 = OrderStatus.findByValue(iprot.readI32());
|
|
|
534 |
this.prepaidCancellableAfterBilled.add(_elem16);
|
|
|
535 |
}
|
|
|
536 |
iprot.readListEnd();
|
|
|
537 |
}
|
|
|
538 |
} else {
|
|
|
539 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
540 |
}
|
|
|
541 |
break;
|
|
|
542 |
default:
|
|
|
543 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
544 |
}
|
|
|
545 |
iprot.readFieldEnd();
|
|
|
546 |
}
|
|
|
547 |
iprot.readStructEnd();
|
|
|
548 |
validate();
|
|
|
549 |
}
|
|
|
550 |
|
|
|
551 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
552 |
validate();
|
|
|
553 |
|
|
|
554 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
555 |
if (this.codCancellable != null) {
|
|
|
556 |
oprot.writeFieldBegin(COD_CANCELLABLE_FIELD_DESC);
|
|
|
557 |
{
|
|
|
558 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.codCancellable.size()));
|
|
|
559 |
for (OrderStatus _iter17 : this.codCancellable)
|
|
|
560 |
{
|
|
|
561 |
oprot.writeI32(_iter17.getValue());
|
|
|
562 |
}
|
|
|
563 |
oprot.writeListEnd();
|
|
|
564 |
}
|
|
|
565 |
oprot.writeFieldEnd();
|
|
|
566 |
}
|
|
|
567 |
if (this.prepaidCancellableBeforeBilled != null) {
|
|
|
568 |
oprot.writeFieldBegin(PREPAID_CANCELLABLE_BEFORE_BILLED_FIELD_DESC);
|
|
|
569 |
{
|
|
|
570 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableBeforeBilled.size()));
|
|
|
571 |
for (OrderStatus _iter18 : this.prepaidCancellableBeforeBilled)
|
|
|
572 |
{
|
|
|
573 |
oprot.writeI32(_iter18.getValue());
|
|
|
574 |
}
|
|
|
575 |
oprot.writeListEnd();
|
|
|
576 |
}
|
|
|
577 |
oprot.writeFieldEnd();
|
|
|
578 |
}
|
|
|
579 |
if (this.prepaidCancellableAfterBilled != null) {
|
|
|
580 |
oprot.writeFieldBegin(PREPAID_CANCELLABLE_AFTER_BILLED_FIELD_DESC);
|
|
|
581 |
{
|
|
|
582 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.prepaidCancellableAfterBilled.size()));
|
|
|
583 |
for (OrderStatus _iter19 : this.prepaidCancellableAfterBilled)
|
|
|
584 |
{
|
|
|
585 |
oprot.writeI32(_iter19.getValue());
|
|
|
586 |
}
|
|
|
587 |
oprot.writeListEnd();
|
|
|
588 |
}
|
|
|
589 |
oprot.writeFieldEnd();
|
|
|
590 |
}
|
|
|
591 |
oprot.writeFieldStop();
|
|
|
592 |
oprot.writeStructEnd();
|
|
|
593 |
}
|
|
|
594 |
|
|
|
595 |
@Override
|
|
|
596 |
public String toString() {
|
|
|
597 |
StringBuilder sb = new StringBuilder("OrderStatusGroups(");
|
|
|
598 |
boolean first = true;
|
|
|
599 |
|
|
|
600 |
sb.append("codCancellable:");
|
|
|
601 |
if (this.codCancellable == null) {
|
|
|
602 |
sb.append("null");
|
|
|
603 |
} else {
|
|
|
604 |
sb.append(this.codCancellable);
|
|
|
605 |
}
|
|
|
606 |
first = false;
|
|
|
607 |
if (!first) sb.append(", ");
|
|
|
608 |
sb.append("prepaidCancellableBeforeBilled:");
|
|
|
609 |
if (this.prepaidCancellableBeforeBilled == null) {
|
|
|
610 |
sb.append("null");
|
|
|
611 |
} else {
|
|
|
612 |
sb.append(this.prepaidCancellableBeforeBilled);
|
|
|
613 |
}
|
|
|
614 |
first = false;
|
|
|
615 |
if (!first) sb.append(", ");
|
|
|
616 |
sb.append("prepaidCancellableAfterBilled:");
|
|
|
617 |
if (this.prepaidCancellableAfterBilled == null) {
|
|
|
618 |
sb.append("null");
|
|
|
619 |
} else {
|
|
|
620 |
sb.append(this.prepaidCancellableAfterBilled);
|
|
|
621 |
}
|
|
|
622 |
first = false;
|
|
|
623 |
sb.append(")");
|
|
|
624 |
return sb.toString();
|
|
|
625 |
}
|
|
|
626 |
|
|
|
627 |
public void validate() throws org.apache.thrift.TException {
|
|
|
628 |
// check for required fields
|
|
|
629 |
}
|
|
|
630 |
|
|
|
631 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
632 |
try {
|
|
|
633 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
634 |
} catch (org.apache.thrift.TException te) {
|
|
|
635 |
throw new java.io.IOException(te);
|
|
|
636 |
}
|
|
|
637 |
}
|
|
|
638 |
|
|
|
639 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
640 |
try {
|
|
|
641 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
642 |
} catch (org.apache.thrift.TException te) {
|
|
|
643 |
throw new java.io.IOException(te);
|
|
|
644 |
}
|
|
|
645 |
}
|
|
|
646 |
|
|
|
647 |
}
|
|
|
648 |
|