Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
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.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
89
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
90
     * 
91
     * @param orderId
92
     * @param jacketNumber
93
     */
94
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
95
 
923 rajveer 96
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
97
 
98
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
99
 
483 rajveer 100
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 101
 
483 rajveer 102
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 103
 
483 rajveer 104
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 105
 
483 rajveer 106
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 107
 
483 rajveer 108
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 109
 
758 chandransh 110
    /**
1221 chandransh 111
     * Create a batch of all the pending orders for the given warehouse.
112
     * The returned list is orderd by created_timestamp.
113
     * If there are no pending orders, an empty list is returned.
114
     * 
115
     * @param warehouseId
116
     */
117
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
118
 
119
    /**
1209 chandransh 120
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
121
     * 
122
     * @param orderId
123
     */
124
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
125
 
126
    /**
758 chandransh 127
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
128
     * 
129
     * @param warehouseId
130
     * @param providerId
131
     */
132
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
133
 
1114 chandransh 134
    /**
135
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
136
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
137
     * Raises an exception if we encounter report for an AWB number that we did not ship.
138
     * 
139
     * @param providerId
140
     * @param pickupDetails
141
     */
1245 chandransh 142
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 143
 
1133 chandransh 144
    /**
145
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
146
     * the name of the receiver.
147
     * Raises an exception if we encounter report for an AWB number that we did not ship.
148
     * 
149
     * @param providerId
150
     * @param deliveredOrders
151
     */
152
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
153
 
154
    /**
155
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
156
     * Raises an exception if we encounter report for an AWB number that we did not ship.
157
     * 
158
     * @param providerId
159
     * @param returnedOrders
160
     */
161
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
162
 
1245 chandransh 163
    /**
164
     * Update the status description of orders whose AWB numbers are keys of the Map.
165
     * 
166
     * @param providerId
167
     * @param undeliveredOrders
168
     */
169
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
170
 
1406 ankur.sing 171
    /**
172
     * Returns the list of orders whose delivery time has passed but have not been
173
     * delivered yet for the given provider and warehouse. To get a complete list of
174
     * undelivered orders, pass them as -1.
175
     * Returns an empty list if no such orders exist.
176
     * 
177
     * @param providerId
178
     * @param warehouseId
179
     */
180
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
181
 
483 rajveer 182
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 183
 
483 rajveer 184
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 185
 
186
  }
187
 
188
  public static class Client implements Iface {
189
    public Client(TProtocol prot)
190
    {
191
      this(prot, prot);
192
    }
193
 
194
    public Client(TProtocol iprot, TProtocol oprot)
195
    {
196
      iprot_ = iprot;
197
      oprot_ = oprot;
198
    }
199
 
200
    protected TProtocol iprot_;
201
    protected TProtocol oprot_;
202
 
203
    protected int seqid_;
204
 
205
    public TProtocol getInputProtocol()
206
    {
207
      return this.iprot_;
208
    }
209
 
210
    public TProtocol getOutputProtocol()
211
    {
212
      return this.oprot_;
213
    }
214
 
764 rajveer 215
    public void closeSession() throws TException
216
    {
217
      send_closeSession();
218
      recv_closeSession();
219
    }
220
 
221
    public void send_closeSession() throws TException
222
    {
223
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
224
      closeSession_args args = new closeSession_args();
225
      args.write(oprot_);
226
      oprot_.writeMessageEnd();
227
      oprot_.getTransport().flush();
228
    }
229
 
230
    public void recv_closeSession() throws TException
231
    {
232
      TMessage msg = iprot_.readMessageBegin();
233
      if (msg.type == TMessageType.EXCEPTION) {
234
        TApplicationException x = TApplicationException.read(iprot_);
235
        iprot_.readMessageEnd();
236
        throw x;
237
      }
238
      closeSession_result result = new closeSession_result();
239
      result.read(iprot_);
240
      iprot_.readMessageEnd();
241
      return;
242
    }
243
 
132 ashish 244
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 245
    {
246
      send_createTransaction(transaction);
132 ashish 247
      return recv_createTransaction();
68 ashish 248
    }
249
 
250
    public void send_createTransaction(Transaction transaction) throws TException
251
    {
252
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
253
      createTransaction_args args = new createTransaction_args();
254
      args.transaction = transaction;
255
      args.write(oprot_);
256
      oprot_.writeMessageEnd();
257
      oprot_.getTransport().flush();
258
    }
259
 
132 ashish 260
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 261
    {
262
      TMessage msg = iprot_.readMessageBegin();
263
      if (msg.type == TMessageType.EXCEPTION) {
264
        TApplicationException x = TApplicationException.read(iprot_);
265
        iprot_.readMessageEnd();
266
        throw x;
267
      }
268
      createTransaction_result result = new createTransaction_result();
269
      result.read(iprot_);
270
      iprot_.readMessageEnd();
132 ashish 271
      if (result.isSetSuccess()) {
272
        return result.success;
273
      }
68 ashish 274
      if (result.ex != null) {
275
        throw result.ex;
276
      }
132 ashish 277
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 278
    }
279
 
280
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
281
    {
282
      send_getTransaction(id);
283
      return recv_getTransaction();
284
    }
285
 
286
    public void send_getTransaction(long id) throws TException
287
    {
288
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
289
      getTransaction_args args = new getTransaction_args();
290
      args.id = id;
291
      args.write(oprot_);
292
      oprot_.writeMessageEnd();
293
      oprot_.getTransport().flush();
294
    }
295
 
296
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
297
    {
298
      TMessage msg = iprot_.readMessageBegin();
299
      if (msg.type == TMessageType.EXCEPTION) {
300
        TApplicationException x = TApplicationException.read(iprot_);
301
        iprot_.readMessageEnd();
302
        throw x;
303
      }
304
      getTransaction_result result = new getTransaction_result();
305
      result.read(iprot_);
306
      iprot_.readMessageEnd();
307
      if (result.isSetSuccess()) {
308
        return result.success;
309
      }
310
      if (result.ex != null) {
311
        throw result.ex;
312
      }
313
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
314
    }
315
 
132 ashish 316
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 317
    {
132 ashish 318
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 319
      return recv_getTransactionsForCustomer();
320
    }
321
 
132 ashish 322
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 323
    {
324
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
325
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
326
      args.customerId = customerId;
132 ashish 327
      args.from_date = from_date;
328
      args.to_date = to_date;
68 ashish 329
      args.status = status;
330
      args.write(oprot_);
331
      oprot_.writeMessageEnd();
332
      oprot_.getTransport().flush();
333
    }
334
 
335
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
336
    {
337
      TMessage msg = iprot_.readMessageBegin();
338
      if (msg.type == TMessageType.EXCEPTION) {
339
        TApplicationException x = TApplicationException.read(iprot_);
340
        iprot_.readMessageEnd();
341
        throw x;
342
      }
343
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
344
      result.read(iprot_);
345
      iprot_.readMessageEnd();
346
      if (result.isSetSuccess()) {
347
        return result.success;
348
      }
349
      if (result.ex != null) {
350
        throw result.ex;
351
      }
352
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
353
    }
354
 
132 ashish 355
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
356
    {
357
      send_getTransactionsForShoppingCartId(shoppingCartId);
358
      return recv_getTransactionsForShoppingCartId();
359
    }
360
 
361
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
362
    {
363
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
364
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
365
      args.shoppingCartId = shoppingCartId;
366
      args.write(oprot_);
367
      oprot_.writeMessageEnd();
368
      oprot_.getTransport().flush();
369
    }
370
 
371
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
372
    {
373
      TMessage msg = iprot_.readMessageBegin();
374
      if (msg.type == TMessageType.EXCEPTION) {
375
        TApplicationException x = TApplicationException.read(iprot_);
376
        iprot_.readMessageEnd();
377
        throw x;
378
      }
379
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
380
      result.read(iprot_);
381
      iprot_.readMessageEnd();
382
      if (result.isSetSuccess()) {
383
        return result.success;
384
      }
385
      if (result.ex != null) {
386
        throw result.ex;
387
      }
388
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
389
    }
390
 
68 ashish 391
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
392
    {
393
      send_getTransactionStatus(transactionId);
394
      return recv_getTransactionStatus();
395
    }
396
 
397
    public void send_getTransactionStatus(long transactionId) throws TException
398
    {
399
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
400
      getTransactionStatus_args args = new getTransactionStatus_args();
401
      args.transactionId = transactionId;
402
      args.write(oprot_);
403
      oprot_.writeMessageEnd();
404
      oprot_.getTransport().flush();
405
    }
406
 
407
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
408
    {
409
      TMessage msg = iprot_.readMessageBegin();
410
      if (msg.type == TMessageType.EXCEPTION) {
411
        TApplicationException x = TApplicationException.read(iprot_);
412
        iprot_.readMessageEnd();
413
        throw x;
414
      }
415
      getTransactionStatus_result result = new getTransactionStatus_result();
416
      result.read(iprot_);
417
      iprot_.readMessageEnd();
418
      if (result.isSetSuccess()) {
419
        return result.success;
420
      }
421
      if (result.ex != null) {
422
        throw result.ex;
423
      }
424
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
425
    }
426
 
427
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
428
    {
429
      send_changeTransactionStatus(transactionId, status, description);
430
      return recv_changeTransactionStatus();
431
    }
432
 
433
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
434
    {
435
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
436
      changeTransactionStatus_args args = new changeTransactionStatus_args();
437
      args.transactionId = transactionId;
438
      args.status = status;
439
      args.description = description;
440
      args.write(oprot_);
441
      oprot_.writeMessageEnd();
442
      oprot_.getTransport().flush();
443
    }
444
 
445
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
446
    {
447
      TMessage msg = iprot_.readMessageBegin();
448
      if (msg.type == TMessageType.EXCEPTION) {
449
        TApplicationException x = TApplicationException.read(iprot_);
450
        iprot_.readMessageEnd();
451
        throw x;
452
      }
453
      changeTransactionStatus_result result = new changeTransactionStatus_result();
454
      result.read(iprot_);
455
      iprot_.readMessageEnd();
456
      if (result.isSetSuccess()) {
457
        return result.success;
458
      }
459
      if (result.ex != null) {
460
        throw result.ex;
461
      }
462
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
463
    }
464
 
1398 varun.gupt 465
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 466
    {
1398 varun.gupt 467
      send_enqueueTransactionInfoEmail(transactionId);
468
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 469
    }
470
 
1398 varun.gupt 471
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 472
    {
1398 varun.gupt 473
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
474
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 475
      args.transactionId = transactionId;
476
      args.write(oprot_);
477
      oprot_.writeMessageEnd();
478
      oprot_.getTransport().flush();
479
    }
480
 
1398 varun.gupt 481
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 482
    {
483
      TMessage msg = iprot_.readMessageBegin();
484
      if (msg.type == TMessageType.EXCEPTION) {
485
        TApplicationException x = TApplicationException.read(iprot_);
486
        iprot_.readMessageEnd();
487
        throw x;
488
      }
1398 varun.gupt 489
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 490
      result.read(iprot_);
491
      iprot_.readMessageEnd();
492
      if (result.isSetSuccess()) {
493
        return result.success;
494
      }
495
      if (result.ex != null) {
496
        throw result.ex;
497
      }
1398 varun.gupt 498
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 499
    }
500
 
483 rajveer 501
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 502
    {
483 rajveer 503
      send_getAllOrders(status, from_date, to_date, warehouse_id);
504
      return recv_getAllOrders();
68 ashish 505
    }
506
 
483 rajveer 507
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 508
    {
483 rajveer 509
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
510
      getAllOrders_args args = new getAllOrders_args();
511
      args.status = status;
512
      args.from_date = from_date;
513
      args.to_date = to_date;
514
      args.warehouse_id = warehouse_id;
68 ashish 515
      args.write(oprot_);
516
      oprot_.writeMessageEnd();
517
      oprot_.getTransport().flush();
518
    }
519
 
483 rajveer 520
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 521
    {
522
      TMessage msg = iprot_.readMessageBegin();
523
      if (msg.type == TMessageType.EXCEPTION) {
524
        TApplicationException x = TApplicationException.read(iprot_);
525
        iprot_.readMessageEnd();
526
        throw x;
527
      }
483 rajveer 528
      getAllOrders_result result = new getAllOrders_result();
68 ashish 529
      result.read(iprot_);
530
      iprot_.readMessageEnd();
531
      if (result.isSetSuccess()) {
532
        return result.success;
533
      }
534
      if (result.ex != null) {
535
        throw result.ex;
536
      }
483 rajveer 537
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 538
    }
539
 
1022 varun.gupt 540
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
541
    {
542
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
543
      return recv_getOrdersByBillingDate();
544
    }
545
 
546
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
547
    {
548
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
549
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
550
      args.status = status;
551
      args.start_billing_date = start_billing_date;
552
      args.end_billing_date = end_billing_date;
553
      args.warehouse_id = warehouse_id;
554
      args.write(oprot_);
555
      oprot_.writeMessageEnd();
556
      oprot_.getTransport().flush();
557
    }
558
 
559
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
560
    {
561
      TMessage msg = iprot_.readMessageBegin();
562
      if (msg.type == TMessageType.EXCEPTION) {
563
        TApplicationException x = TApplicationException.read(iprot_);
564
        iprot_.readMessageEnd();
565
        throw x;
566
      }
567
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
568
      result.read(iprot_);
569
      iprot_.readMessageEnd();
570
      if (result.isSetSuccess()) {
571
        return result.success;
572
      }
573
      if (result.ex != null) {
574
        throw result.ex;
575
      }
576
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
577
    }
578
 
1382 varun.gupt 579
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
580
    {
581
      send_getReturnableOrdersForCustomer(customer_id, limit);
582
      return recv_getReturnableOrdersForCustomer();
583
    }
584
 
585
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
586
    {
587
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
588
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
589
      args.customer_id = customer_id;
590
      args.limit = limit;
591
      args.write(oprot_);
592
      oprot_.writeMessageEnd();
593
      oprot_.getTransport().flush();
594
    }
595
 
596
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
597
    {
598
      TMessage msg = iprot_.readMessageBegin();
599
      if (msg.type == TMessageType.EXCEPTION) {
600
        TApplicationException x = TApplicationException.read(iprot_);
601
        iprot_.readMessageEnd();
602
        throw x;
603
      }
604
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
605
      result.read(iprot_);
606
      iprot_.readMessageEnd();
607
      if (result.isSetSuccess()) {
608
        return result.success;
609
      }
610
      if (result.ex != null) {
611
        throw result.ex;
612
      }
613
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
614
    }
615
 
616
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
617
    {
618
      send_getCancellableOrdersForCustomer(customer_id, limit);
619
      return recv_getCancellableOrdersForCustomer();
620
    }
621
 
622
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
623
    {
624
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
625
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
626
      args.customer_id = customer_id;
627
      args.limit = limit;
628
      args.write(oprot_);
629
      oprot_.writeMessageEnd();
630
      oprot_.getTransport().flush();
631
    }
632
 
633
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
634
    {
635
      TMessage msg = iprot_.readMessageBegin();
636
      if (msg.type == TMessageType.EXCEPTION) {
637
        TApplicationException x = TApplicationException.read(iprot_);
638
        iprot_.readMessageEnd();
639
        throw x;
640
      }
641
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
642
      result.read(iprot_);
643
      iprot_.readMessageEnd();
644
      if (result.isSetSuccess()) {
645
        return result.success;
646
      }
647
      if (result.ex != null) {
648
        throw result.ex;
649
      }
650
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
651
    }
652
 
483 rajveer 653
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 654
    {
483 rajveer 655
      send_changeOrderStatus(orderId, status, description);
656
      return recv_changeOrderStatus();
68 ashish 657
    }
658
 
483 rajveer 659
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 660
    {
483 rajveer 661
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
662
      changeOrderStatus_args args = new changeOrderStatus_args();
663
      args.orderId = orderId;
664
      args.status = status;
665
      args.description = description;
68 ashish 666
      args.write(oprot_);
667
      oprot_.writeMessageEnd();
668
      oprot_.getTransport().flush();
669
    }
670
 
483 rajveer 671
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 672
    {
673
      TMessage msg = iprot_.readMessageBegin();
674
      if (msg.type == TMessageType.EXCEPTION) {
675
        TApplicationException x = TApplicationException.read(iprot_);
676
        iprot_.readMessageEnd();
677
        throw x;
678
      }
483 rajveer 679
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 680
      result.read(iprot_);
681
      iprot_.readMessageEnd();
682
      if (result.isSetSuccess()) {
683
        return result.success;
684
      }
685
      if (result.ex != null) {
686
        throw result.ex;
687
      }
483 rajveer 688
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 689
    }
690
 
1148 chandransh 691
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 692
    {
1148 chandransh 693
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 694
      return recv_addBillingDetails();
695
    }
696
 
1148 chandransh 697
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 698
    {
699
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
700
      addBillingDetails_args args = new addBillingDetails_args();
701
      args.orderId = orderId;
702
      args.invoice_number = invoice_number;
703
      args.billed_by = billed_by;
704
      args.write(oprot_);
705
      oprot_.writeMessageEnd();
706
      oprot_.getTransport().flush();
707
    }
708
 
709
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
710
    {
711
      TMessage msg = iprot_.readMessageBegin();
712
      if (msg.type == TMessageType.EXCEPTION) {
713
        TApplicationException x = TApplicationException.read(iprot_);
714
        iprot_.readMessageEnd();
715
        throw x;
716
      }
717
      addBillingDetails_result result = new addBillingDetails_result();
718
      result.read(iprot_);
719
      iprot_.readMessageEnd();
720
      if (result.isSetSuccess()) {
721
        return result.success;
722
      }
723
      if (result.ex != null) {
724
        throw result.ex;
725
      }
726
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
727
    }
728
 
1148 chandransh 729
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
730
    {
731
      send_addJacketNumber(orderId, jacketNumber);
732
      return recv_addJacketNumber();
733
    }
734
 
735
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
736
    {
737
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
738
      addJacketNumber_args args = new addJacketNumber_args();
739
      args.orderId = orderId;
740
      args.jacketNumber = jacketNumber;
741
      args.write(oprot_);
742
      oprot_.writeMessageEnd();
743
      oprot_.getTransport().flush();
744
    }
745
 
746
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
747
    {
748
      TMessage msg = iprot_.readMessageBegin();
749
      if (msg.type == TMessageType.EXCEPTION) {
750
        TApplicationException x = TApplicationException.read(iprot_);
751
        iprot_.readMessageEnd();
752
        throw x;
753
      }
754
      addJacketNumber_result result = new addJacketNumber_result();
755
      result.read(iprot_);
756
      iprot_.readMessageEnd();
757
      if (result.isSetSuccess()) {
758
        return result.success;
759
      }
760
      if (result.ex != null) {
761
        throw result.ex;
762
      }
763
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
764
    }
765
 
923 rajveer 766
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
767
    {
768
      send_acceptOrder(orderId);
769
      return recv_acceptOrder();
770
    }
771
 
772
    public void send_acceptOrder(long orderId) throws TException
773
    {
774
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
775
      acceptOrder_args args = new acceptOrder_args();
776
      args.orderId = orderId;
777
      args.write(oprot_);
778
      oprot_.writeMessageEnd();
779
      oprot_.getTransport().flush();
780
    }
781
 
782
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
783
    {
784
      TMessage msg = iprot_.readMessageBegin();
785
      if (msg.type == TMessageType.EXCEPTION) {
786
        TApplicationException x = TApplicationException.read(iprot_);
787
        iprot_.readMessageEnd();
788
        throw x;
789
      }
790
      acceptOrder_result result = new acceptOrder_result();
791
      result.read(iprot_);
792
      iprot_.readMessageEnd();
793
      if (result.isSetSuccess()) {
794
        return result.success;
795
      }
796
      if (result.ex != null) {
797
        throw result.ex;
798
      }
799
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
800
    }
801
 
802
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
803
    {
804
      send_billOrder(orderId);
805
      return recv_billOrder();
806
    }
807
 
808
    public void send_billOrder(long orderId) throws TException
809
    {
810
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
811
      billOrder_args args = new billOrder_args();
812
      args.orderId = orderId;
813
      args.write(oprot_);
814
      oprot_.writeMessageEnd();
815
      oprot_.getTransport().flush();
816
    }
817
 
818
    public boolean recv_billOrder() throws TransactionServiceException, TException
819
    {
820
      TMessage msg = iprot_.readMessageBegin();
821
      if (msg.type == TMessageType.EXCEPTION) {
822
        TApplicationException x = TApplicationException.read(iprot_);
823
        iprot_.readMessageEnd();
824
        throw x;
825
      }
826
      billOrder_result result = new billOrder_result();
827
      result.read(iprot_);
828
      iprot_.readMessageEnd();
829
      if (result.isSetSuccess()) {
830
        return result.success;
831
      }
832
      if (result.ex != null) {
833
        throw result.ex;
834
      }
835
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
836
    }
837
 
483 rajveer 838
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 839
    {
483 rajveer 840
      send_getOrdersForTransaction(transactionId);
841
      return recv_getOrdersForTransaction();
68 ashish 842
    }
843
 
483 rajveer 844
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 845
    {
483 rajveer 846
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
847
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 848
      args.transactionId = transactionId;
849
      args.write(oprot_);
850
      oprot_.writeMessageEnd();
851
      oprot_.getTransport().flush();
852
    }
853
 
483 rajveer 854
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 855
    {
856
      TMessage msg = iprot_.readMessageBegin();
857
      if (msg.type == TMessageType.EXCEPTION) {
858
        TApplicationException x = TApplicationException.read(iprot_);
859
        iprot_.readMessageEnd();
860
        throw x;
861
      }
483 rajveer 862
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 863
      result.read(iprot_);
864
      iprot_.readMessageEnd();
865
      if (result.isSetSuccess()) {
866
        return result.success;
867
      }
868
      if (result.ex != null) {
869
        throw result.ex;
870
      }
483 rajveer 871
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 872
    }
873
 
483 rajveer 874
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 875
    {
483 rajveer 876
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
877
      return recv_getOrdersForCustomer();
68 ashish 878
    }
879
 
483 rajveer 880
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 881
    {
483 rajveer 882
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
883
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
884
      args.customerId = customerId;
885
      args.from_date = from_date;
886
      args.to_date = to_date;
887
      args.status = status;
68 ashish 888
      args.write(oprot_);
889
      oprot_.writeMessageEnd();
890
      oprot_.getTransport().flush();
891
    }
892
 
483 rajveer 893
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 894
    {
895
      TMessage msg = iprot_.readMessageBegin();
896
      if (msg.type == TMessageType.EXCEPTION) {
897
        TApplicationException x = TApplicationException.read(iprot_);
898
        iprot_.readMessageEnd();
899
        throw x;
900
      }
483 rajveer 901
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 902
      result.read(iprot_);
903
      iprot_.readMessageEnd();
904
      if (result.isSetSuccess()) {
905
        return result.success;
906
      }
907
      if (result.ex != null) {
908
        throw result.ex;
909
      }
483 rajveer 910
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 911
    }
912
 
483 rajveer 913
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 914
    {
483 rajveer 915
      send_createOrder(order);
916
      return recv_createOrder();
68 ashish 917
    }
918
 
483 rajveer 919
    public void send_createOrder(Order order) throws TException
68 ashish 920
    {
483 rajveer 921
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
922
      createOrder_args args = new createOrder_args();
923
      args.order = order;
68 ashish 924
      args.write(oprot_);
925
      oprot_.writeMessageEnd();
926
      oprot_.getTransport().flush();
927
    }
928
 
483 rajveer 929
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 930
    {
931
      TMessage msg = iprot_.readMessageBegin();
932
      if (msg.type == TMessageType.EXCEPTION) {
933
        TApplicationException x = TApplicationException.read(iprot_);
934
        iprot_.readMessageEnd();
935
        throw x;
936
      }
483 rajveer 937
      createOrder_result result = new createOrder_result();
68 ashish 938
      result.read(iprot_);
939
      iprot_.readMessageEnd();
940
      if (result.isSetSuccess()) {
941
        return result.success;
942
      }
943
      if (result.ex != null) {
944
        throw result.ex;
945
      }
483 rajveer 946
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 947
    }
948
 
483 rajveer 949
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 950
    {
483 rajveer 951
      send_getOrder(id);
952
      return recv_getOrder();
68 ashish 953
    }
954
 
483 rajveer 955
    public void send_getOrder(long id) throws TException
68 ashish 956
    {
483 rajveer 957
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
958
      getOrder_args args = new getOrder_args();
959
      args.id = id;
68 ashish 960
      args.write(oprot_);
961
      oprot_.writeMessageEnd();
962
      oprot_.getTransport().flush();
963
    }
964
 
483 rajveer 965
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 966
    {
967
      TMessage msg = iprot_.readMessageBegin();
968
      if (msg.type == TMessageType.EXCEPTION) {
969
        TApplicationException x = TApplicationException.read(iprot_);
970
        iprot_.readMessageEnd();
971
        throw x;
972
      }
483 rajveer 973
      getOrder_result result = new getOrder_result();
68 ashish 974
      result.read(iprot_);
975
      iprot_.readMessageEnd();
976
      if (result.isSetSuccess()) {
977
        return result.success;
978
      }
979
      if (result.ex != null) {
980
        throw result.ex;
981
      }
483 rajveer 982
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 983
    }
984
 
483 rajveer 985
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 986
    {
483 rajveer 987
      send_getLineItemsForOrder(orderId);
988
      return recv_getLineItemsForOrder();
68 ashish 989
    }
990
 
483 rajveer 991
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 992
    {
483 rajveer 993
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
994
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
995
      args.orderId = orderId;
68 ashish 996
      args.write(oprot_);
997
      oprot_.writeMessageEnd();
998
      oprot_.getTransport().flush();
999
    }
1000
 
483 rajveer 1001
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1002
    {
1003
      TMessage msg = iprot_.readMessageBegin();
1004
      if (msg.type == TMessageType.EXCEPTION) {
1005
        TApplicationException x = TApplicationException.read(iprot_);
1006
        iprot_.readMessageEnd();
1007
        throw x;
1008
      }
483 rajveer 1009
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1010
      result.read(iprot_);
1011
      iprot_.readMessageEnd();
1012
      if (result.isSetSuccess()) {
1013
        return result.success;
1014
      }
1015
      if (result.ex != null) {
1016
        throw result.ex;
1017
      }
483 rajveer 1018
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1019
    }
1020
 
1221 chandransh 1021
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1022
    {
1023
      send_batchOrders(warehouseId);
1024
      return recv_batchOrders();
1025
    }
1026
 
1027
    public void send_batchOrders(long warehouseId) throws TException
1028
    {
1029
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1030
      batchOrders_args args = new batchOrders_args();
1031
      args.warehouseId = warehouseId;
1032
      args.write(oprot_);
1033
      oprot_.writeMessageEnd();
1034
      oprot_.getTransport().flush();
1035
    }
1036
 
1037
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1038
    {
1039
      TMessage msg = iprot_.readMessageBegin();
1040
      if (msg.type == TMessageType.EXCEPTION) {
1041
        TApplicationException x = TApplicationException.read(iprot_);
1042
        iprot_.readMessageEnd();
1043
        throw x;
1044
      }
1045
      batchOrders_result result = new batchOrders_result();
1046
      result.read(iprot_);
1047
      iprot_.readMessageEnd();
1048
      if (result.isSetSuccess()) {
1049
        return result.success;
1050
      }
1051
      if (result.ex != null) {
1052
        throw result.ex;
1053
      }
1054
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1055
    }
1056
 
1209 chandransh 1057
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1058
    {
1059
      send_markOrderAsOutOfStock(orderId);
1060
      return recv_markOrderAsOutOfStock();
1061
    }
1062
 
1063
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1064
    {
1065
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1066
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1067
      args.orderId = orderId;
1068
      args.write(oprot_);
1069
      oprot_.writeMessageEnd();
1070
      oprot_.getTransport().flush();
1071
    }
1072
 
1073
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1074
    {
1075
      TMessage msg = iprot_.readMessageBegin();
1076
      if (msg.type == TMessageType.EXCEPTION) {
1077
        TApplicationException x = TApplicationException.read(iprot_);
1078
        iprot_.readMessageEnd();
1079
        throw x;
1080
      }
1081
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1082
      result.read(iprot_);
1083
      iprot_.readMessageEnd();
1084
      if (result.isSetSuccess()) {
1085
        return result.success;
1086
      }
1087
      if (result.ex != null) {
1088
        throw result.ex;
1089
      }
1090
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1091
    }
1092
 
758 chandransh 1093
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1094
    {
1095
      send_markOrdersAsManifested(warehouseId, providerId);
1096
      return recv_markOrdersAsManifested();
1097
    }
1098
 
1099
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1100
    {
1101
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1102
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1103
      args.warehouseId = warehouseId;
1104
      args.providerId = providerId;
1105
      args.write(oprot_);
1106
      oprot_.writeMessageEnd();
1107
      oprot_.getTransport().flush();
1108
    }
1109
 
1110
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1111
    {
1112
      TMessage msg = iprot_.readMessageBegin();
1113
      if (msg.type == TMessageType.EXCEPTION) {
1114
        TApplicationException x = TApplicationException.read(iprot_);
1115
        iprot_.readMessageEnd();
1116
        throw x;
1117
      }
1118
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1119
      result.read(iprot_);
1120
      iprot_.readMessageEnd();
1121
      if (result.isSetSuccess()) {
1122
        return result.success;
1123
      }
1124
      if (result.ex != null) {
1125
        throw result.ex;
1126
      }
1127
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1128
    }
1129
 
1245 chandransh 1130
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1131
    {
1132
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1133
      return recv_markOrdersAsPickedUp();
1134
    }
1135
 
1245 chandransh 1136
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1137
    {
1138
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1139
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1140
      args.providerId = providerId;
1141
      args.pickupDetails = pickupDetails;
1142
      args.write(oprot_);
1143
      oprot_.writeMessageEnd();
1144
      oprot_.getTransport().flush();
1145
    }
1146
 
1147
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1148
    {
1149
      TMessage msg = iprot_.readMessageBegin();
1150
      if (msg.type == TMessageType.EXCEPTION) {
1151
        TApplicationException x = TApplicationException.read(iprot_);
1152
        iprot_.readMessageEnd();
1153
        throw x;
1154
      }
1155
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1156
      result.read(iprot_);
1157
      iprot_.readMessageEnd();
1158
      if (result.isSetSuccess()) {
1159
        return result.success;
1160
      }
1161
      if (result.ex != null) {
1162
        throw result.ex;
1163
      }
1164
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1165
    }
1166
 
1133 chandransh 1167
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1168
    {
1169
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1170
      recv_markOrdersAsDelivered();
1171
    }
1172
 
1173
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1174
    {
1175
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1176
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1177
      args.providerId = providerId;
1178
      args.deliveredOrders = deliveredOrders;
1179
      args.write(oprot_);
1180
      oprot_.writeMessageEnd();
1181
      oprot_.getTransport().flush();
1182
    }
1183
 
1184
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1185
    {
1186
      TMessage msg = iprot_.readMessageBegin();
1187
      if (msg.type == TMessageType.EXCEPTION) {
1188
        TApplicationException x = TApplicationException.read(iprot_);
1189
        iprot_.readMessageEnd();
1190
        throw x;
1191
      }
1192
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1193
      result.read(iprot_);
1194
      iprot_.readMessageEnd();
1195
      if (result.ex != null) {
1196
        throw result.ex;
1197
      }
1198
      return;
1199
    }
1200
 
1201
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1202
    {
1203
      send_markOrdersAsFailed(providerId, returnedOrders);
1204
      recv_markOrdersAsFailed();
1205
    }
1206
 
1207
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1208
    {
1209
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1210
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1211
      args.providerId = providerId;
1212
      args.returnedOrders = returnedOrders;
1213
      args.write(oprot_);
1214
      oprot_.writeMessageEnd();
1215
      oprot_.getTransport().flush();
1216
    }
1217
 
1218
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1219
    {
1220
      TMessage msg = iprot_.readMessageBegin();
1221
      if (msg.type == TMessageType.EXCEPTION) {
1222
        TApplicationException x = TApplicationException.read(iprot_);
1223
        iprot_.readMessageEnd();
1224
        throw x;
1225
      }
1226
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1227
      result.read(iprot_);
1228
      iprot_.readMessageEnd();
1229
      if (result.ex != null) {
1230
        throw result.ex;
1231
      }
1232
      return;
1233
    }
1234
 
1245 chandransh 1235
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1236
    {
1237
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1238
      recv_updateNonDeliveryReason();
1239
    }
1240
 
1241
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1242
    {
1243
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1244
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1245
      args.providerId = providerId;
1246
      args.undeliveredOrders = undeliveredOrders;
1247
      args.write(oprot_);
1248
      oprot_.writeMessageEnd();
1249
      oprot_.getTransport().flush();
1250
    }
1251
 
1252
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1253
    {
1254
      TMessage msg = iprot_.readMessageBegin();
1255
      if (msg.type == TMessageType.EXCEPTION) {
1256
        TApplicationException x = TApplicationException.read(iprot_);
1257
        iprot_.readMessageEnd();
1258
        throw x;
1259
      }
1260
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1261
      result.read(iprot_);
1262
      iprot_.readMessageEnd();
1263
      if (result.ex != null) {
1264
        throw result.ex;
1265
      }
1266
      return;
1267
    }
1268
 
1406 ankur.sing 1269
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1270
    {
1271
      send_getUndeliveredOrders(providerId, warehouseId);
1272
      return recv_getUndeliveredOrders();
1273
    }
1274
 
1275
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1276
    {
1277
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1278
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1279
      args.providerId = providerId;
1280
      args.warehouseId = warehouseId;
1281
      args.write(oprot_);
1282
      oprot_.writeMessageEnd();
1283
      oprot_.getTransport().flush();
1284
    }
1285
 
1286
    public List<Order> recv_getUndeliveredOrders() throws TException
1287
    {
1288
      TMessage msg = iprot_.readMessageBegin();
1289
      if (msg.type == TMessageType.EXCEPTION) {
1290
        TApplicationException x = TApplicationException.read(iprot_);
1291
        iprot_.readMessageEnd();
1292
        throw x;
1293
      }
1294
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1295
      result.read(iprot_);
1296
      iprot_.readMessageEnd();
1297
      if (result.isSetSuccess()) {
1298
        return result.success;
1299
      }
1300
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1301
    }
1302
 
483 rajveer 1303
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1304
    {
483 rajveer 1305
      send_getAlerts(orderId, valid);
305 ashish 1306
      return recv_getAlerts();
1307
    }
1308
 
483 rajveer 1309
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1310
    {
1311
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1312
      getAlerts_args args = new getAlerts_args();
483 rajveer 1313
      args.orderId = orderId;
305 ashish 1314
      args.valid = valid;
1315
      args.write(oprot_);
1316
      oprot_.writeMessageEnd();
1317
      oprot_.getTransport().flush();
1318
    }
1319
 
1320
    public List<Alert> recv_getAlerts() throws TException
1321
    {
1322
      TMessage msg = iprot_.readMessageBegin();
1323
      if (msg.type == TMessageType.EXCEPTION) {
1324
        TApplicationException x = TApplicationException.read(iprot_);
1325
        iprot_.readMessageEnd();
1326
        throw x;
1327
      }
1328
      getAlerts_result result = new getAlerts_result();
1329
      result.read(iprot_);
1330
      iprot_.readMessageEnd();
1331
      if (result.isSetSuccess()) {
1332
        return result.success;
1333
      }
1334
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1335
    }
1336
 
483 rajveer 1337
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1338
    {
483 rajveer 1339
      send_setAlert(orderId, unset, type, comment);
305 ashish 1340
      recv_setAlert();
1341
    }
1342
 
483 rajveer 1343
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1344
    {
1345
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1346
      setAlert_args args = new setAlert_args();
483 rajveer 1347
      args.orderId = orderId;
305 ashish 1348
      args.unset = unset;
1349
      args.type = type;
1350
      args.comment = comment;
1351
      args.write(oprot_);
1352
      oprot_.writeMessageEnd();
1353
      oprot_.getTransport().flush();
1354
    }
1355
 
1356
    public void recv_setAlert() throws TException
1357
    {
1358
      TMessage msg = iprot_.readMessageBegin();
1359
      if (msg.type == TMessageType.EXCEPTION) {
1360
        TApplicationException x = TApplicationException.read(iprot_);
1361
        iprot_.readMessageEnd();
1362
        throw x;
1363
      }
1364
      setAlert_result result = new setAlert_result();
1365
      result.read(iprot_);
1366
      iprot_.readMessageEnd();
1367
      return;
1368
    }
1369
 
68 ashish 1370
  }
1371
  public static class Processor implements TProcessor {
1372
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1373
    public Processor(Iface iface)
1374
    {
1375
      iface_ = iface;
764 rajveer 1376
      processMap_.put("closeSession", new closeSession());
68 ashish 1377
      processMap_.put("createTransaction", new createTransaction());
1378
      processMap_.put("getTransaction", new getTransaction());
1379
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1380
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1381
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1382
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1383
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1384
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1385
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1386
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1387
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1388
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1389
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1390
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1391
      processMap_.put("acceptOrder", new acceptOrder());
1392
      processMap_.put("billOrder", new billOrder());
483 rajveer 1393
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1394
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1395
      processMap_.put("createOrder", new createOrder());
1396
      processMap_.put("getOrder", new getOrder());
1397
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1221 chandransh 1398
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1399
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1400
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1401
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1402
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1403
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1404
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1405
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1406
      processMap_.put("getAlerts", new getAlerts());
1407
      processMap_.put("setAlert", new setAlert());
68 ashish 1408
    }
1409
 
1410
    protected static interface ProcessFunction {
1411
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1412
    }
1413
 
1414
    private Iface iface_;
1415
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1416
 
1417
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1418
    {
1419
      TMessage msg = iprot.readMessageBegin();
1420
      ProcessFunction fn = processMap_.get(msg.name);
1421
      if (fn == null) {
1422
        TProtocolUtil.skip(iprot, TType.STRUCT);
1423
        iprot.readMessageEnd();
1424
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1425
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1426
        x.write(oprot);
1427
        oprot.writeMessageEnd();
1428
        oprot.getTransport().flush();
1429
        return true;
1430
      }
1431
      fn.process(msg.seqid, iprot, oprot);
1432
      return true;
1433
    }
1434
 
764 rajveer 1435
    private class closeSession implements ProcessFunction {
1436
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1437
      {
1438
        closeSession_args args = new closeSession_args();
1439
        args.read(iprot);
1440
        iprot.readMessageEnd();
1441
        closeSession_result result = new closeSession_result();
1442
        iface_.closeSession();
1443
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1444
        result.write(oprot);
1445
        oprot.writeMessageEnd();
1446
        oprot.getTransport().flush();
1447
      }
1448
 
1449
    }
1450
 
68 ashish 1451
    private class createTransaction implements ProcessFunction {
1452
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1453
      {
1454
        createTransaction_args args = new createTransaction_args();
1455
        args.read(iprot);
1456
        iprot.readMessageEnd();
1457
        createTransaction_result result = new createTransaction_result();
1458
        try {
132 ashish 1459
          result.success = iface_.createTransaction(args.transaction);
1460
          result.setSuccessIsSet(true);
68 ashish 1461
        } catch (TransactionServiceException ex) {
1462
          result.ex = ex;
1463
        } catch (Throwable th) {
1464
          LOGGER.error("Internal error processing createTransaction", th);
1465
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1466
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1467
          x.write(oprot);
1468
          oprot.writeMessageEnd();
1469
          oprot.getTransport().flush();
1470
          return;
1471
        }
1472
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1473
        result.write(oprot);
1474
        oprot.writeMessageEnd();
1475
        oprot.getTransport().flush();
1476
      }
1477
 
1478
    }
1479
 
1480
    private class getTransaction implements ProcessFunction {
1481
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1482
      {
1483
        getTransaction_args args = new getTransaction_args();
1484
        args.read(iprot);
1485
        iprot.readMessageEnd();
1486
        getTransaction_result result = new getTransaction_result();
1487
        try {
1488
          result.success = iface_.getTransaction(args.id);
1489
        } catch (TransactionServiceException ex) {
1490
          result.ex = ex;
1491
        } catch (Throwable th) {
1492
          LOGGER.error("Internal error processing getTransaction", th);
1493
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1494
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1495
          x.write(oprot);
1496
          oprot.writeMessageEnd();
1497
          oprot.getTransport().flush();
1498
          return;
1499
        }
1500
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1501
        result.write(oprot);
1502
        oprot.writeMessageEnd();
1503
        oprot.getTransport().flush();
1504
      }
1505
 
1506
    }
1507
 
1508
    private class getTransactionsForCustomer implements ProcessFunction {
1509
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1510
      {
1511
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1512
        args.read(iprot);
1513
        iprot.readMessageEnd();
1514
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1515
        try {
132 ashish 1516
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1517
        } catch (TransactionServiceException ex) {
1518
          result.ex = ex;
1519
        } catch (Throwable th) {
1520
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1521
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1522
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1523
          x.write(oprot);
1524
          oprot.writeMessageEnd();
1525
          oprot.getTransport().flush();
1526
          return;
1527
        }
1528
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1529
        result.write(oprot);
1530
        oprot.writeMessageEnd();
1531
        oprot.getTransport().flush();
1532
      }
1533
 
1534
    }
1535
 
132 ashish 1536
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1537
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1538
      {
1539
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1540
        args.read(iprot);
1541
        iprot.readMessageEnd();
1542
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1543
        try {
1544
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1545
        } catch (TransactionServiceException ex) {
1546
          result.ex = ex;
1547
        } catch (Throwable th) {
1548
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1549
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1550
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1551
          x.write(oprot);
1552
          oprot.writeMessageEnd();
1553
          oprot.getTransport().flush();
1554
          return;
1555
        }
1556
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1557
        result.write(oprot);
1558
        oprot.writeMessageEnd();
1559
        oprot.getTransport().flush();
1560
      }
1561
 
1562
    }
1563
 
68 ashish 1564
    private class getTransactionStatus implements ProcessFunction {
1565
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1566
      {
1567
        getTransactionStatus_args args = new getTransactionStatus_args();
1568
        args.read(iprot);
1569
        iprot.readMessageEnd();
1570
        getTransactionStatus_result result = new getTransactionStatus_result();
1571
        try {
1572
          result.success = iface_.getTransactionStatus(args.transactionId);
1573
        } catch (TransactionServiceException ex) {
1574
          result.ex = ex;
1575
        } catch (Throwable th) {
1576
          LOGGER.error("Internal error processing getTransactionStatus", th);
1577
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1578
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1579
          x.write(oprot);
1580
          oprot.writeMessageEnd();
1581
          oprot.getTransport().flush();
1582
          return;
1583
        }
1584
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1585
        result.write(oprot);
1586
        oprot.writeMessageEnd();
1587
        oprot.getTransport().flush();
1588
      }
1589
 
1590
    }
1591
 
1592
    private class changeTransactionStatus implements ProcessFunction {
1593
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1594
      {
1595
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1596
        args.read(iprot);
1597
        iprot.readMessageEnd();
1598
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1599
        try {
1600
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1601
          result.setSuccessIsSet(true);
1602
        } catch (TransactionServiceException ex) {
1603
          result.ex = ex;
1604
        } catch (Throwable th) {
1605
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1606
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1607
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1608
          x.write(oprot);
1609
          oprot.writeMessageEnd();
1610
          oprot.getTransport().flush();
1611
          return;
1612
        }
1613
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1614
        result.write(oprot);
1615
        oprot.writeMessageEnd();
1616
        oprot.getTransport().flush();
1617
      }
1618
 
1619
    }
1620
 
1398 varun.gupt 1621
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1622
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1623
      {
1398 varun.gupt 1624
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1625
        args.read(iprot);
1626
        iprot.readMessageEnd();
1398 varun.gupt 1627
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1628
        try {
1398 varun.gupt 1629
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1630
          result.setSuccessIsSet(true);
1631
        } catch (TransactionServiceException ex) {
1632
          result.ex = ex;
1633
        } catch (Throwable th) {
1398 varun.gupt 1634
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1635
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1636
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1637
          x.write(oprot);
1638
          oprot.writeMessageEnd();
1639
          oprot.getTransport().flush();
1640
          return;
1641
        }
1398 varun.gupt 1642
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1643
        result.write(oprot);
1644
        oprot.writeMessageEnd();
1645
        oprot.getTransport().flush();
1646
      }
1647
 
1648
    }
1649
 
483 rajveer 1650
    private class getAllOrders implements ProcessFunction {
68 ashish 1651
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1652
      {
483 rajveer 1653
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1654
        args.read(iprot);
1655
        iprot.readMessageEnd();
483 rajveer 1656
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1657
        try {
483 rajveer 1658
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1659
        } catch (TransactionServiceException ex) {
1660
          result.ex = ex;
1661
        } catch (Throwable th) {
483 rajveer 1662
          LOGGER.error("Internal error processing getAllOrders", th);
1663
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1664
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1665
          x.write(oprot);
1666
          oprot.writeMessageEnd();
1667
          oprot.getTransport().flush();
1668
          return;
1669
        }
483 rajveer 1670
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1671
        result.write(oprot);
1672
        oprot.writeMessageEnd();
1673
        oprot.getTransport().flush();
1674
      }
1675
 
1676
    }
1677
 
1022 varun.gupt 1678
    private class getOrdersByBillingDate implements ProcessFunction {
1679
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1680
      {
1681
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1682
        args.read(iprot);
1683
        iprot.readMessageEnd();
1684
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1685
        try {
1686
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1687
        } catch (TransactionServiceException ex) {
1688
          result.ex = ex;
1689
        } catch (Throwable th) {
1690
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1691
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1692
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1693
          x.write(oprot);
1694
          oprot.writeMessageEnd();
1695
          oprot.getTransport().flush();
1696
          return;
1697
        }
1698
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1699
        result.write(oprot);
1700
        oprot.writeMessageEnd();
1701
        oprot.getTransport().flush();
1702
      }
1703
 
1704
    }
1705
 
1382 varun.gupt 1706
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1707
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1708
      {
1709
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1710
        args.read(iprot);
1711
        iprot.readMessageEnd();
1712
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1713
        try {
1714
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1715
        } catch (TransactionServiceException ex) {
1716
          result.ex = ex;
1717
        } catch (Throwable th) {
1718
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1719
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1720
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1721
          x.write(oprot);
1722
          oprot.writeMessageEnd();
1723
          oprot.getTransport().flush();
1724
          return;
1725
        }
1726
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1727
        result.write(oprot);
1728
        oprot.writeMessageEnd();
1729
        oprot.getTransport().flush();
1730
      }
1731
 
1732
    }
1733
 
1734
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1735
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1736
      {
1737
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1738
        args.read(iprot);
1739
        iprot.readMessageEnd();
1740
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1741
        try {
1742
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1743
        } catch (TransactionServiceException ex) {
1744
          result.ex = ex;
1745
        } catch (Throwable th) {
1746
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1747
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1748
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1749
          x.write(oprot);
1750
          oprot.writeMessageEnd();
1751
          oprot.getTransport().flush();
1752
          return;
1753
        }
1754
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1755
        result.write(oprot);
1756
        oprot.writeMessageEnd();
1757
        oprot.getTransport().flush();
1758
      }
1759
 
1760
    }
1761
 
483 rajveer 1762
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1763
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1764
      {
483 rajveer 1765
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1766
        args.read(iprot);
1767
        iprot.readMessageEnd();
483 rajveer 1768
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1769
        try {
483 rajveer 1770
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1771
          result.setSuccessIsSet(true);
1772
        } catch (TransactionServiceException ex) {
1773
          result.ex = ex;
1774
        } catch (Throwable th) {
483 rajveer 1775
          LOGGER.error("Internal error processing changeOrderStatus", th);
1776
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1777
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1778
          x.write(oprot);
1779
          oprot.writeMessageEnd();
1780
          oprot.getTransport().flush();
1781
          return;
1782
        }
483 rajveer 1783
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1784
        result.write(oprot);
1785
        oprot.writeMessageEnd();
1786
        oprot.getTransport().flush();
1787
      }
1788
 
1789
    }
1790
 
495 rajveer 1791
    private class addBillingDetails implements ProcessFunction {
1792
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1793
      {
1794
        addBillingDetails_args args = new addBillingDetails_args();
1795
        args.read(iprot);
1796
        iprot.readMessageEnd();
1797
        addBillingDetails_result result = new addBillingDetails_result();
1798
        try {
1148 chandransh 1799
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1800
          result.setSuccessIsSet(true);
1801
        } catch (TransactionServiceException ex) {
1802
          result.ex = ex;
1803
        } catch (Throwable th) {
1804
          LOGGER.error("Internal error processing addBillingDetails", th);
1805
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1806
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1807
          x.write(oprot);
1808
          oprot.writeMessageEnd();
1809
          oprot.getTransport().flush();
1810
          return;
1811
        }
1812
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1813
        result.write(oprot);
1814
        oprot.writeMessageEnd();
1815
        oprot.getTransport().flush();
1816
      }
1817
 
1818
    }
1819
 
1148 chandransh 1820
    private class addJacketNumber implements ProcessFunction {
1821
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1822
      {
1823
        addJacketNumber_args args = new addJacketNumber_args();
1824
        args.read(iprot);
1825
        iprot.readMessageEnd();
1826
        addJacketNumber_result result = new addJacketNumber_result();
1827
        try {
1828
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1829
          result.setSuccessIsSet(true);
1830
        } catch (TransactionServiceException ex) {
1831
          result.ex = ex;
1832
        } catch (Throwable th) {
1833
          LOGGER.error("Internal error processing addJacketNumber", th);
1834
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1835
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1836
          x.write(oprot);
1837
          oprot.writeMessageEnd();
1838
          oprot.getTransport().flush();
1839
          return;
1840
        }
1841
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1842
        result.write(oprot);
1843
        oprot.writeMessageEnd();
1844
        oprot.getTransport().flush();
1845
      }
1846
 
1847
    }
1848
 
923 rajveer 1849
    private class acceptOrder implements ProcessFunction {
1850
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1851
      {
1852
        acceptOrder_args args = new acceptOrder_args();
1853
        args.read(iprot);
1854
        iprot.readMessageEnd();
1855
        acceptOrder_result result = new acceptOrder_result();
1856
        try {
1857
          result.success = iface_.acceptOrder(args.orderId);
1858
          result.setSuccessIsSet(true);
1859
        } catch (TransactionServiceException ex) {
1860
          result.ex = ex;
1861
        } catch (Throwable th) {
1862
          LOGGER.error("Internal error processing acceptOrder", th);
1863
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1864
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1865
          x.write(oprot);
1866
          oprot.writeMessageEnd();
1867
          oprot.getTransport().flush();
1868
          return;
1869
        }
1870
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1871
        result.write(oprot);
1872
        oprot.writeMessageEnd();
1873
        oprot.getTransport().flush();
1874
      }
1875
 
1876
    }
1877
 
1878
    private class billOrder implements ProcessFunction {
1879
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1880
      {
1881
        billOrder_args args = new billOrder_args();
1882
        args.read(iprot);
1883
        iprot.readMessageEnd();
1884
        billOrder_result result = new billOrder_result();
1885
        try {
1886
          result.success = iface_.billOrder(args.orderId);
1887
          result.setSuccessIsSet(true);
1888
        } catch (TransactionServiceException ex) {
1889
          result.ex = ex;
1890
        } catch (Throwable th) {
1891
          LOGGER.error("Internal error processing billOrder", th);
1892
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1893
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1894
          x.write(oprot);
1895
          oprot.writeMessageEnd();
1896
          oprot.getTransport().flush();
1897
          return;
1898
        }
1899
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1900
        result.write(oprot);
1901
        oprot.writeMessageEnd();
1902
        oprot.getTransport().flush();
1903
      }
1904
 
1905
    }
1906
 
483 rajveer 1907
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1908
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1909
      {
483 rajveer 1910
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1911
        args.read(iprot);
1912
        iprot.readMessageEnd();
483 rajveer 1913
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1914
        try {
483 rajveer 1915
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1916
        } catch (TransactionServiceException ex) {
1917
          result.ex = ex;
1918
        } catch (Throwable th) {
483 rajveer 1919
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1920
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1921
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1922
          x.write(oprot);
1923
          oprot.writeMessageEnd();
1924
          oprot.getTransport().flush();
1925
          return;
1926
        }
483 rajveer 1927
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1928
        result.write(oprot);
1929
        oprot.writeMessageEnd();
1930
        oprot.getTransport().flush();
1931
      }
1932
 
1933
    }
1934
 
483 rajveer 1935
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1936
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1937
      {
483 rajveer 1938
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1939
        args.read(iprot);
1940
        iprot.readMessageEnd();
483 rajveer 1941
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1942
        try {
483 rajveer 1943
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1944
        } catch (TransactionServiceException ex) {
1945
          result.ex = ex;
1946
        } catch (Throwable th) {
483 rajveer 1947
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1948
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1949
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1950
          x.write(oprot);
1951
          oprot.writeMessageEnd();
1952
          oprot.getTransport().flush();
1953
          return;
1954
        }
483 rajveer 1955
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1956
        result.write(oprot);
1957
        oprot.writeMessageEnd();
1958
        oprot.getTransport().flush();
1959
      }
1960
 
1961
    }
1962
 
483 rajveer 1963
    private class createOrder implements ProcessFunction {
68 ashish 1964
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1965
      {
483 rajveer 1966
        createOrder_args args = new createOrder_args();
68 ashish 1967
        args.read(iprot);
1968
        iprot.readMessageEnd();
483 rajveer 1969
        createOrder_result result = new createOrder_result();
68 ashish 1970
        try {
483 rajveer 1971
          result.success = iface_.createOrder(args.order);
68 ashish 1972
          result.setSuccessIsSet(true);
1973
        } catch (TransactionServiceException ex) {
1974
          result.ex = ex;
1975
        } catch (Throwable th) {
483 rajveer 1976
          LOGGER.error("Internal error processing createOrder", th);
1977
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1978
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1979
          x.write(oprot);
1980
          oprot.writeMessageEnd();
1981
          oprot.getTransport().flush();
1982
          return;
1983
        }
483 rajveer 1984
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1985
        result.write(oprot);
1986
        oprot.writeMessageEnd();
1987
        oprot.getTransport().flush();
1988
      }
1989
 
1990
    }
1991
 
483 rajveer 1992
    private class getOrder implements ProcessFunction {
68 ashish 1993
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1994
      {
483 rajveer 1995
        getOrder_args args = new getOrder_args();
68 ashish 1996
        args.read(iprot);
1997
        iprot.readMessageEnd();
483 rajveer 1998
        getOrder_result result = new getOrder_result();
68 ashish 1999
        try {
483 rajveer 2000
          result.success = iface_.getOrder(args.id);
68 ashish 2001
        } catch (TransactionServiceException ex) {
2002
          result.ex = ex;
2003
        } catch (Throwable th) {
483 rajveer 2004
          LOGGER.error("Internal error processing getOrder", th);
2005
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2006
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2007
          x.write(oprot);
2008
          oprot.writeMessageEnd();
2009
          oprot.getTransport().flush();
2010
          return;
2011
        }
483 rajveer 2012
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2013
        result.write(oprot);
2014
        oprot.writeMessageEnd();
2015
        oprot.getTransport().flush();
2016
      }
2017
 
2018
    }
2019
 
483 rajveer 2020
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2021
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2022
      {
483 rajveer 2023
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2024
        args.read(iprot);
2025
        iprot.readMessageEnd();
483 rajveer 2026
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2027
        try {
483 rajveer 2028
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2029
        } catch (TransactionServiceException ex) {
2030
          result.ex = ex;
2031
        } catch (Throwable th) {
483 rajveer 2032
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2033
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2034
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2035
          x.write(oprot);
2036
          oprot.writeMessageEnd();
2037
          oprot.getTransport().flush();
2038
          return;
2039
        }
483 rajveer 2040
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2041
        result.write(oprot);
2042
        oprot.writeMessageEnd();
2043
        oprot.getTransport().flush();
2044
      }
2045
 
2046
    }
2047
 
1221 chandransh 2048
    private class batchOrders implements ProcessFunction {
2049
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2050
      {
2051
        batchOrders_args args = new batchOrders_args();
2052
        args.read(iprot);
2053
        iprot.readMessageEnd();
2054
        batchOrders_result result = new batchOrders_result();
2055
        try {
2056
          result.success = iface_.batchOrders(args.warehouseId);
2057
        } catch (TransactionServiceException ex) {
2058
          result.ex = ex;
2059
        } catch (Throwable th) {
2060
          LOGGER.error("Internal error processing batchOrders", th);
2061
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2062
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2063
          x.write(oprot);
2064
          oprot.writeMessageEnd();
2065
          oprot.getTransport().flush();
2066
          return;
2067
        }
2068
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2069
        result.write(oprot);
2070
        oprot.writeMessageEnd();
2071
        oprot.getTransport().flush();
2072
      }
2073
 
2074
    }
2075
 
1209 chandransh 2076
    private class markOrderAsOutOfStock implements ProcessFunction {
2077
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2078
      {
2079
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2080
        args.read(iprot);
2081
        iprot.readMessageEnd();
2082
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2083
        try {
2084
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2085
          result.setSuccessIsSet(true);
2086
        } catch (TransactionServiceException ex) {
2087
          result.ex = ex;
2088
        } catch (Throwable th) {
2089
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2090
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2091
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2092
          x.write(oprot);
2093
          oprot.writeMessageEnd();
2094
          oprot.getTransport().flush();
2095
          return;
2096
        }
2097
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2098
        result.write(oprot);
2099
        oprot.writeMessageEnd();
2100
        oprot.getTransport().flush();
2101
      }
2102
 
2103
    }
2104
 
758 chandransh 2105
    private class markOrdersAsManifested implements ProcessFunction {
2106
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2107
      {
2108
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2109
        args.read(iprot);
2110
        iprot.readMessageEnd();
2111
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2112
        try {
2113
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2114
          result.setSuccessIsSet(true);
2115
        } catch (TransactionServiceException ex) {
2116
          result.ex = ex;
2117
        } catch (Throwable th) {
2118
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2119
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2120
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2121
          x.write(oprot);
2122
          oprot.writeMessageEnd();
2123
          oprot.getTransport().flush();
2124
          return;
2125
        }
2126
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2127
        result.write(oprot);
2128
        oprot.writeMessageEnd();
2129
        oprot.getTransport().flush();
2130
      }
2131
 
2132
    }
2133
 
1114 chandransh 2134
    private class markOrdersAsPickedUp implements ProcessFunction {
2135
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2136
      {
2137
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2138
        args.read(iprot);
2139
        iprot.readMessageEnd();
2140
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2141
        try {
2142
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2143
        } catch (TransactionServiceException ex) {
2144
          result.ex = ex;
2145
        } catch (Throwable th) {
2146
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2147
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2148
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2149
          x.write(oprot);
2150
          oprot.writeMessageEnd();
2151
          oprot.getTransport().flush();
2152
          return;
2153
        }
2154
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2155
        result.write(oprot);
2156
        oprot.writeMessageEnd();
2157
        oprot.getTransport().flush();
2158
      }
2159
 
2160
    }
2161
 
1133 chandransh 2162
    private class markOrdersAsDelivered implements ProcessFunction {
2163
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2164
      {
2165
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2166
        args.read(iprot);
2167
        iprot.readMessageEnd();
2168
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2169
        try {
2170
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2171
        } catch (TransactionServiceException ex) {
2172
          result.ex = ex;
2173
        } catch (Throwable th) {
2174
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2175
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2176
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2177
          x.write(oprot);
2178
          oprot.writeMessageEnd();
2179
          oprot.getTransport().flush();
2180
          return;
2181
        }
2182
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2183
        result.write(oprot);
2184
        oprot.writeMessageEnd();
2185
        oprot.getTransport().flush();
2186
      }
2187
 
2188
    }
2189
 
2190
    private class markOrdersAsFailed implements ProcessFunction {
2191
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2192
      {
2193
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2194
        args.read(iprot);
2195
        iprot.readMessageEnd();
2196
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2197
        try {
2198
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2199
        } catch (TransactionServiceException ex) {
2200
          result.ex = ex;
2201
        } catch (Throwable th) {
2202
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2203
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2204
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2205
          x.write(oprot);
2206
          oprot.writeMessageEnd();
2207
          oprot.getTransport().flush();
2208
          return;
2209
        }
2210
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2211
        result.write(oprot);
2212
        oprot.writeMessageEnd();
2213
        oprot.getTransport().flush();
2214
      }
2215
 
2216
    }
2217
 
1245 chandransh 2218
    private class updateNonDeliveryReason implements ProcessFunction {
2219
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2220
      {
2221
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2222
        args.read(iprot);
2223
        iprot.readMessageEnd();
2224
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2225
        try {
2226
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2227
        } catch (TransactionServiceException ex) {
2228
          result.ex = ex;
2229
        } catch (Throwable th) {
2230
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2232
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2233
          x.write(oprot);
2234
          oprot.writeMessageEnd();
2235
          oprot.getTransport().flush();
2236
          return;
2237
        }
2238
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2239
        result.write(oprot);
2240
        oprot.writeMessageEnd();
2241
        oprot.getTransport().flush();
2242
      }
2243
 
2244
    }
2245
 
1406 ankur.sing 2246
    private class getUndeliveredOrders implements ProcessFunction {
2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2248
      {
2249
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2250
        args.read(iprot);
2251
        iprot.readMessageEnd();
2252
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2253
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2254
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2255
        result.write(oprot);
2256
        oprot.writeMessageEnd();
2257
        oprot.getTransport().flush();
2258
      }
2259
 
2260
    }
2261
 
305 ashish 2262
    private class getAlerts implements ProcessFunction {
2263
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2264
      {
2265
        getAlerts_args args = new getAlerts_args();
2266
        args.read(iprot);
2267
        iprot.readMessageEnd();
2268
        getAlerts_result result = new getAlerts_result();
483 rajveer 2269
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2270
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2271
        result.write(oprot);
2272
        oprot.writeMessageEnd();
2273
        oprot.getTransport().flush();
2274
      }
2275
 
2276
    }
2277
 
2278
    private class setAlert implements ProcessFunction {
2279
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2280
      {
2281
        setAlert_args args = new setAlert_args();
2282
        args.read(iprot);
2283
        iprot.readMessageEnd();
2284
        setAlert_result result = new setAlert_result();
483 rajveer 2285
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2286
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2287
        result.write(oprot);
2288
        oprot.writeMessageEnd();
2289
        oprot.getTransport().flush();
2290
      }
2291
 
2292
    }
2293
 
68 ashish 2294
  }
2295
 
764 rajveer 2296
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2297
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2298
 
2299
 
2300
 
2301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2302
    public enum _Fields implements TFieldIdEnum {
2303
;
2304
 
2305
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2306
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2307
 
2308
      static {
2309
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2310
          byId.put((int)field._thriftId, field);
2311
          byName.put(field.getFieldName(), field);
2312
        }
2313
      }
2314
 
2315
      /**
2316
       * Find the _Fields constant that matches fieldId, or null if its not found.
2317
       */
2318
      public static _Fields findByThriftId(int fieldId) {
2319
        return byId.get(fieldId);
2320
      }
2321
 
2322
      /**
2323
       * Find the _Fields constant that matches fieldId, throwing an exception
2324
       * if it is not found.
2325
       */
2326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2327
        _Fields fields = findByThriftId(fieldId);
2328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2329
        return fields;
2330
      }
2331
 
2332
      /**
2333
       * Find the _Fields constant that matches name, or null if its not found.
2334
       */
2335
      public static _Fields findByName(String name) {
2336
        return byName.get(name);
2337
      }
2338
 
2339
      private final short _thriftId;
2340
      private final String _fieldName;
2341
 
2342
      _Fields(short thriftId, String fieldName) {
2343
        _thriftId = thriftId;
2344
        _fieldName = fieldName;
2345
      }
2346
 
2347
      public short getThriftFieldId() {
2348
        return _thriftId;
2349
      }
2350
 
2351
      public String getFieldName() {
2352
        return _fieldName;
2353
      }
2354
    }
2355
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2356
    }});
2357
 
2358
    static {
2359
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2360
    }
2361
 
2362
    public closeSession_args() {
2363
    }
2364
 
2365
    /**
2366
     * Performs a deep copy on <i>other</i>.
2367
     */
2368
    public closeSession_args(closeSession_args other) {
2369
    }
2370
 
2371
    public closeSession_args deepCopy() {
2372
      return new closeSession_args(this);
2373
    }
2374
 
2375
    @Deprecated
2376
    public closeSession_args clone() {
2377
      return new closeSession_args(this);
2378
    }
2379
 
2380
    public void setFieldValue(_Fields field, Object value) {
2381
      switch (field) {
2382
      }
2383
    }
2384
 
2385
    public void setFieldValue(int fieldID, Object value) {
2386
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2387
    }
2388
 
2389
    public Object getFieldValue(_Fields field) {
2390
      switch (field) {
2391
      }
2392
      throw new IllegalStateException();
2393
    }
2394
 
2395
    public Object getFieldValue(int fieldId) {
2396
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2397
    }
2398
 
2399
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2400
    public boolean isSet(_Fields field) {
2401
      switch (field) {
2402
      }
2403
      throw new IllegalStateException();
2404
    }
2405
 
2406
    public boolean isSet(int fieldID) {
2407
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2408
    }
2409
 
2410
    @Override
2411
    public boolean equals(Object that) {
2412
      if (that == null)
2413
        return false;
2414
      if (that instanceof closeSession_args)
2415
        return this.equals((closeSession_args)that);
2416
      return false;
2417
    }
2418
 
2419
    public boolean equals(closeSession_args that) {
2420
      if (that == null)
2421
        return false;
2422
 
2423
      return true;
2424
    }
2425
 
2426
    @Override
2427
    public int hashCode() {
2428
      return 0;
2429
    }
2430
 
2431
    public int compareTo(closeSession_args other) {
2432
      if (!getClass().equals(other.getClass())) {
2433
        return getClass().getName().compareTo(other.getClass().getName());
2434
      }
2435
 
2436
      int lastComparison = 0;
2437
      closeSession_args typedOther = (closeSession_args)other;
2438
 
2439
      return 0;
2440
    }
2441
 
2442
    public void read(TProtocol iprot) throws TException {
2443
      TField field;
2444
      iprot.readStructBegin();
2445
      while (true)
2446
      {
2447
        field = iprot.readFieldBegin();
2448
        if (field.type == TType.STOP) { 
2449
          break;
2450
        }
2451
        _Fields fieldId = _Fields.findByThriftId(field.id);
2452
        if (fieldId == null) {
2453
          TProtocolUtil.skip(iprot, field.type);
2454
        } else {
2455
          switch (fieldId) {
2456
          }
2457
          iprot.readFieldEnd();
2458
        }
2459
      }
2460
      iprot.readStructEnd();
2461
      validate();
2462
    }
2463
 
2464
    public void write(TProtocol oprot) throws TException {
2465
      validate();
2466
 
2467
      oprot.writeStructBegin(STRUCT_DESC);
2468
      oprot.writeFieldStop();
2469
      oprot.writeStructEnd();
2470
    }
2471
 
2472
    @Override
2473
    public String toString() {
2474
      StringBuilder sb = new StringBuilder("closeSession_args(");
2475
      boolean first = true;
2476
 
2477
      sb.append(")");
2478
      return sb.toString();
2479
    }
2480
 
2481
    public void validate() throws TException {
2482
      // check for required fields
2483
    }
2484
 
2485
  }
2486
 
2487
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2488
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2489
 
2490
 
2491
 
2492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2493
    public enum _Fields implements TFieldIdEnum {
2494
;
2495
 
2496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2498
 
2499
      static {
2500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2501
          byId.put((int)field._thriftId, field);
2502
          byName.put(field.getFieldName(), field);
2503
        }
2504
      }
2505
 
2506
      /**
2507
       * Find the _Fields constant that matches fieldId, or null if its not found.
2508
       */
2509
      public static _Fields findByThriftId(int fieldId) {
2510
        return byId.get(fieldId);
2511
      }
2512
 
2513
      /**
2514
       * Find the _Fields constant that matches fieldId, throwing an exception
2515
       * if it is not found.
2516
       */
2517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2518
        _Fields fields = findByThriftId(fieldId);
2519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2520
        return fields;
2521
      }
2522
 
2523
      /**
2524
       * Find the _Fields constant that matches name, or null if its not found.
2525
       */
2526
      public static _Fields findByName(String name) {
2527
        return byName.get(name);
2528
      }
2529
 
2530
      private final short _thriftId;
2531
      private final String _fieldName;
2532
 
2533
      _Fields(short thriftId, String fieldName) {
2534
        _thriftId = thriftId;
2535
        _fieldName = fieldName;
2536
      }
2537
 
2538
      public short getThriftFieldId() {
2539
        return _thriftId;
2540
      }
2541
 
2542
      public String getFieldName() {
2543
        return _fieldName;
2544
      }
2545
    }
2546
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2547
    }});
2548
 
2549
    static {
2550
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2551
    }
2552
 
2553
    public closeSession_result() {
2554
    }
2555
 
2556
    /**
2557
     * Performs a deep copy on <i>other</i>.
2558
     */
2559
    public closeSession_result(closeSession_result other) {
2560
    }
2561
 
2562
    public closeSession_result deepCopy() {
2563
      return new closeSession_result(this);
2564
    }
2565
 
2566
    @Deprecated
2567
    public closeSession_result clone() {
2568
      return new closeSession_result(this);
2569
    }
2570
 
2571
    public void setFieldValue(_Fields field, Object value) {
2572
      switch (field) {
2573
      }
2574
    }
2575
 
2576
    public void setFieldValue(int fieldID, Object value) {
2577
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2578
    }
2579
 
2580
    public Object getFieldValue(_Fields field) {
2581
      switch (field) {
2582
      }
2583
      throw new IllegalStateException();
2584
    }
2585
 
2586
    public Object getFieldValue(int fieldId) {
2587
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2588
    }
2589
 
2590
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2591
    public boolean isSet(_Fields field) {
2592
      switch (field) {
2593
      }
2594
      throw new IllegalStateException();
2595
    }
2596
 
2597
    public boolean isSet(int fieldID) {
2598
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2599
    }
2600
 
2601
    @Override
2602
    public boolean equals(Object that) {
2603
      if (that == null)
2604
        return false;
2605
      if (that instanceof closeSession_result)
2606
        return this.equals((closeSession_result)that);
2607
      return false;
2608
    }
2609
 
2610
    public boolean equals(closeSession_result that) {
2611
      if (that == null)
2612
        return false;
2613
 
2614
      return true;
2615
    }
2616
 
2617
    @Override
2618
    public int hashCode() {
2619
      return 0;
2620
    }
2621
 
2622
    public int compareTo(closeSession_result other) {
2623
      if (!getClass().equals(other.getClass())) {
2624
        return getClass().getName().compareTo(other.getClass().getName());
2625
      }
2626
 
2627
      int lastComparison = 0;
2628
      closeSession_result typedOther = (closeSession_result)other;
2629
 
2630
      return 0;
2631
    }
2632
 
2633
    public void read(TProtocol iprot) throws TException {
2634
      TField field;
2635
      iprot.readStructBegin();
2636
      while (true)
2637
      {
2638
        field = iprot.readFieldBegin();
2639
        if (field.type == TType.STOP) { 
2640
          break;
2641
        }
2642
        _Fields fieldId = _Fields.findByThriftId(field.id);
2643
        if (fieldId == null) {
2644
          TProtocolUtil.skip(iprot, field.type);
2645
        } else {
2646
          switch (fieldId) {
2647
          }
2648
          iprot.readFieldEnd();
2649
        }
2650
      }
2651
      iprot.readStructEnd();
2652
      validate();
2653
    }
2654
 
2655
    public void write(TProtocol oprot) throws TException {
2656
      oprot.writeStructBegin(STRUCT_DESC);
2657
 
2658
      oprot.writeFieldStop();
2659
      oprot.writeStructEnd();
2660
    }
2661
 
2662
    @Override
2663
    public String toString() {
2664
      StringBuilder sb = new StringBuilder("closeSession_result(");
2665
      boolean first = true;
2666
 
2667
      sb.append(")");
2668
      return sb.toString();
2669
    }
2670
 
2671
    public void validate() throws TException {
2672
      // check for required fields
2673
    }
2674
 
2675
  }
2676
 
684 chandransh 2677
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2678
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2679
 
2680
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2681
 
2682
    private Transaction transaction;
2683
 
2684
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2685
    public enum _Fields implements TFieldIdEnum {
2686
      TRANSACTION((short)1, "transaction");
2687
 
2688
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2689
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2690
 
2691
      static {
2692
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2693
          byId.put((int)field._thriftId, field);
2694
          byName.put(field.getFieldName(), field);
2695
        }
2696
      }
2697
 
2698
      /**
2699
       * Find the _Fields constant that matches fieldId, or null if its not found.
2700
       */
2701
      public static _Fields findByThriftId(int fieldId) {
2702
        return byId.get(fieldId);
2703
      }
2704
 
2705
      /**
2706
       * Find the _Fields constant that matches fieldId, throwing an exception
2707
       * if it is not found.
2708
       */
2709
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2710
        _Fields fields = findByThriftId(fieldId);
2711
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2712
        return fields;
2713
      }
2714
 
2715
      /**
2716
       * Find the _Fields constant that matches name, or null if its not found.
2717
       */
2718
      public static _Fields findByName(String name) {
2719
        return byName.get(name);
2720
      }
2721
 
2722
      private final short _thriftId;
2723
      private final String _fieldName;
2724
 
2725
      _Fields(short thriftId, String fieldName) {
2726
        _thriftId = thriftId;
2727
        _fieldName = fieldName;
2728
      }
2729
 
2730
      public short getThriftFieldId() {
2731
        return _thriftId;
2732
      }
2733
 
2734
      public String getFieldName() {
2735
        return _fieldName;
2736
      }
2737
    }
2738
 
2739
    // isset id assignments
2740
 
2741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2742
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2743
          new StructMetaData(TType.STRUCT, Transaction.class)));
2744
    }});
2745
 
2746
    static {
2747
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2748
    }
2749
 
2750
    public createTransaction_args() {
2751
    }
2752
 
2753
    public createTransaction_args(
2754
      Transaction transaction)
2755
    {
2756
      this();
2757
      this.transaction = transaction;
2758
    }
2759
 
2760
    /**
2761
     * Performs a deep copy on <i>other</i>.
2762
     */
2763
    public createTransaction_args(createTransaction_args other) {
2764
      if (other.isSetTransaction()) {
2765
        this.transaction = new Transaction(other.transaction);
2766
      }
2767
    }
2768
 
2769
    public createTransaction_args deepCopy() {
2770
      return new createTransaction_args(this);
2771
    }
2772
 
2773
    @Deprecated
2774
    public createTransaction_args clone() {
2775
      return new createTransaction_args(this);
2776
    }
2777
 
2778
    public Transaction getTransaction() {
2779
      return this.transaction;
2780
    }
2781
 
2782
    public createTransaction_args setTransaction(Transaction transaction) {
2783
      this.transaction = transaction;
2784
      return this;
2785
    }
2786
 
2787
    public void unsetTransaction() {
2788
      this.transaction = null;
2789
    }
2790
 
2791
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2792
    public boolean isSetTransaction() {
2793
      return this.transaction != null;
2794
    }
2795
 
2796
    public void setTransactionIsSet(boolean value) {
2797
      if (!value) {
2798
        this.transaction = null;
2799
      }
2800
    }
2801
 
2802
    public void setFieldValue(_Fields field, Object value) {
2803
      switch (field) {
2804
      case TRANSACTION:
2805
        if (value == null) {
2806
          unsetTransaction();
2807
        } else {
2808
          setTransaction((Transaction)value);
2809
        }
2810
        break;
2811
 
2812
      }
2813
    }
2814
 
2815
    public void setFieldValue(int fieldID, Object value) {
2816
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2817
    }
2818
 
2819
    public Object getFieldValue(_Fields field) {
2820
      switch (field) {
2821
      case TRANSACTION:
2822
        return getTransaction();
2823
 
2824
      }
2825
      throw new IllegalStateException();
2826
    }
2827
 
2828
    public Object getFieldValue(int fieldId) {
2829
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2830
    }
2831
 
2832
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2833
    public boolean isSet(_Fields field) {
2834
      switch (field) {
2835
      case TRANSACTION:
2836
        return isSetTransaction();
2837
      }
2838
      throw new IllegalStateException();
2839
    }
2840
 
2841
    public boolean isSet(int fieldID) {
2842
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2843
    }
2844
 
2845
    @Override
2846
    public boolean equals(Object that) {
2847
      if (that == null)
2848
        return false;
2849
      if (that instanceof createTransaction_args)
2850
        return this.equals((createTransaction_args)that);
2851
      return false;
2852
    }
2853
 
2854
    public boolean equals(createTransaction_args that) {
2855
      if (that == null)
2856
        return false;
2857
 
2858
      boolean this_present_transaction = true && this.isSetTransaction();
2859
      boolean that_present_transaction = true && that.isSetTransaction();
2860
      if (this_present_transaction || that_present_transaction) {
2861
        if (!(this_present_transaction && that_present_transaction))
2862
          return false;
2863
        if (!this.transaction.equals(that.transaction))
2864
          return false;
2865
      }
2866
 
2867
      return true;
2868
    }
2869
 
2870
    @Override
2871
    public int hashCode() {
2872
      return 0;
2873
    }
2874
 
684 chandransh 2875
    public int compareTo(createTransaction_args other) {
2876
      if (!getClass().equals(other.getClass())) {
2877
        return getClass().getName().compareTo(other.getClass().getName());
2878
      }
2879
 
2880
      int lastComparison = 0;
2881
      createTransaction_args typedOther = (createTransaction_args)other;
2882
 
2883
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2884
      if (lastComparison != 0) {
2885
        return lastComparison;
2886
      }
2887
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2888
      if (lastComparison != 0) {
2889
        return lastComparison;
2890
      }
2891
      return 0;
2892
    }
2893
 
68 ashish 2894
    public void read(TProtocol iprot) throws TException {
2895
      TField field;
2896
      iprot.readStructBegin();
2897
      while (true)
2898
      {
2899
        field = iprot.readFieldBegin();
2900
        if (field.type == TType.STOP) { 
2901
          break;
2902
        }
2903
        _Fields fieldId = _Fields.findByThriftId(field.id);
2904
        if (fieldId == null) {
2905
          TProtocolUtil.skip(iprot, field.type);
2906
        } else {
2907
          switch (fieldId) {
2908
            case TRANSACTION:
2909
              if (field.type == TType.STRUCT) {
2910
                this.transaction = new Transaction();
2911
                this.transaction.read(iprot);
2912
              } else { 
2913
                TProtocolUtil.skip(iprot, field.type);
2914
              }
2915
              break;
2916
          }
2917
          iprot.readFieldEnd();
2918
        }
2919
      }
2920
      iprot.readStructEnd();
2921
      validate();
2922
    }
2923
 
2924
    public void write(TProtocol oprot) throws TException {
2925
      validate();
2926
 
2927
      oprot.writeStructBegin(STRUCT_DESC);
2928
      if (this.transaction != null) {
2929
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2930
        this.transaction.write(oprot);
2931
        oprot.writeFieldEnd();
2932
      }
2933
      oprot.writeFieldStop();
2934
      oprot.writeStructEnd();
2935
    }
2936
 
2937
    @Override
2938
    public String toString() {
2939
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2940
      boolean first = true;
2941
 
2942
      sb.append("transaction:");
2943
      if (this.transaction == null) {
2944
        sb.append("null");
2945
      } else {
2946
        sb.append(this.transaction);
2947
      }
2948
      first = false;
2949
      sb.append(")");
2950
      return sb.toString();
2951
    }
2952
 
2953
    public void validate() throws TException {
2954
      // check for required fields
2955
    }
2956
 
2957
  }
2958
 
2959
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2960
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2961
 
132 ashish 2962
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2963
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2964
 
132 ashish 2965
    private long success;
68 ashish 2966
    private TransactionServiceException ex;
2967
 
2968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2969
    public enum _Fields implements TFieldIdEnum {
132 ashish 2970
      SUCCESS((short)0, "success"),
68 ashish 2971
      EX((short)1, "ex");
2972
 
2973
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2975
 
2976
      static {
2977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2978
          byId.put((int)field._thriftId, field);
2979
          byName.put(field.getFieldName(), field);
2980
        }
2981
      }
2982
 
2983
      /**
2984
       * Find the _Fields constant that matches fieldId, or null if its not found.
2985
       */
2986
      public static _Fields findByThriftId(int fieldId) {
2987
        return byId.get(fieldId);
2988
      }
2989
 
2990
      /**
2991
       * Find the _Fields constant that matches fieldId, throwing an exception
2992
       * if it is not found.
2993
       */
2994
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2995
        _Fields fields = findByThriftId(fieldId);
2996
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2997
        return fields;
2998
      }
2999
 
3000
      /**
3001
       * Find the _Fields constant that matches name, or null if its not found.
3002
       */
3003
      public static _Fields findByName(String name) {
3004
        return byName.get(name);
3005
      }
3006
 
3007
      private final short _thriftId;
3008
      private final String _fieldName;
3009
 
3010
      _Fields(short thriftId, String fieldName) {
3011
        _thriftId = thriftId;
3012
        _fieldName = fieldName;
3013
      }
3014
 
3015
      public short getThriftFieldId() {
3016
        return _thriftId;
3017
      }
3018
 
3019
      public String getFieldName() {
3020
        return _fieldName;
3021
      }
3022
    }
3023
 
3024
    // isset id assignments
132 ashish 3025
    private static final int __SUCCESS_ISSET_ID = 0;
3026
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3027
 
3028
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3029
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3030
          new FieldValueMetaData(TType.I64)));
68 ashish 3031
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3032
          new FieldValueMetaData(TType.STRUCT)));
3033
    }});
3034
 
3035
    static {
3036
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3037
    }
3038
 
3039
    public createTransaction_result() {
3040
    }
3041
 
3042
    public createTransaction_result(
132 ashish 3043
      long success,
68 ashish 3044
      TransactionServiceException ex)
3045
    {
3046
      this();
132 ashish 3047
      this.success = success;
3048
      setSuccessIsSet(true);
68 ashish 3049
      this.ex = ex;
3050
    }
3051
 
3052
    /**
3053
     * Performs a deep copy on <i>other</i>.
3054
     */
3055
    public createTransaction_result(createTransaction_result other) {
132 ashish 3056
      __isset_bit_vector.clear();
3057
      __isset_bit_vector.or(other.__isset_bit_vector);
3058
      this.success = other.success;
68 ashish 3059
      if (other.isSetEx()) {
3060
        this.ex = new TransactionServiceException(other.ex);
3061
      }
3062
    }
3063
 
3064
    public createTransaction_result deepCopy() {
3065
      return new createTransaction_result(this);
3066
    }
3067
 
3068
    @Deprecated
3069
    public createTransaction_result clone() {
3070
      return new createTransaction_result(this);
3071
    }
3072
 
132 ashish 3073
    public long getSuccess() {
3074
      return this.success;
3075
    }
3076
 
3077
    public createTransaction_result setSuccess(long success) {
3078
      this.success = success;
3079
      setSuccessIsSet(true);
3080
      return this;
3081
    }
3082
 
3083
    public void unsetSuccess() {
3084
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3085
    }
3086
 
3087
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3088
    public boolean isSetSuccess() {
3089
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3090
    }
3091
 
3092
    public void setSuccessIsSet(boolean value) {
3093
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3094
    }
3095
 
68 ashish 3096
    public TransactionServiceException getEx() {
3097
      return this.ex;
3098
    }
3099
 
3100
    public createTransaction_result setEx(TransactionServiceException ex) {
3101
      this.ex = ex;
3102
      return this;
3103
    }
3104
 
3105
    public void unsetEx() {
3106
      this.ex = null;
3107
    }
3108
 
3109
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3110
    public boolean isSetEx() {
3111
      return this.ex != null;
3112
    }
3113
 
3114
    public void setExIsSet(boolean value) {
3115
      if (!value) {
3116
        this.ex = null;
3117
      }
3118
    }
3119
 
3120
    public void setFieldValue(_Fields field, Object value) {
3121
      switch (field) {
132 ashish 3122
      case SUCCESS:
3123
        if (value == null) {
3124
          unsetSuccess();
3125
        } else {
3126
          setSuccess((Long)value);
3127
        }
3128
        break;
3129
 
68 ashish 3130
      case EX:
3131
        if (value == null) {
3132
          unsetEx();
3133
        } else {
3134
          setEx((TransactionServiceException)value);
3135
        }
3136
        break;
3137
 
3138
      }
3139
    }
3140
 
3141
    public void setFieldValue(int fieldID, Object value) {
3142
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3143
    }
3144
 
3145
    public Object getFieldValue(_Fields field) {
3146
      switch (field) {
132 ashish 3147
      case SUCCESS:
3148
        return new Long(getSuccess());
3149
 
68 ashish 3150
      case EX:
3151
        return getEx();
3152
 
3153
      }
3154
      throw new IllegalStateException();
3155
    }
3156
 
3157
    public Object getFieldValue(int fieldId) {
3158
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3159
    }
3160
 
3161
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3162
    public boolean isSet(_Fields field) {
3163
      switch (field) {
132 ashish 3164
      case SUCCESS:
3165
        return isSetSuccess();
68 ashish 3166
      case EX:
3167
        return isSetEx();
3168
      }
3169
      throw new IllegalStateException();
3170
    }
3171
 
3172
    public boolean isSet(int fieldID) {
3173
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3174
    }
3175
 
3176
    @Override
3177
    public boolean equals(Object that) {
3178
      if (that == null)
3179
        return false;
3180
      if (that instanceof createTransaction_result)
3181
        return this.equals((createTransaction_result)that);
3182
      return false;
3183
    }
3184
 
3185
    public boolean equals(createTransaction_result that) {
3186
      if (that == null)
3187
        return false;
3188
 
132 ashish 3189
      boolean this_present_success = true;
3190
      boolean that_present_success = true;
3191
      if (this_present_success || that_present_success) {
3192
        if (!(this_present_success && that_present_success))
3193
          return false;
3194
        if (this.success != that.success)
3195
          return false;
3196
      }
3197
 
68 ashish 3198
      boolean this_present_ex = true && this.isSetEx();
3199
      boolean that_present_ex = true && that.isSetEx();
3200
      if (this_present_ex || that_present_ex) {
3201
        if (!(this_present_ex && that_present_ex))
3202
          return false;
3203
        if (!this.ex.equals(that.ex))
3204
          return false;
3205
      }
3206
 
3207
      return true;
3208
    }
3209
 
3210
    @Override
3211
    public int hashCode() {
3212
      return 0;
3213
    }
3214
 
3215
    public int compareTo(createTransaction_result other) {
3216
      if (!getClass().equals(other.getClass())) {
3217
        return getClass().getName().compareTo(other.getClass().getName());
3218
      }
3219
 
3220
      int lastComparison = 0;
3221
      createTransaction_result typedOther = (createTransaction_result)other;
3222
 
132 ashish 3223
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3224
      if (lastComparison != 0) {
3225
        return lastComparison;
3226
      }
3227
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3228
      if (lastComparison != 0) {
3229
        return lastComparison;
3230
      }
68 ashish 3231
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3232
      if (lastComparison != 0) {
3233
        return lastComparison;
3234
      }
3235
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3236
      if (lastComparison != 0) {
3237
        return lastComparison;
3238
      }
3239
      return 0;
3240
    }
3241
 
3242
    public void read(TProtocol iprot) throws TException {
3243
      TField field;
3244
      iprot.readStructBegin();
3245
      while (true)
3246
      {
3247
        field = iprot.readFieldBegin();
3248
        if (field.type == TType.STOP) { 
3249
          break;
3250
        }
3251
        _Fields fieldId = _Fields.findByThriftId(field.id);
3252
        if (fieldId == null) {
3253
          TProtocolUtil.skip(iprot, field.type);
3254
        } else {
3255
          switch (fieldId) {
132 ashish 3256
            case SUCCESS:
3257
              if (field.type == TType.I64) {
3258
                this.success = iprot.readI64();
3259
                setSuccessIsSet(true);
3260
              } else { 
3261
                TProtocolUtil.skip(iprot, field.type);
3262
              }
3263
              break;
68 ashish 3264
            case EX:
3265
              if (field.type == TType.STRUCT) {
3266
                this.ex = new TransactionServiceException();
3267
                this.ex.read(iprot);
3268
              } else { 
3269
                TProtocolUtil.skip(iprot, field.type);
3270
              }
3271
              break;
3272
          }
3273
          iprot.readFieldEnd();
3274
        }
3275
      }
3276
      iprot.readStructEnd();
3277
      validate();
3278
    }
3279
 
3280
    public void write(TProtocol oprot) throws TException {
3281
      oprot.writeStructBegin(STRUCT_DESC);
3282
 
132 ashish 3283
      if (this.isSetSuccess()) {
3284
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3285
        oprot.writeI64(this.success);
3286
        oprot.writeFieldEnd();
3287
      } else if (this.isSetEx()) {
68 ashish 3288
        oprot.writeFieldBegin(EX_FIELD_DESC);
3289
        this.ex.write(oprot);
3290
        oprot.writeFieldEnd();
3291
      }
3292
      oprot.writeFieldStop();
3293
      oprot.writeStructEnd();
3294
    }
3295
 
3296
    @Override
3297
    public String toString() {
3298
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3299
      boolean first = true;
3300
 
132 ashish 3301
      sb.append("success:");
3302
      sb.append(this.success);
3303
      first = false;
3304
      if (!first) sb.append(", ");
68 ashish 3305
      sb.append("ex:");
3306
      if (this.ex == null) {
3307
        sb.append("null");
3308
      } else {
3309
        sb.append(this.ex);
3310
      }
3311
      first = false;
3312
      sb.append(")");
3313
      return sb.toString();
3314
    }
3315
 
3316
    public void validate() throws TException {
3317
      // check for required fields
3318
    }
3319
 
3320
  }
3321
 
3322
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3323
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3324
 
3325
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3326
 
3327
    private long id;
3328
 
3329
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3330
    public enum _Fields implements TFieldIdEnum {
3331
      ID((short)1, "id");
3332
 
3333
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3334
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3335
 
3336
      static {
3337
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3338
          byId.put((int)field._thriftId, field);
3339
          byName.put(field.getFieldName(), field);
3340
        }
3341
      }
3342
 
3343
      /**
3344
       * Find the _Fields constant that matches fieldId, or null if its not found.
3345
       */
3346
      public static _Fields findByThriftId(int fieldId) {
3347
        return byId.get(fieldId);
3348
      }
3349
 
3350
      /**
3351
       * Find the _Fields constant that matches fieldId, throwing an exception
3352
       * if it is not found.
3353
       */
3354
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3355
        _Fields fields = findByThriftId(fieldId);
3356
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3357
        return fields;
3358
      }
3359
 
3360
      /**
3361
       * Find the _Fields constant that matches name, or null if its not found.
3362
       */
3363
      public static _Fields findByName(String name) {
3364
        return byName.get(name);
3365
      }
3366
 
3367
      private final short _thriftId;
3368
      private final String _fieldName;
3369
 
3370
      _Fields(short thriftId, String fieldName) {
3371
        _thriftId = thriftId;
3372
        _fieldName = fieldName;
3373
      }
3374
 
3375
      public short getThriftFieldId() {
3376
        return _thriftId;
3377
      }
3378
 
3379
      public String getFieldName() {
3380
        return _fieldName;
3381
      }
3382
    }
3383
 
3384
    // isset id assignments
3385
    private static final int __ID_ISSET_ID = 0;
3386
    private BitSet __isset_bit_vector = new BitSet(1);
3387
 
3388
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3389
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3390
          new FieldValueMetaData(TType.I64)));
3391
    }});
3392
 
3393
    static {
3394
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3395
    }
3396
 
3397
    public getTransaction_args() {
3398
    }
3399
 
3400
    public getTransaction_args(
3401
      long id)
3402
    {
3403
      this();
3404
      this.id = id;
3405
      setIdIsSet(true);
3406
    }
3407
 
3408
    /**
3409
     * Performs a deep copy on <i>other</i>.
3410
     */
3411
    public getTransaction_args(getTransaction_args other) {
3412
      __isset_bit_vector.clear();
3413
      __isset_bit_vector.or(other.__isset_bit_vector);
3414
      this.id = other.id;
3415
    }
3416
 
3417
    public getTransaction_args deepCopy() {
3418
      return new getTransaction_args(this);
3419
    }
3420
 
3421
    @Deprecated
3422
    public getTransaction_args clone() {
3423
      return new getTransaction_args(this);
3424
    }
3425
 
3426
    public long getId() {
3427
      return this.id;
3428
    }
3429
 
3430
    public getTransaction_args setId(long id) {
3431
      this.id = id;
3432
      setIdIsSet(true);
3433
      return this;
3434
    }
3435
 
3436
    public void unsetId() {
3437
      __isset_bit_vector.clear(__ID_ISSET_ID);
3438
    }
3439
 
3440
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3441
    public boolean isSetId() {
3442
      return __isset_bit_vector.get(__ID_ISSET_ID);
3443
    }
3444
 
3445
    public void setIdIsSet(boolean value) {
3446
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3447
    }
3448
 
3449
    public void setFieldValue(_Fields field, Object value) {
3450
      switch (field) {
3451
      case ID:
3452
        if (value == null) {
3453
          unsetId();
3454
        } else {
3455
          setId((Long)value);
3456
        }
3457
        break;
3458
 
3459
      }
3460
    }
3461
 
3462
    public void setFieldValue(int fieldID, Object value) {
3463
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3464
    }
3465
 
3466
    public Object getFieldValue(_Fields field) {
3467
      switch (field) {
3468
      case ID:
3469
        return new Long(getId());
3470
 
3471
      }
3472
      throw new IllegalStateException();
3473
    }
3474
 
3475
    public Object getFieldValue(int fieldId) {
3476
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3477
    }
3478
 
3479
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3480
    public boolean isSet(_Fields field) {
3481
      switch (field) {
3482
      case ID:
3483
        return isSetId();
3484
      }
3485
      throw new IllegalStateException();
3486
    }
3487
 
3488
    public boolean isSet(int fieldID) {
3489
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3490
    }
3491
 
3492
    @Override
3493
    public boolean equals(Object that) {
3494
      if (that == null)
3495
        return false;
3496
      if (that instanceof getTransaction_args)
3497
        return this.equals((getTransaction_args)that);
3498
      return false;
3499
    }
3500
 
3501
    public boolean equals(getTransaction_args that) {
3502
      if (that == null)
3503
        return false;
3504
 
3505
      boolean this_present_id = true;
3506
      boolean that_present_id = true;
3507
      if (this_present_id || that_present_id) {
3508
        if (!(this_present_id && that_present_id))
3509
          return false;
3510
        if (this.id != that.id)
3511
          return false;
3512
      }
3513
 
3514
      return true;
3515
    }
3516
 
3517
    @Override
3518
    public int hashCode() {
3519
      return 0;
3520
    }
3521
 
3522
    public int compareTo(getTransaction_args other) {
3523
      if (!getClass().equals(other.getClass())) {
3524
        return getClass().getName().compareTo(other.getClass().getName());
3525
      }
3526
 
3527
      int lastComparison = 0;
3528
      getTransaction_args typedOther = (getTransaction_args)other;
3529
 
3530
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3531
      if (lastComparison != 0) {
3532
        return lastComparison;
3533
      }
3534
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3535
      if (lastComparison != 0) {
3536
        return lastComparison;
3537
      }
3538
      return 0;
3539
    }
3540
 
3541
    public void read(TProtocol iprot) throws TException {
3542
      TField field;
3543
      iprot.readStructBegin();
3544
      while (true)
3545
      {
3546
        field = iprot.readFieldBegin();
3547
        if (field.type == TType.STOP) { 
3548
          break;
3549
        }
3550
        _Fields fieldId = _Fields.findByThriftId(field.id);
3551
        if (fieldId == null) {
3552
          TProtocolUtil.skip(iprot, field.type);
3553
        } else {
3554
          switch (fieldId) {
3555
            case ID:
3556
              if (field.type == TType.I64) {
3557
                this.id = iprot.readI64();
3558
                setIdIsSet(true);
3559
              } else { 
3560
                TProtocolUtil.skip(iprot, field.type);
3561
              }
3562
              break;
3563
          }
3564
          iprot.readFieldEnd();
3565
        }
3566
      }
3567
      iprot.readStructEnd();
3568
      validate();
3569
    }
3570
 
3571
    public void write(TProtocol oprot) throws TException {
3572
      validate();
3573
 
3574
      oprot.writeStructBegin(STRUCT_DESC);
3575
      oprot.writeFieldBegin(ID_FIELD_DESC);
3576
      oprot.writeI64(this.id);
3577
      oprot.writeFieldEnd();
3578
      oprot.writeFieldStop();
3579
      oprot.writeStructEnd();
3580
    }
3581
 
3582
    @Override
3583
    public String toString() {
3584
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3585
      boolean first = true;
3586
 
3587
      sb.append("id:");
3588
      sb.append(this.id);
3589
      first = false;
3590
      sb.append(")");
3591
      return sb.toString();
3592
    }
3593
 
3594
    public void validate() throws TException {
3595
      // check for required fields
3596
    }
3597
 
3598
  }
3599
 
684 chandransh 3600
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3601
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3602
 
3603
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3604
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3605
 
3606
    private Transaction success;
3607
    private TransactionServiceException ex;
3608
 
3609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3610
    public enum _Fields implements TFieldIdEnum {
3611
      SUCCESS((short)0, "success"),
3612
      EX((short)1, "ex");
3613
 
3614
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3616
 
3617
      static {
3618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3619
          byId.put((int)field._thriftId, field);
3620
          byName.put(field.getFieldName(), field);
3621
        }
3622
      }
3623
 
3624
      /**
3625
       * Find the _Fields constant that matches fieldId, or null if its not found.
3626
       */
3627
      public static _Fields findByThriftId(int fieldId) {
3628
        return byId.get(fieldId);
3629
      }
3630
 
3631
      /**
3632
       * Find the _Fields constant that matches fieldId, throwing an exception
3633
       * if it is not found.
3634
       */
3635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3636
        _Fields fields = findByThriftId(fieldId);
3637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3638
        return fields;
3639
      }
3640
 
3641
      /**
3642
       * Find the _Fields constant that matches name, or null if its not found.
3643
       */
3644
      public static _Fields findByName(String name) {
3645
        return byName.get(name);
3646
      }
3647
 
3648
      private final short _thriftId;
3649
      private final String _fieldName;
3650
 
3651
      _Fields(short thriftId, String fieldName) {
3652
        _thriftId = thriftId;
3653
        _fieldName = fieldName;
3654
      }
3655
 
3656
      public short getThriftFieldId() {
3657
        return _thriftId;
3658
      }
3659
 
3660
      public String getFieldName() {
3661
        return _fieldName;
3662
      }
3663
    }
3664
 
3665
    // isset id assignments
3666
 
3667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3668
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3669
          new StructMetaData(TType.STRUCT, Transaction.class)));
3670
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3671
          new FieldValueMetaData(TType.STRUCT)));
3672
    }});
3673
 
3674
    static {
3675
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3676
    }
3677
 
3678
    public getTransaction_result() {
3679
    }
3680
 
3681
    public getTransaction_result(
3682
      Transaction success,
3683
      TransactionServiceException ex)
3684
    {
3685
      this();
3686
      this.success = success;
3687
      this.ex = ex;
3688
    }
3689
 
3690
    /**
3691
     * Performs a deep copy on <i>other</i>.
3692
     */
3693
    public getTransaction_result(getTransaction_result other) {
3694
      if (other.isSetSuccess()) {
3695
        this.success = new Transaction(other.success);
3696
      }
3697
      if (other.isSetEx()) {
3698
        this.ex = new TransactionServiceException(other.ex);
3699
      }
3700
    }
3701
 
3702
    public getTransaction_result deepCopy() {
3703
      return new getTransaction_result(this);
3704
    }
3705
 
3706
    @Deprecated
3707
    public getTransaction_result clone() {
3708
      return new getTransaction_result(this);
3709
    }
3710
 
3711
    public Transaction getSuccess() {
3712
      return this.success;
3713
    }
3714
 
3715
    public getTransaction_result setSuccess(Transaction success) {
3716
      this.success = success;
3717
      return this;
3718
    }
3719
 
3720
    public void unsetSuccess() {
3721
      this.success = null;
3722
    }
3723
 
3724
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3725
    public boolean isSetSuccess() {
3726
      return this.success != null;
3727
    }
3728
 
3729
    public void setSuccessIsSet(boolean value) {
3730
      if (!value) {
3731
        this.success = null;
3732
      }
3733
    }
3734
 
3735
    public TransactionServiceException getEx() {
3736
      return this.ex;
3737
    }
3738
 
3739
    public getTransaction_result setEx(TransactionServiceException ex) {
3740
      this.ex = ex;
3741
      return this;
3742
    }
3743
 
3744
    public void unsetEx() {
3745
      this.ex = null;
3746
    }
3747
 
3748
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3749
    public boolean isSetEx() {
3750
      return this.ex != null;
3751
    }
3752
 
3753
    public void setExIsSet(boolean value) {
3754
      if (!value) {
3755
        this.ex = null;
3756
      }
3757
    }
3758
 
3759
    public void setFieldValue(_Fields field, Object value) {
3760
      switch (field) {
3761
      case SUCCESS:
3762
        if (value == null) {
3763
          unsetSuccess();
3764
        } else {
3765
          setSuccess((Transaction)value);
3766
        }
3767
        break;
3768
 
3769
      case EX:
3770
        if (value == null) {
3771
          unsetEx();
3772
        } else {
3773
          setEx((TransactionServiceException)value);
3774
        }
3775
        break;
3776
 
3777
      }
3778
    }
3779
 
3780
    public void setFieldValue(int fieldID, Object value) {
3781
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3782
    }
3783
 
3784
    public Object getFieldValue(_Fields field) {
3785
      switch (field) {
3786
      case SUCCESS:
3787
        return getSuccess();
3788
 
3789
      case EX:
3790
        return getEx();
3791
 
3792
      }
3793
      throw new IllegalStateException();
3794
    }
3795
 
3796
    public Object getFieldValue(int fieldId) {
3797
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3798
    }
3799
 
3800
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3801
    public boolean isSet(_Fields field) {
3802
      switch (field) {
3803
      case SUCCESS:
3804
        return isSetSuccess();
3805
      case EX:
3806
        return isSetEx();
3807
      }
3808
      throw new IllegalStateException();
3809
    }
3810
 
3811
    public boolean isSet(int fieldID) {
3812
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3813
    }
3814
 
3815
    @Override
3816
    public boolean equals(Object that) {
3817
      if (that == null)
3818
        return false;
3819
      if (that instanceof getTransaction_result)
3820
        return this.equals((getTransaction_result)that);
3821
      return false;
3822
    }
3823
 
3824
    public boolean equals(getTransaction_result that) {
3825
      if (that == null)
3826
        return false;
3827
 
3828
      boolean this_present_success = true && this.isSetSuccess();
3829
      boolean that_present_success = true && that.isSetSuccess();
3830
      if (this_present_success || that_present_success) {
3831
        if (!(this_present_success && that_present_success))
3832
          return false;
3833
        if (!this.success.equals(that.success))
3834
          return false;
3835
      }
3836
 
3837
      boolean this_present_ex = true && this.isSetEx();
3838
      boolean that_present_ex = true && that.isSetEx();
3839
      if (this_present_ex || that_present_ex) {
3840
        if (!(this_present_ex && that_present_ex))
3841
          return false;
3842
        if (!this.ex.equals(that.ex))
3843
          return false;
3844
      }
3845
 
3846
      return true;
3847
    }
3848
 
3849
    @Override
3850
    public int hashCode() {
3851
      return 0;
3852
    }
3853
 
684 chandransh 3854
    public int compareTo(getTransaction_result other) {
3855
      if (!getClass().equals(other.getClass())) {
3856
        return getClass().getName().compareTo(other.getClass().getName());
3857
      }
3858
 
3859
      int lastComparison = 0;
3860
      getTransaction_result typedOther = (getTransaction_result)other;
3861
 
3862
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3863
      if (lastComparison != 0) {
3864
        return lastComparison;
3865
      }
3866
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3867
      if (lastComparison != 0) {
3868
        return lastComparison;
3869
      }
3870
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3871
      if (lastComparison != 0) {
3872
        return lastComparison;
3873
      }
3874
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3875
      if (lastComparison != 0) {
3876
        return lastComparison;
3877
      }
3878
      return 0;
3879
    }
3880
 
68 ashish 3881
    public void read(TProtocol iprot) throws TException {
3882
      TField field;
3883
      iprot.readStructBegin();
3884
      while (true)
3885
      {
3886
        field = iprot.readFieldBegin();
3887
        if (field.type == TType.STOP) { 
3888
          break;
3889
        }
3890
        _Fields fieldId = _Fields.findByThriftId(field.id);
3891
        if (fieldId == null) {
3892
          TProtocolUtil.skip(iprot, field.type);
3893
        } else {
3894
          switch (fieldId) {
3895
            case SUCCESS:
3896
              if (field.type == TType.STRUCT) {
3897
                this.success = new Transaction();
3898
                this.success.read(iprot);
3899
              } else { 
3900
                TProtocolUtil.skip(iprot, field.type);
3901
              }
3902
              break;
3903
            case EX:
3904
              if (field.type == TType.STRUCT) {
3905
                this.ex = new TransactionServiceException();
3906
                this.ex.read(iprot);
3907
              } else { 
3908
                TProtocolUtil.skip(iprot, field.type);
3909
              }
3910
              break;
3911
          }
3912
          iprot.readFieldEnd();
3913
        }
3914
      }
3915
      iprot.readStructEnd();
3916
      validate();
3917
    }
3918
 
3919
    public void write(TProtocol oprot) throws TException {
3920
      oprot.writeStructBegin(STRUCT_DESC);
3921
 
3922
      if (this.isSetSuccess()) {
3923
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3924
        this.success.write(oprot);
3925
        oprot.writeFieldEnd();
3926
      } else if (this.isSetEx()) {
3927
        oprot.writeFieldBegin(EX_FIELD_DESC);
3928
        this.ex.write(oprot);
3929
        oprot.writeFieldEnd();
3930
      }
3931
      oprot.writeFieldStop();
3932
      oprot.writeStructEnd();
3933
    }
3934
 
3935
    @Override
3936
    public String toString() {
3937
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3938
      boolean first = true;
3939
 
3940
      sb.append("success:");
3941
      if (this.success == null) {
3942
        sb.append("null");
3943
      } else {
3944
        sb.append(this.success);
3945
      }
3946
      first = false;
3947
      if (!first) sb.append(", ");
3948
      sb.append("ex:");
3949
      if (this.ex == null) {
3950
        sb.append("null");
3951
      } else {
3952
        sb.append(this.ex);
3953
      }
3954
      first = false;
3955
      sb.append(")");
3956
      return sb.toString();
3957
    }
3958
 
3959
    public void validate() throws TException {
3960
      // check for required fields
3961
    }
3962
 
3963
  }
3964
 
3965
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3966
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3967
 
3968
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3969
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3970
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3971
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3972
 
3973
    private long customerId;
132 ashish 3974
    private long from_date;
3975
    private long to_date;
68 ashish 3976
    private TransactionStatus status;
3977
 
3978
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3979
    public enum _Fields implements TFieldIdEnum {
3980
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3981
      FROM_DATE((short)2, "from_date"),
3982
      TO_DATE((short)3, "to_date"),
68 ashish 3983
      /**
3984
       * 
3985
       * @see TransactionStatus
3986
       */
3987
      STATUS((short)4, "status");
3988
 
3989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3991
 
3992
      static {
3993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3994
          byId.put((int)field._thriftId, field);
3995
          byName.put(field.getFieldName(), field);
3996
        }
3997
      }
3998
 
3999
      /**
4000
       * Find the _Fields constant that matches fieldId, or null if its not found.
4001
       */
4002
      public static _Fields findByThriftId(int fieldId) {
4003
        return byId.get(fieldId);
4004
      }
4005
 
4006
      /**
4007
       * Find the _Fields constant that matches fieldId, throwing an exception
4008
       * if it is not found.
4009
       */
4010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4011
        _Fields fields = findByThriftId(fieldId);
4012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4013
        return fields;
4014
      }
4015
 
4016
      /**
4017
       * Find the _Fields constant that matches name, or null if its not found.
4018
       */
4019
      public static _Fields findByName(String name) {
4020
        return byName.get(name);
4021
      }
4022
 
4023
      private final short _thriftId;
4024
      private final String _fieldName;
4025
 
4026
      _Fields(short thriftId, String fieldName) {
4027
        _thriftId = thriftId;
4028
        _fieldName = fieldName;
4029
      }
4030
 
4031
      public short getThriftFieldId() {
4032
        return _thriftId;
4033
      }
4034
 
4035
      public String getFieldName() {
4036
        return _fieldName;
4037
      }
4038
    }
4039
 
4040
    // isset id assignments
4041
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4042
    private static final int __FROM_DATE_ISSET_ID = 1;
4043
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4044
    private BitSet __isset_bit_vector = new BitSet(3);
4045
 
4046
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4047
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4048
          new FieldValueMetaData(TType.I64)));
132 ashish 4049
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4050
          new FieldValueMetaData(TType.I64)));
132 ashish 4051
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4052
          new FieldValueMetaData(TType.I64)));
4053
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4054
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4055
    }});
4056
 
4057
    static {
4058
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4059
    }
4060
 
4061
    public getTransactionsForCustomer_args() {
4062
    }
4063
 
4064
    public getTransactionsForCustomer_args(
4065
      long customerId,
132 ashish 4066
      long from_date,
4067
      long to_date,
68 ashish 4068
      TransactionStatus status)
4069
    {
4070
      this();
4071
      this.customerId = customerId;
4072
      setCustomerIdIsSet(true);
132 ashish 4073
      this.from_date = from_date;
4074
      setFrom_dateIsSet(true);
4075
      this.to_date = to_date;
4076
      setTo_dateIsSet(true);
68 ashish 4077
      this.status = status;
4078
    }
4079
 
4080
    /**
4081
     * Performs a deep copy on <i>other</i>.
4082
     */
4083
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4084
      __isset_bit_vector.clear();
4085
      __isset_bit_vector.or(other.__isset_bit_vector);
4086
      this.customerId = other.customerId;
132 ashish 4087
      this.from_date = other.from_date;
4088
      this.to_date = other.to_date;
68 ashish 4089
      if (other.isSetStatus()) {
4090
        this.status = other.status;
4091
      }
4092
    }
4093
 
4094
    public getTransactionsForCustomer_args deepCopy() {
4095
      return new getTransactionsForCustomer_args(this);
4096
    }
4097
 
4098
    @Deprecated
4099
    public getTransactionsForCustomer_args clone() {
4100
      return new getTransactionsForCustomer_args(this);
4101
    }
4102
 
4103
    public long getCustomerId() {
4104
      return this.customerId;
4105
    }
4106
 
4107
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4108
      this.customerId = customerId;
4109
      setCustomerIdIsSet(true);
4110
      return this;
4111
    }
4112
 
4113
    public void unsetCustomerId() {
4114
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4115
    }
4116
 
4117
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4118
    public boolean isSetCustomerId() {
4119
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4120
    }
4121
 
4122
    public void setCustomerIdIsSet(boolean value) {
4123
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4124
    }
4125
 
132 ashish 4126
    public long getFrom_date() {
4127
      return this.from_date;
68 ashish 4128
    }
4129
 
132 ashish 4130
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4131
      this.from_date = from_date;
4132
      setFrom_dateIsSet(true);
68 ashish 4133
      return this;
4134
    }
4135
 
132 ashish 4136
    public void unsetFrom_date() {
4137
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4138
    }
4139
 
132 ashish 4140
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4141
    public boolean isSetFrom_date() {
4142
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4143
    }
4144
 
132 ashish 4145
    public void setFrom_dateIsSet(boolean value) {
4146
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4147
    }
4148
 
132 ashish 4149
    public long getTo_date() {
4150
      return this.to_date;
68 ashish 4151
    }
4152
 
132 ashish 4153
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4154
      this.to_date = to_date;
4155
      setTo_dateIsSet(true);
68 ashish 4156
      return this;
4157
    }
4158
 
132 ashish 4159
    public void unsetTo_date() {
4160
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4161
    }
4162
 
132 ashish 4163
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4164
    public boolean isSetTo_date() {
4165
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4166
    }
4167
 
132 ashish 4168
    public void setTo_dateIsSet(boolean value) {
4169
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4170
    }
4171
 
4172
    /**
4173
     * 
4174
     * @see TransactionStatus
4175
     */
4176
    public TransactionStatus getStatus() {
4177
      return this.status;
4178
    }
4179
 
4180
    /**
4181
     * 
4182
     * @see TransactionStatus
4183
     */
4184
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4185
      this.status = status;
4186
      return this;
4187
    }
4188
 
4189
    public void unsetStatus() {
4190
      this.status = null;
4191
    }
4192
 
4193
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4194
    public boolean isSetStatus() {
4195
      return this.status != null;
4196
    }
4197
 
4198
    public void setStatusIsSet(boolean value) {
4199
      if (!value) {
4200
        this.status = null;
4201
      }
4202
    }
4203
 
4204
    public void setFieldValue(_Fields field, Object value) {
4205
      switch (field) {
4206
      case CUSTOMER_ID:
4207
        if (value == null) {
4208
          unsetCustomerId();
4209
        } else {
4210
          setCustomerId((Long)value);
4211
        }
4212
        break;
4213
 
132 ashish 4214
      case FROM_DATE:
68 ashish 4215
        if (value == null) {
132 ashish 4216
          unsetFrom_date();
68 ashish 4217
        } else {
132 ashish 4218
          setFrom_date((Long)value);
68 ashish 4219
        }
4220
        break;
4221
 
132 ashish 4222
      case TO_DATE:
68 ashish 4223
        if (value == null) {
132 ashish 4224
          unsetTo_date();
68 ashish 4225
        } else {
132 ashish 4226
          setTo_date((Long)value);
68 ashish 4227
        }
4228
        break;
4229
 
4230
      case STATUS:
4231
        if (value == null) {
4232
          unsetStatus();
4233
        } else {
4234
          setStatus((TransactionStatus)value);
4235
        }
4236
        break;
4237
 
4238
      }
4239
    }
4240
 
4241
    public void setFieldValue(int fieldID, Object value) {
4242
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4243
    }
4244
 
4245
    public Object getFieldValue(_Fields field) {
4246
      switch (field) {
4247
      case CUSTOMER_ID:
4248
        return new Long(getCustomerId());
4249
 
132 ashish 4250
      case FROM_DATE:
4251
        return new Long(getFrom_date());
68 ashish 4252
 
132 ashish 4253
      case TO_DATE:
4254
        return new Long(getTo_date());
68 ashish 4255
 
4256
      case STATUS:
4257
        return getStatus();
4258
 
4259
      }
4260
      throw new IllegalStateException();
4261
    }
4262
 
4263
    public Object getFieldValue(int fieldId) {
4264
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4265
    }
4266
 
4267
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4268
    public boolean isSet(_Fields field) {
4269
      switch (field) {
4270
      case CUSTOMER_ID:
4271
        return isSetCustomerId();
132 ashish 4272
      case FROM_DATE:
4273
        return isSetFrom_date();
4274
      case TO_DATE:
4275
        return isSetTo_date();
68 ashish 4276
      case STATUS:
4277
        return isSetStatus();
4278
      }
4279
      throw new IllegalStateException();
4280
    }
4281
 
4282
    public boolean isSet(int fieldID) {
4283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4284
    }
4285
 
4286
    @Override
4287
    public boolean equals(Object that) {
4288
      if (that == null)
4289
        return false;
4290
      if (that instanceof getTransactionsForCustomer_args)
4291
        return this.equals((getTransactionsForCustomer_args)that);
4292
      return false;
4293
    }
4294
 
4295
    public boolean equals(getTransactionsForCustomer_args that) {
4296
      if (that == null)
4297
        return false;
4298
 
4299
      boolean this_present_customerId = true;
4300
      boolean that_present_customerId = true;
4301
      if (this_present_customerId || that_present_customerId) {
4302
        if (!(this_present_customerId && that_present_customerId))
4303
          return false;
4304
        if (this.customerId != that.customerId)
4305
          return false;
4306
      }
4307
 
132 ashish 4308
      boolean this_present_from_date = true;
4309
      boolean that_present_from_date = true;
4310
      if (this_present_from_date || that_present_from_date) {
4311
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4312
          return false;
132 ashish 4313
        if (this.from_date != that.from_date)
68 ashish 4314
          return false;
4315
      }
4316
 
132 ashish 4317
      boolean this_present_to_date = true;
4318
      boolean that_present_to_date = true;
4319
      if (this_present_to_date || that_present_to_date) {
4320
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4321
          return false;
132 ashish 4322
        if (this.to_date != that.to_date)
68 ashish 4323
          return false;
4324
      }
4325
 
4326
      boolean this_present_status = true && this.isSetStatus();
4327
      boolean that_present_status = true && that.isSetStatus();
4328
      if (this_present_status || that_present_status) {
4329
        if (!(this_present_status && that_present_status))
4330
          return false;
4331
        if (!this.status.equals(that.status))
4332
          return false;
4333
      }
4334
 
4335
      return true;
4336
    }
4337
 
4338
    @Override
4339
    public int hashCode() {
4340
      return 0;
4341
    }
4342
 
4343
    public int compareTo(getTransactionsForCustomer_args other) {
4344
      if (!getClass().equals(other.getClass())) {
4345
        return getClass().getName().compareTo(other.getClass().getName());
4346
      }
4347
 
4348
      int lastComparison = 0;
4349
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4350
 
4351
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4352
      if (lastComparison != 0) {
4353
        return lastComparison;
4354
      }
4355
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4356
      if (lastComparison != 0) {
4357
        return lastComparison;
4358
      }
132 ashish 4359
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4360
      if (lastComparison != 0) {
4361
        return lastComparison;
4362
      }
132 ashish 4363
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4364
      if (lastComparison != 0) {
4365
        return lastComparison;
4366
      }
132 ashish 4367
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4368
      if (lastComparison != 0) {
4369
        return lastComparison;
4370
      }
132 ashish 4371
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4372
      if (lastComparison != 0) {
4373
        return lastComparison;
4374
      }
4375
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4376
      if (lastComparison != 0) {
4377
        return lastComparison;
4378
      }
4379
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4380
      if (lastComparison != 0) {
4381
        return lastComparison;
4382
      }
4383
      return 0;
4384
    }
4385
 
4386
    public void read(TProtocol iprot) throws TException {
4387
      TField field;
4388
      iprot.readStructBegin();
4389
      while (true)
4390
      {
4391
        field = iprot.readFieldBegin();
4392
        if (field.type == TType.STOP) { 
4393
          break;
4394
        }
4395
        _Fields fieldId = _Fields.findByThriftId(field.id);
4396
        if (fieldId == null) {
4397
          TProtocolUtil.skip(iprot, field.type);
4398
        } else {
4399
          switch (fieldId) {
4400
            case CUSTOMER_ID:
4401
              if (field.type == TType.I64) {
4402
                this.customerId = iprot.readI64();
4403
                setCustomerIdIsSet(true);
4404
              } else { 
4405
                TProtocolUtil.skip(iprot, field.type);
4406
              }
4407
              break;
132 ashish 4408
            case FROM_DATE:
68 ashish 4409
              if (field.type == TType.I64) {
132 ashish 4410
                this.from_date = iprot.readI64();
4411
                setFrom_dateIsSet(true);
68 ashish 4412
              } else { 
4413
                TProtocolUtil.skip(iprot, field.type);
4414
              }
4415
              break;
132 ashish 4416
            case TO_DATE:
68 ashish 4417
              if (field.type == TType.I64) {
132 ashish 4418
                this.to_date = iprot.readI64();
4419
                setTo_dateIsSet(true);
68 ashish 4420
              } else { 
4421
                TProtocolUtil.skip(iprot, field.type);
4422
              }
4423
              break;
4424
            case STATUS:
4425
              if (field.type == TType.I32) {
4426
                this.status = TransactionStatus.findByValue(iprot.readI32());
4427
              } else { 
4428
                TProtocolUtil.skip(iprot, field.type);
4429
              }
4430
              break;
4431
          }
4432
          iprot.readFieldEnd();
4433
        }
4434
      }
4435
      iprot.readStructEnd();
4436
      validate();
4437
    }
4438
 
4439
    public void write(TProtocol oprot) throws TException {
4440
      validate();
4441
 
4442
      oprot.writeStructBegin(STRUCT_DESC);
4443
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4444
      oprot.writeI64(this.customerId);
4445
      oprot.writeFieldEnd();
132 ashish 4446
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4447
      oprot.writeI64(this.from_date);
68 ashish 4448
      oprot.writeFieldEnd();
132 ashish 4449
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4450
      oprot.writeI64(this.to_date);
68 ashish 4451
      oprot.writeFieldEnd();
4452
      if (this.status != null) {
4453
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4454
        oprot.writeI32(this.status.getValue());
4455
        oprot.writeFieldEnd();
4456
      }
4457
      oprot.writeFieldStop();
4458
      oprot.writeStructEnd();
4459
    }
4460
 
4461
    @Override
4462
    public String toString() {
4463
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4464
      boolean first = true;
4465
 
4466
      sb.append("customerId:");
4467
      sb.append(this.customerId);
4468
      first = false;
4469
      if (!first) sb.append(", ");
132 ashish 4470
      sb.append("from_date:");
4471
      sb.append(this.from_date);
68 ashish 4472
      first = false;
4473
      if (!first) sb.append(", ");
132 ashish 4474
      sb.append("to_date:");
4475
      sb.append(this.to_date);
68 ashish 4476
      first = false;
4477
      if (!first) sb.append(", ");
4478
      sb.append("status:");
4479
      if (this.status == null) {
4480
        sb.append("null");
4481
      } else {
4482
        String status_name = status.name();
4483
        if (status_name != null) {
4484
          sb.append(status_name);
4485
          sb.append(" (");
4486
        }
4487
        sb.append(this.status);
4488
        if (status_name != null) {
4489
          sb.append(")");
4490
        }
4491
      }
4492
      first = false;
4493
      sb.append(")");
4494
      return sb.toString();
4495
    }
4496
 
4497
    public void validate() throws TException {
4498
      // check for required fields
4499
    }
4500
 
4501
  }
4502
 
684 chandransh 4503
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4504
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4505
 
4506
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4507
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4508
 
4509
    private List<Transaction> success;
4510
    private TransactionServiceException ex;
4511
 
4512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4513
    public enum _Fields implements TFieldIdEnum {
4514
      SUCCESS((short)0, "success"),
4515
      EX((short)1, "ex");
4516
 
4517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4519
 
4520
      static {
4521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4522
          byId.put((int)field._thriftId, field);
4523
          byName.put(field.getFieldName(), field);
4524
        }
4525
      }
4526
 
4527
      /**
4528
       * Find the _Fields constant that matches fieldId, or null if its not found.
4529
       */
4530
      public static _Fields findByThriftId(int fieldId) {
4531
        return byId.get(fieldId);
4532
      }
4533
 
4534
      /**
4535
       * Find the _Fields constant that matches fieldId, throwing an exception
4536
       * if it is not found.
4537
       */
4538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4539
        _Fields fields = findByThriftId(fieldId);
4540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4541
        return fields;
4542
      }
4543
 
4544
      /**
4545
       * Find the _Fields constant that matches name, or null if its not found.
4546
       */
4547
      public static _Fields findByName(String name) {
4548
        return byName.get(name);
4549
      }
4550
 
4551
      private final short _thriftId;
4552
      private final String _fieldName;
4553
 
4554
      _Fields(short thriftId, String fieldName) {
4555
        _thriftId = thriftId;
4556
        _fieldName = fieldName;
4557
      }
4558
 
4559
      public short getThriftFieldId() {
4560
        return _thriftId;
4561
      }
4562
 
4563
      public String getFieldName() {
4564
        return _fieldName;
4565
      }
4566
    }
4567
 
4568
    // isset id assignments
4569
 
4570
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4571
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4572
          new ListMetaData(TType.LIST, 
4573
              new StructMetaData(TType.STRUCT, Transaction.class))));
4574
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4575
          new FieldValueMetaData(TType.STRUCT)));
4576
    }});
4577
 
4578
    static {
4579
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4580
    }
4581
 
4582
    public getTransactionsForCustomer_result() {
4583
    }
4584
 
4585
    public getTransactionsForCustomer_result(
4586
      List<Transaction> success,
4587
      TransactionServiceException ex)
4588
    {
4589
      this();
4590
      this.success = success;
4591
      this.ex = ex;
4592
    }
4593
 
4594
    /**
4595
     * Performs a deep copy on <i>other</i>.
4596
     */
4597
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4598
      if (other.isSetSuccess()) {
4599
        List<Transaction> __this__success = new ArrayList<Transaction>();
4600
        for (Transaction other_element : other.success) {
4601
          __this__success.add(new Transaction(other_element));
4602
        }
4603
        this.success = __this__success;
4604
      }
4605
      if (other.isSetEx()) {
4606
        this.ex = new TransactionServiceException(other.ex);
4607
      }
4608
    }
4609
 
4610
    public getTransactionsForCustomer_result deepCopy() {
4611
      return new getTransactionsForCustomer_result(this);
4612
    }
4613
 
4614
    @Deprecated
4615
    public getTransactionsForCustomer_result clone() {
4616
      return new getTransactionsForCustomer_result(this);
4617
    }
4618
 
4619
    public int getSuccessSize() {
4620
      return (this.success == null) ? 0 : this.success.size();
4621
    }
4622
 
4623
    public java.util.Iterator<Transaction> getSuccessIterator() {
4624
      return (this.success == null) ? null : this.success.iterator();
4625
    }
4626
 
4627
    public void addToSuccess(Transaction elem) {
4628
      if (this.success == null) {
4629
        this.success = new ArrayList<Transaction>();
4630
      }
4631
      this.success.add(elem);
4632
    }
4633
 
4634
    public List<Transaction> getSuccess() {
4635
      return this.success;
4636
    }
4637
 
4638
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4639
      this.success = success;
4640
      return this;
4641
    }
4642
 
4643
    public void unsetSuccess() {
4644
      this.success = null;
4645
    }
4646
 
4647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4648
    public boolean isSetSuccess() {
4649
      return this.success != null;
4650
    }
4651
 
4652
    public void setSuccessIsSet(boolean value) {
4653
      if (!value) {
4654
        this.success = null;
4655
      }
4656
    }
4657
 
4658
    public TransactionServiceException getEx() {
4659
      return this.ex;
4660
    }
4661
 
4662
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4663
      this.ex = ex;
4664
      return this;
4665
    }
4666
 
4667
    public void unsetEx() {
4668
      this.ex = null;
4669
    }
4670
 
4671
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4672
    public boolean isSetEx() {
4673
      return this.ex != null;
4674
    }
4675
 
4676
    public void setExIsSet(boolean value) {
4677
      if (!value) {
4678
        this.ex = null;
4679
      }
4680
    }
4681
 
4682
    public void setFieldValue(_Fields field, Object value) {
4683
      switch (field) {
4684
      case SUCCESS:
4685
        if (value == null) {
4686
          unsetSuccess();
4687
        } else {
4688
          setSuccess((List<Transaction>)value);
4689
        }
4690
        break;
4691
 
4692
      case EX:
4693
        if (value == null) {
4694
          unsetEx();
4695
        } else {
4696
          setEx((TransactionServiceException)value);
4697
        }
4698
        break;
4699
 
4700
      }
4701
    }
4702
 
4703
    public void setFieldValue(int fieldID, Object value) {
4704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4705
    }
4706
 
4707
    public Object getFieldValue(_Fields field) {
4708
      switch (field) {
4709
      case SUCCESS:
4710
        return getSuccess();
4711
 
4712
      case EX:
4713
        return getEx();
4714
 
4715
      }
4716
      throw new IllegalStateException();
4717
    }
4718
 
4719
    public Object getFieldValue(int fieldId) {
4720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4721
    }
4722
 
4723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4724
    public boolean isSet(_Fields field) {
4725
      switch (field) {
4726
      case SUCCESS:
4727
        return isSetSuccess();
4728
      case EX:
4729
        return isSetEx();
4730
      }
4731
      throw new IllegalStateException();
4732
    }
4733
 
4734
    public boolean isSet(int fieldID) {
4735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4736
    }
4737
 
4738
    @Override
4739
    public boolean equals(Object that) {
4740
      if (that == null)
4741
        return false;
4742
      if (that instanceof getTransactionsForCustomer_result)
4743
        return this.equals((getTransactionsForCustomer_result)that);
4744
      return false;
4745
    }
4746
 
4747
    public boolean equals(getTransactionsForCustomer_result that) {
4748
      if (that == null)
4749
        return false;
4750
 
4751
      boolean this_present_success = true && this.isSetSuccess();
4752
      boolean that_present_success = true && that.isSetSuccess();
4753
      if (this_present_success || that_present_success) {
4754
        if (!(this_present_success && that_present_success))
4755
          return false;
4756
        if (!this.success.equals(that.success))
4757
          return false;
4758
      }
4759
 
4760
      boolean this_present_ex = true && this.isSetEx();
4761
      boolean that_present_ex = true && that.isSetEx();
4762
      if (this_present_ex || that_present_ex) {
4763
        if (!(this_present_ex && that_present_ex))
4764
          return false;
4765
        if (!this.ex.equals(that.ex))
4766
          return false;
4767
      }
4768
 
4769
      return true;
4770
    }
4771
 
4772
    @Override
4773
    public int hashCode() {
4774
      return 0;
4775
    }
4776
 
684 chandransh 4777
    public int compareTo(getTransactionsForCustomer_result other) {
4778
      if (!getClass().equals(other.getClass())) {
4779
        return getClass().getName().compareTo(other.getClass().getName());
4780
      }
4781
 
4782
      int lastComparison = 0;
4783
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4784
 
4785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4786
      if (lastComparison != 0) {
4787
        return lastComparison;
4788
      }
4789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4790
      if (lastComparison != 0) {
4791
        return lastComparison;
4792
      }
4793
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4794
      if (lastComparison != 0) {
4795
        return lastComparison;
4796
      }
4797
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4798
      if (lastComparison != 0) {
4799
        return lastComparison;
4800
      }
4801
      return 0;
4802
    }
4803
 
68 ashish 4804
    public void read(TProtocol iprot) throws TException {
4805
      TField field;
4806
      iprot.readStructBegin();
4807
      while (true)
4808
      {
4809
        field = iprot.readFieldBegin();
4810
        if (field.type == TType.STOP) { 
4811
          break;
4812
        }
4813
        _Fields fieldId = _Fields.findByThriftId(field.id);
4814
        if (fieldId == null) {
4815
          TProtocolUtil.skip(iprot, field.type);
4816
        } else {
4817
          switch (fieldId) {
4818
            case SUCCESS:
4819
              if (field.type == TType.LIST) {
4820
                {
684 chandransh 4821
                  TList _list8 = iprot.readListBegin();
4822
                  this.success = new ArrayList<Transaction>(_list8.size);
4823
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4824
                  {
684 chandransh 4825
                    Transaction _elem10;
4826
                    _elem10 = new Transaction();
4827
                    _elem10.read(iprot);
4828
                    this.success.add(_elem10);
68 ashish 4829
                  }
4830
                  iprot.readListEnd();
4831
                }
4832
              } else { 
4833
                TProtocolUtil.skip(iprot, field.type);
4834
              }
4835
              break;
4836
            case EX:
4837
              if (field.type == TType.STRUCT) {
4838
                this.ex = new TransactionServiceException();
4839
                this.ex.read(iprot);
4840
              } else { 
4841
                TProtocolUtil.skip(iprot, field.type);
4842
              }
4843
              break;
4844
          }
4845
          iprot.readFieldEnd();
4846
        }
4847
      }
4848
      iprot.readStructEnd();
4849
      validate();
4850
    }
4851
 
4852
    public void write(TProtocol oprot) throws TException {
4853
      oprot.writeStructBegin(STRUCT_DESC);
4854
 
4855
      if (this.isSetSuccess()) {
4856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4857
        {
4858
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4859
          for (Transaction _iter11 : this.success)
68 ashish 4860
          {
684 chandransh 4861
            _iter11.write(oprot);
68 ashish 4862
          }
4863
          oprot.writeListEnd();
4864
        }
4865
        oprot.writeFieldEnd();
4866
      } else if (this.isSetEx()) {
4867
        oprot.writeFieldBegin(EX_FIELD_DESC);
4868
        this.ex.write(oprot);
4869
        oprot.writeFieldEnd();
4870
      }
4871
      oprot.writeFieldStop();
4872
      oprot.writeStructEnd();
4873
    }
4874
 
4875
    @Override
4876
    public String toString() {
4877
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4878
      boolean first = true;
4879
 
4880
      sb.append("success:");
4881
      if (this.success == null) {
4882
        sb.append("null");
4883
      } else {
4884
        sb.append(this.success);
4885
      }
4886
      first = false;
4887
      if (!first) sb.append(", ");
4888
      sb.append("ex:");
4889
      if (this.ex == null) {
4890
        sb.append("null");
4891
      } else {
4892
        sb.append(this.ex);
4893
      }
4894
      first = false;
4895
      sb.append(")");
4896
      return sb.toString();
4897
    }
4898
 
4899
    public void validate() throws TException {
4900
      // check for required fields
4901
    }
4902
 
4903
  }
4904
 
132 ashish 4905
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4906
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4907
 
4908
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4909
 
4910
    private long shoppingCartId;
4911
 
4912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4913
    public enum _Fields implements TFieldIdEnum {
4914
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4915
 
4916
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4917
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4918
 
4919
      static {
4920
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4921
          byId.put((int)field._thriftId, field);
4922
          byName.put(field.getFieldName(), field);
4923
        }
4924
      }
4925
 
4926
      /**
4927
       * Find the _Fields constant that matches fieldId, or null if its not found.
4928
       */
4929
      public static _Fields findByThriftId(int fieldId) {
4930
        return byId.get(fieldId);
4931
      }
4932
 
4933
      /**
4934
       * Find the _Fields constant that matches fieldId, throwing an exception
4935
       * if it is not found.
4936
       */
4937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4938
        _Fields fields = findByThriftId(fieldId);
4939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4940
        return fields;
4941
      }
4942
 
4943
      /**
4944
       * Find the _Fields constant that matches name, or null if its not found.
4945
       */
4946
      public static _Fields findByName(String name) {
4947
        return byName.get(name);
4948
      }
4949
 
4950
      private final short _thriftId;
4951
      private final String _fieldName;
4952
 
4953
      _Fields(short thriftId, String fieldName) {
4954
        _thriftId = thriftId;
4955
        _fieldName = fieldName;
4956
      }
4957
 
4958
      public short getThriftFieldId() {
4959
        return _thriftId;
4960
      }
4961
 
4962
      public String getFieldName() {
4963
        return _fieldName;
4964
      }
4965
    }
4966
 
4967
    // isset id assignments
4968
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4969
    private BitSet __isset_bit_vector = new BitSet(1);
4970
 
4971
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4972
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4973
          new FieldValueMetaData(TType.I64)));
4974
    }});
4975
 
4976
    static {
4977
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4978
    }
4979
 
4980
    public getTransactionsForShoppingCartId_args() {
4981
    }
4982
 
4983
    public getTransactionsForShoppingCartId_args(
4984
      long shoppingCartId)
4985
    {
4986
      this();
4987
      this.shoppingCartId = shoppingCartId;
4988
      setShoppingCartIdIsSet(true);
4989
    }
4990
 
4991
    /**
4992
     * Performs a deep copy on <i>other</i>.
4993
     */
4994
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4995
      __isset_bit_vector.clear();
4996
      __isset_bit_vector.or(other.__isset_bit_vector);
4997
      this.shoppingCartId = other.shoppingCartId;
4998
    }
4999
 
5000
    public getTransactionsForShoppingCartId_args deepCopy() {
5001
      return new getTransactionsForShoppingCartId_args(this);
5002
    }
5003
 
5004
    @Deprecated
5005
    public getTransactionsForShoppingCartId_args clone() {
5006
      return new getTransactionsForShoppingCartId_args(this);
5007
    }
5008
 
5009
    public long getShoppingCartId() {
5010
      return this.shoppingCartId;
5011
    }
5012
 
5013
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5014
      this.shoppingCartId = shoppingCartId;
5015
      setShoppingCartIdIsSet(true);
5016
      return this;
5017
    }
5018
 
5019
    public void unsetShoppingCartId() {
5020
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5021
    }
5022
 
5023
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5024
    public boolean isSetShoppingCartId() {
5025
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5026
    }
5027
 
5028
    public void setShoppingCartIdIsSet(boolean value) {
5029
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5030
    }
5031
 
5032
    public void setFieldValue(_Fields field, Object value) {
5033
      switch (field) {
5034
      case SHOPPING_CART_ID:
5035
        if (value == null) {
5036
          unsetShoppingCartId();
5037
        } else {
5038
          setShoppingCartId((Long)value);
5039
        }
5040
        break;
5041
 
5042
      }
5043
    }
5044
 
5045
    public void setFieldValue(int fieldID, Object value) {
5046
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5047
    }
5048
 
5049
    public Object getFieldValue(_Fields field) {
5050
      switch (field) {
5051
      case SHOPPING_CART_ID:
5052
        return new Long(getShoppingCartId());
5053
 
5054
      }
5055
      throw new IllegalStateException();
5056
    }
5057
 
5058
    public Object getFieldValue(int fieldId) {
5059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5060
    }
5061
 
5062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5063
    public boolean isSet(_Fields field) {
5064
      switch (field) {
5065
      case SHOPPING_CART_ID:
5066
        return isSetShoppingCartId();
5067
      }
5068
      throw new IllegalStateException();
5069
    }
5070
 
5071
    public boolean isSet(int fieldID) {
5072
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5073
    }
5074
 
5075
    @Override
5076
    public boolean equals(Object that) {
5077
      if (that == null)
5078
        return false;
5079
      if (that instanceof getTransactionsForShoppingCartId_args)
5080
        return this.equals((getTransactionsForShoppingCartId_args)that);
5081
      return false;
5082
    }
5083
 
5084
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5085
      if (that == null)
5086
        return false;
5087
 
5088
      boolean this_present_shoppingCartId = true;
5089
      boolean that_present_shoppingCartId = true;
5090
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5091
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5092
          return false;
5093
        if (this.shoppingCartId != that.shoppingCartId)
5094
          return false;
5095
      }
5096
 
5097
      return true;
5098
    }
5099
 
5100
    @Override
5101
    public int hashCode() {
5102
      return 0;
5103
    }
5104
 
5105
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5106
      if (!getClass().equals(other.getClass())) {
5107
        return getClass().getName().compareTo(other.getClass().getName());
5108
      }
5109
 
5110
      int lastComparison = 0;
5111
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5112
 
5113
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5114
      if (lastComparison != 0) {
5115
        return lastComparison;
5116
      }
5117
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5118
      if (lastComparison != 0) {
5119
        return lastComparison;
5120
      }
5121
      return 0;
5122
    }
5123
 
5124
    public void read(TProtocol iprot) throws TException {
5125
      TField field;
5126
      iprot.readStructBegin();
5127
      while (true)
5128
      {
5129
        field = iprot.readFieldBegin();
5130
        if (field.type == TType.STOP) { 
5131
          break;
5132
        }
5133
        _Fields fieldId = _Fields.findByThriftId(field.id);
5134
        if (fieldId == null) {
5135
          TProtocolUtil.skip(iprot, field.type);
5136
        } else {
5137
          switch (fieldId) {
5138
            case SHOPPING_CART_ID:
5139
              if (field.type == TType.I64) {
5140
                this.shoppingCartId = iprot.readI64();
5141
                setShoppingCartIdIsSet(true);
5142
              } else { 
5143
                TProtocolUtil.skip(iprot, field.type);
5144
              }
5145
              break;
5146
          }
5147
          iprot.readFieldEnd();
5148
        }
5149
      }
5150
      iprot.readStructEnd();
5151
      validate();
5152
    }
5153
 
5154
    public void write(TProtocol oprot) throws TException {
5155
      validate();
5156
 
5157
      oprot.writeStructBegin(STRUCT_DESC);
5158
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5159
      oprot.writeI64(this.shoppingCartId);
5160
      oprot.writeFieldEnd();
5161
      oprot.writeFieldStop();
5162
      oprot.writeStructEnd();
5163
    }
5164
 
5165
    @Override
5166
    public String toString() {
5167
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5168
      boolean first = true;
5169
 
5170
      sb.append("shoppingCartId:");
5171
      sb.append(this.shoppingCartId);
5172
      first = false;
5173
      sb.append(")");
5174
      return sb.toString();
5175
    }
5176
 
5177
    public void validate() throws TException {
5178
      // check for required fields
5179
    }
5180
 
5181
  }
5182
 
684 chandransh 5183
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5184
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5185
 
5186
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5187
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5188
 
5189
    private List<Transaction> success;
5190
    private TransactionServiceException ex;
5191
 
5192
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5193
    public enum _Fields implements TFieldIdEnum {
5194
      SUCCESS((short)0, "success"),
5195
      EX((short)1, "ex");
5196
 
5197
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5198
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5199
 
5200
      static {
5201
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5202
          byId.put((int)field._thriftId, field);
5203
          byName.put(field.getFieldName(), field);
5204
        }
5205
      }
5206
 
5207
      /**
5208
       * Find the _Fields constant that matches fieldId, or null if its not found.
5209
       */
5210
      public static _Fields findByThriftId(int fieldId) {
5211
        return byId.get(fieldId);
5212
      }
5213
 
5214
      /**
5215
       * Find the _Fields constant that matches fieldId, throwing an exception
5216
       * if it is not found.
5217
       */
5218
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5219
        _Fields fields = findByThriftId(fieldId);
5220
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5221
        return fields;
5222
      }
5223
 
5224
      /**
5225
       * Find the _Fields constant that matches name, or null if its not found.
5226
       */
5227
      public static _Fields findByName(String name) {
5228
        return byName.get(name);
5229
      }
5230
 
5231
      private final short _thriftId;
5232
      private final String _fieldName;
5233
 
5234
      _Fields(short thriftId, String fieldName) {
5235
        _thriftId = thriftId;
5236
        _fieldName = fieldName;
5237
      }
5238
 
5239
      public short getThriftFieldId() {
5240
        return _thriftId;
5241
      }
5242
 
5243
      public String getFieldName() {
5244
        return _fieldName;
5245
      }
5246
    }
5247
 
5248
    // isset id assignments
5249
 
5250
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5251
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5252
          new ListMetaData(TType.LIST, 
5253
              new StructMetaData(TType.STRUCT, Transaction.class))));
5254
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5255
          new FieldValueMetaData(TType.STRUCT)));
5256
    }});
5257
 
5258
    static {
5259
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5260
    }
5261
 
5262
    public getTransactionsForShoppingCartId_result() {
5263
    }
5264
 
5265
    public getTransactionsForShoppingCartId_result(
5266
      List<Transaction> success,
5267
      TransactionServiceException ex)
5268
    {
5269
      this();
5270
      this.success = success;
5271
      this.ex = ex;
5272
    }
5273
 
5274
    /**
5275
     * Performs a deep copy on <i>other</i>.
5276
     */
5277
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5278
      if (other.isSetSuccess()) {
5279
        List<Transaction> __this__success = new ArrayList<Transaction>();
5280
        for (Transaction other_element : other.success) {
5281
          __this__success.add(new Transaction(other_element));
5282
        }
5283
        this.success = __this__success;
5284
      }
5285
      if (other.isSetEx()) {
5286
        this.ex = new TransactionServiceException(other.ex);
5287
      }
5288
    }
5289
 
5290
    public getTransactionsForShoppingCartId_result deepCopy() {
5291
      return new getTransactionsForShoppingCartId_result(this);
5292
    }
5293
 
5294
    @Deprecated
5295
    public getTransactionsForShoppingCartId_result clone() {
5296
      return new getTransactionsForShoppingCartId_result(this);
5297
    }
5298
 
5299
    public int getSuccessSize() {
5300
      return (this.success == null) ? 0 : this.success.size();
5301
    }
5302
 
5303
    public java.util.Iterator<Transaction> getSuccessIterator() {
5304
      return (this.success == null) ? null : this.success.iterator();
5305
    }
5306
 
5307
    public void addToSuccess(Transaction elem) {
5308
      if (this.success == null) {
5309
        this.success = new ArrayList<Transaction>();
5310
      }
5311
      this.success.add(elem);
5312
    }
5313
 
5314
    public List<Transaction> getSuccess() {
5315
      return this.success;
5316
    }
5317
 
5318
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5319
      this.success = success;
5320
      return this;
5321
    }
5322
 
5323
    public void unsetSuccess() {
5324
      this.success = null;
5325
    }
5326
 
5327
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5328
    public boolean isSetSuccess() {
5329
      return this.success != null;
5330
    }
5331
 
5332
    public void setSuccessIsSet(boolean value) {
5333
      if (!value) {
5334
        this.success = null;
5335
      }
5336
    }
5337
 
5338
    public TransactionServiceException getEx() {
5339
      return this.ex;
5340
    }
5341
 
5342
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5343
      this.ex = ex;
5344
      return this;
5345
    }
5346
 
5347
    public void unsetEx() {
5348
      this.ex = null;
5349
    }
5350
 
5351
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5352
    public boolean isSetEx() {
5353
      return this.ex != null;
5354
    }
5355
 
5356
    public void setExIsSet(boolean value) {
5357
      if (!value) {
5358
        this.ex = null;
5359
      }
5360
    }
5361
 
5362
    public void setFieldValue(_Fields field, Object value) {
5363
      switch (field) {
5364
      case SUCCESS:
5365
        if (value == null) {
5366
          unsetSuccess();
5367
        } else {
5368
          setSuccess((List<Transaction>)value);
5369
        }
5370
        break;
5371
 
5372
      case EX:
5373
        if (value == null) {
5374
          unsetEx();
5375
        } else {
5376
          setEx((TransactionServiceException)value);
5377
        }
5378
        break;
5379
 
5380
      }
5381
    }
5382
 
5383
    public void setFieldValue(int fieldID, Object value) {
5384
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5385
    }
5386
 
5387
    public Object getFieldValue(_Fields field) {
5388
      switch (field) {
5389
      case SUCCESS:
5390
        return getSuccess();
5391
 
5392
      case EX:
5393
        return getEx();
5394
 
5395
      }
5396
      throw new IllegalStateException();
5397
    }
5398
 
5399
    public Object getFieldValue(int fieldId) {
5400
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5401
    }
5402
 
5403
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5404
    public boolean isSet(_Fields field) {
5405
      switch (field) {
5406
      case SUCCESS:
5407
        return isSetSuccess();
5408
      case EX:
5409
        return isSetEx();
5410
      }
5411
      throw new IllegalStateException();
5412
    }
5413
 
5414
    public boolean isSet(int fieldID) {
5415
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5416
    }
5417
 
5418
    @Override
5419
    public boolean equals(Object that) {
5420
      if (that == null)
5421
        return false;
5422
      if (that instanceof getTransactionsForShoppingCartId_result)
5423
        return this.equals((getTransactionsForShoppingCartId_result)that);
5424
      return false;
5425
    }
5426
 
5427
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5428
      if (that == null)
5429
        return false;
5430
 
5431
      boolean this_present_success = true && this.isSetSuccess();
5432
      boolean that_present_success = true && that.isSetSuccess();
5433
      if (this_present_success || that_present_success) {
5434
        if (!(this_present_success && that_present_success))
5435
          return false;
5436
        if (!this.success.equals(that.success))
5437
          return false;
5438
      }
5439
 
5440
      boolean this_present_ex = true && this.isSetEx();
5441
      boolean that_present_ex = true && that.isSetEx();
5442
      if (this_present_ex || that_present_ex) {
5443
        if (!(this_present_ex && that_present_ex))
5444
          return false;
5445
        if (!this.ex.equals(that.ex))
5446
          return false;
5447
      }
5448
 
5449
      return true;
5450
    }
5451
 
5452
    @Override
5453
    public int hashCode() {
5454
      return 0;
5455
    }
5456
 
684 chandransh 5457
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5458
      if (!getClass().equals(other.getClass())) {
5459
        return getClass().getName().compareTo(other.getClass().getName());
5460
      }
5461
 
5462
      int lastComparison = 0;
5463
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5464
 
5465
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5466
      if (lastComparison != 0) {
5467
        return lastComparison;
5468
      }
5469
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5470
      if (lastComparison != 0) {
5471
        return lastComparison;
5472
      }
5473
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5474
      if (lastComparison != 0) {
5475
        return lastComparison;
5476
      }
5477
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5478
      if (lastComparison != 0) {
5479
        return lastComparison;
5480
      }
5481
      return 0;
5482
    }
5483
 
132 ashish 5484
    public void read(TProtocol iprot) throws TException {
5485
      TField field;
5486
      iprot.readStructBegin();
5487
      while (true)
5488
      {
5489
        field = iprot.readFieldBegin();
5490
        if (field.type == TType.STOP) { 
5491
          break;
5492
        }
5493
        _Fields fieldId = _Fields.findByThriftId(field.id);
5494
        if (fieldId == null) {
5495
          TProtocolUtil.skip(iprot, field.type);
5496
        } else {
5497
          switch (fieldId) {
5498
            case SUCCESS:
5499
              if (field.type == TType.LIST) {
5500
                {
684 chandransh 5501
                  TList _list12 = iprot.readListBegin();
5502
                  this.success = new ArrayList<Transaction>(_list12.size);
5503
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5504
                  {
684 chandransh 5505
                    Transaction _elem14;
5506
                    _elem14 = new Transaction();
5507
                    _elem14.read(iprot);
5508
                    this.success.add(_elem14);
132 ashish 5509
                  }
5510
                  iprot.readListEnd();
5511
                }
5512
              } else { 
5513
                TProtocolUtil.skip(iprot, field.type);
5514
              }
5515
              break;
5516
            case EX:
5517
              if (field.type == TType.STRUCT) {
5518
                this.ex = new TransactionServiceException();
5519
                this.ex.read(iprot);
5520
              } else { 
5521
                TProtocolUtil.skip(iprot, field.type);
5522
              }
5523
              break;
5524
          }
5525
          iprot.readFieldEnd();
5526
        }
5527
      }
5528
      iprot.readStructEnd();
5529
      validate();
5530
    }
5531
 
5532
    public void write(TProtocol oprot) throws TException {
5533
      oprot.writeStructBegin(STRUCT_DESC);
5534
 
5535
      if (this.isSetSuccess()) {
5536
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5537
        {
5538
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5539
          for (Transaction _iter15 : this.success)
132 ashish 5540
          {
684 chandransh 5541
            _iter15.write(oprot);
132 ashish 5542
          }
5543
          oprot.writeListEnd();
5544
        }
5545
        oprot.writeFieldEnd();
5546
      } else if (this.isSetEx()) {
5547
        oprot.writeFieldBegin(EX_FIELD_DESC);
5548
        this.ex.write(oprot);
5549
        oprot.writeFieldEnd();
5550
      }
5551
      oprot.writeFieldStop();
5552
      oprot.writeStructEnd();
5553
    }
5554
 
5555
    @Override
5556
    public String toString() {
5557
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5558
      boolean first = true;
5559
 
5560
      sb.append("success:");
5561
      if (this.success == null) {
5562
        sb.append("null");
5563
      } else {
5564
        sb.append(this.success);
5565
      }
5566
      first = false;
5567
      if (!first) sb.append(", ");
5568
      sb.append("ex:");
5569
      if (this.ex == null) {
5570
        sb.append("null");
5571
      } else {
5572
        sb.append(this.ex);
5573
      }
5574
      first = false;
5575
      sb.append(")");
5576
      return sb.toString();
5577
    }
5578
 
5579
    public void validate() throws TException {
5580
      // check for required fields
5581
    }
5582
 
5583
  }
5584
 
68 ashish 5585
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5586
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5587
 
5588
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5589
 
5590
    private long transactionId;
5591
 
5592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5593
    public enum _Fields implements TFieldIdEnum {
5594
      TRANSACTION_ID((short)1, "transactionId");
5595
 
5596
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5597
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5598
 
5599
      static {
5600
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5601
          byId.put((int)field._thriftId, field);
5602
          byName.put(field.getFieldName(), field);
5603
        }
5604
      }
5605
 
5606
      /**
5607
       * Find the _Fields constant that matches fieldId, or null if its not found.
5608
       */
5609
      public static _Fields findByThriftId(int fieldId) {
5610
        return byId.get(fieldId);
5611
      }
5612
 
5613
      /**
5614
       * Find the _Fields constant that matches fieldId, throwing an exception
5615
       * if it is not found.
5616
       */
5617
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5618
        _Fields fields = findByThriftId(fieldId);
5619
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5620
        return fields;
5621
      }
5622
 
5623
      /**
5624
       * Find the _Fields constant that matches name, or null if its not found.
5625
       */
5626
      public static _Fields findByName(String name) {
5627
        return byName.get(name);
5628
      }
5629
 
5630
      private final short _thriftId;
5631
      private final String _fieldName;
5632
 
5633
      _Fields(short thriftId, String fieldName) {
5634
        _thriftId = thriftId;
5635
        _fieldName = fieldName;
5636
      }
5637
 
5638
      public short getThriftFieldId() {
5639
        return _thriftId;
5640
      }
5641
 
5642
      public String getFieldName() {
5643
        return _fieldName;
5644
      }
5645
    }
5646
 
5647
    // isset id assignments
5648
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5649
    private BitSet __isset_bit_vector = new BitSet(1);
5650
 
5651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5652
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5653
          new FieldValueMetaData(TType.I64)));
5654
    }});
5655
 
5656
    static {
5657
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5658
    }
5659
 
5660
    public getTransactionStatus_args() {
5661
    }
5662
 
5663
    public getTransactionStatus_args(
5664
      long transactionId)
5665
    {
5666
      this();
5667
      this.transactionId = transactionId;
5668
      setTransactionIdIsSet(true);
5669
    }
5670
 
5671
    /**
5672
     * Performs a deep copy on <i>other</i>.
5673
     */
5674
    public getTransactionStatus_args(getTransactionStatus_args other) {
5675
      __isset_bit_vector.clear();
5676
      __isset_bit_vector.or(other.__isset_bit_vector);
5677
      this.transactionId = other.transactionId;
5678
    }
5679
 
5680
    public getTransactionStatus_args deepCopy() {
5681
      return new getTransactionStatus_args(this);
5682
    }
5683
 
5684
    @Deprecated
5685
    public getTransactionStatus_args clone() {
5686
      return new getTransactionStatus_args(this);
5687
    }
5688
 
5689
    public long getTransactionId() {
5690
      return this.transactionId;
5691
    }
5692
 
5693
    public getTransactionStatus_args setTransactionId(long transactionId) {
5694
      this.transactionId = transactionId;
5695
      setTransactionIdIsSet(true);
5696
      return this;
5697
    }
5698
 
5699
    public void unsetTransactionId() {
5700
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5701
    }
5702
 
5703
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5704
    public boolean isSetTransactionId() {
5705
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5706
    }
5707
 
5708
    public void setTransactionIdIsSet(boolean value) {
5709
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5710
    }
5711
 
5712
    public void setFieldValue(_Fields field, Object value) {
5713
      switch (field) {
5714
      case TRANSACTION_ID:
5715
        if (value == null) {
5716
          unsetTransactionId();
5717
        } else {
5718
          setTransactionId((Long)value);
5719
        }
5720
        break;
5721
 
5722
      }
5723
    }
5724
 
5725
    public void setFieldValue(int fieldID, Object value) {
5726
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5727
    }
5728
 
5729
    public Object getFieldValue(_Fields field) {
5730
      switch (field) {
5731
      case TRANSACTION_ID:
5732
        return new Long(getTransactionId());
5733
 
5734
      }
5735
      throw new IllegalStateException();
5736
    }
5737
 
5738
    public Object getFieldValue(int fieldId) {
5739
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5740
    }
5741
 
5742
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5743
    public boolean isSet(_Fields field) {
5744
      switch (field) {
5745
      case TRANSACTION_ID:
5746
        return isSetTransactionId();
5747
      }
5748
      throw new IllegalStateException();
5749
    }
5750
 
5751
    public boolean isSet(int fieldID) {
5752
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5753
    }
5754
 
5755
    @Override
5756
    public boolean equals(Object that) {
5757
      if (that == null)
5758
        return false;
5759
      if (that instanceof getTransactionStatus_args)
5760
        return this.equals((getTransactionStatus_args)that);
5761
      return false;
5762
    }
5763
 
5764
    public boolean equals(getTransactionStatus_args that) {
5765
      if (that == null)
5766
        return false;
5767
 
5768
      boolean this_present_transactionId = true;
5769
      boolean that_present_transactionId = true;
5770
      if (this_present_transactionId || that_present_transactionId) {
5771
        if (!(this_present_transactionId && that_present_transactionId))
5772
          return false;
5773
        if (this.transactionId != that.transactionId)
5774
          return false;
5775
      }
5776
 
5777
      return true;
5778
    }
5779
 
5780
    @Override
5781
    public int hashCode() {
5782
      return 0;
5783
    }
5784
 
5785
    public int compareTo(getTransactionStatus_args other) {
5786
      if (!getClass().equals(other.getClass())) {
5787
        return getClass().getName().compareTo(other.getClass().getName());
5788
      }
5789
 
5790
      int lastComparison = 0;
5791
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5792
 
5793
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5794
      if (lastComparison != 0) {
5795
        return lastComparison;
5796
      }
5797
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5798
      if (lastComparison != 0) {
5799
        return lastComparison;
5800
      }
5801
      return 0;
5802
    }
5803
 
5804
    public void read(TProtocol iprot) throws TException {
5805
      TField field;
5806
      iprot.readStructBegin();
5807
      while (true)
5808
      {
5809
        field = iprot.readFieldBegin();
5810
        if (field.type == TType.STOP) { 
5811
          break;
5812
        }
5813
        _Fields fieldId = _Fields.findByThriftId(field.id);
5814
        if (fieldId == null) {
5815
          TProtocolUtil.skip(iprot, field.type);
5816
        } else {
5817
          switch (fieldId) {
5818
            case TRANSACTION_ID:
5819
              if (field.type == TType.I64) {
5820
                this.transactionId = iprot.readI64();
5821
                setTransactionIdIsSet(true);
5822
              } else { 
5823
                TProtocolUtil.skip(iprot, field.type);
5824
              }
5825
              break;
5826
          }
5827
          iprot.readFieldEnd();
5828
        }
5829
      }
5830
      iprot.readStructEnd();
5831
      validate();
5832
    }
5833
 
5834
    public void write(TProtocol oprot) throws TException {
5835
      validate();
5836
 
5837
      oprot.writeStructBegin(STRUCT_DESC);
5838
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5839
      oprot.writeI64(this.transactionId);
5840
      oprot.writeFieldEnd();
5841
      oprot.writeFieldStop();
5842
      oprot.writeStructEnd();
5843
    }
5844
 
5845
    @Override
5846
    public String toString() {
5847
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5848
      boolean first = true;
5849
 
5850
      sb.append("transactionId:");
5851
      sb.append(this.transactionId);
5852
      first = false;
5853
      sb.append(")");
5854
      return sb.toString();
5855
    }
5856
 
5857
    public void validate() throws TException {
5858
      // check for required fields
5859
    }
5860
 
5861
  }
5862
 
5863
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5864
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5865
 
5866
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5867
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5868
 
5869
    private TransactionStatus success;
5870
    private TransactionServiceException ex;
5871
 
5872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5873
    public enum _Fields implements TFieldIdEnum {
5874
      /**
5875
       * 
5876
       * @see TransactionStatus
5877
       */
5878
      SUCCESS((short)0, "success"),
5879
      EX((short)1, "ex");
5880
 
5881
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5882
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5883
 
5884
      static {
5885
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5886
          byId.put((int)field._thriftId, field);
5887
          byName.put(field.getFieldName(), field);
5888
        }
5889
      }
5890
 
5891
      /**
5892
       * Find the _Fields constant that matches fieldId, or null if its not found.
5893
       */
5894
      public static _Fields findByThriftId(int fieldId) {
5895
        return byId.get(fieldId);
5896
      }
5897
 
5898
      /**
5899
       * Find the _Fields constant that matches fieldId, throwing an exception
5900
       * if it is not found.
5901
       */
5902
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5903
        _Fields fields = findByThriftId(fieldId);
5904
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5905
        return fields;
5906
      }
5907
 
5908
      /**
5909
       * Find the _Fields constant that matches name, or null if its not found.
5910
       */
5911
      public static _Fields findByName(String name) {
5912
        return byName.get(name);
5913
      }
5914
 
5915
      private final short _thriftId;
5916
      private final String _fieldName;
5917
 
5918
      _Fields(short thriftId, String fieldName) {
5919
        _thriftId = thriftId;
5920
        _fieldName = fieldName;
5921
      }
5922
 
5923
      public short getThriftFieldId() {
5924
        return _thriftId;
5925
      }
5926
 
5927
      public String getFieldName() {
5928
        return _fieldName;
5929
      }
5930
    }
5931
 
5932
    // isset id assignments
5933
 
5934
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5935
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5936
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5937
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5938
          new FieldValueMetaData(TType.STRUCT)));
5939
    }});
5940
 
5941
    static {
5942
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5943
    }
5944
 
5945
    public getTransactionStatus_result() {
5946
    }
5947
 
5948
    public getTransactionStatus_result(
5949
      TransactionStatus success,
5950
      TransactionServiceException ex)
5951
    {
5952
      this();
5953
      this.success = success;
5954
      this.ex = ex;
5955
    }
5956
 
5957
    /**
5958
     * Performs a deep copy on <i>other</i>.
5959
     */
5960
    public getTransactionStatus_result(getTransactionStatus_result other) {
5961
      if (other.isSetSuccess()) {
5962
        this.success = other.success;
5963
      }
5964
      if (other.isSetEx()) {
5965
        this.ex = new TransactionServiceException(other.ex);
5966
      }
5967
    }
5968
 
5969
    public getTransactionStatus_result deepCopy() {
5970
      return new getTransactionStatus_result(this);
5971
    }
5972
 
5973
    @Deprecated
5974
    public getTransactionStatus_result clone() {
5975
      return new getTransactionStatus_result(this);
5976
    }
5977
 
5978
    /**
5979
     * 
5980
     * @see TransactionStatus
5981
     */
5982
    public TransactionStatus getSuccess() {
5983
      return this.success;
5984
    }
5985
 
5986
    /**
5987
     * 
5988
     * @see TransactionStatus
5989
     */
5990
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5991
      this.success = success;
5992
      return this;
5993
    }
5994
 
5995
    public void unsetSuccess() {
5996
      this.success = null;
5997
    }
5998
 
5999
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6000
    public boolean isSetSuccess() {
6001
      return this.success != null;
6002
    }
6003
 
6004
    public void setSuccessIsSet(boolean value) {
6005
      if (!value) {
6006
        this.success = null;
6007
      }
6008
    }
6009
 
6010
    public TransactionServiceException getEx() {
6011
      return this.ex;
6012
    }
6013
 
6014
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6015
      this.ex = ex;
6016
      return this;
6017
    }
6018
 
6019
    public void unsetEx() {
6020
      this.ex = null;
6021
    }
6022
 
6023
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6024
    public boolean isSetEx() {
6025
      return this.ex != null;
6026
    }
6027
 
6028
    public void setExIsSet(boolean value) {
6029
      if (!value) {
6030
        this.ex = null;
6031
      }
6032
    }
6033
 
6034
    public void setFieldValue(_Fields field, Object value) {
6035
      switch (field) {
6036
      case SUCCESS:
6037
        if (value == null) {
6038
          unsetSuccess();
6039
        } else {
6040
          setSuccess((TransactionStatus)value);
6041
        }
6042
        break;
6043
 
6044
      case EX:
6045
        if (value == null) {
6046
          unsetEx();
6047
        } else {
6048
          setEx((TransactionServiceException)value);
6049
        }
6050
        break;
6051
 
6052
      }
6053
    }
6054
 
6055
    public void setFieldValue(int fieldID, Object value) {
6056
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6057
    }
6058
 
6059
    public Object getFieldValue(_Fields field) {
6060
      switch (field) {
6061
      case SUCCESS:
6062
        return getSuccess();
6063
 
6064
      case EX:
6065
        return getEx();
6066
 
6067
      }
6068
      throw new IllegalStateException();
6069
    }
6070
 
6071
    public Object getFieldValue(int fieldId) {
6072
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6073
    }
6074
 
6075
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6076
    public boolean isSet(_Fields field) {
6077
      switch (field) {
6078
      case SUCCESS:
6079
        return isSetSuccess();
6080
      case EX:
6081
        return isSetEx();
6082
      }
6083
      throw new IllegalStateException();
6084
    }
6085
 
6086
    public boolean isSet(int fieldID) {
6087
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6088
    }
6089
 
6090
    @Override
6091
    public boolean equals(Object that) {
6092
      if (that == null)
6093
        return false;
6094
      if (that instanceof getTransactionStatus_result)
6095
        return this.equals((getTransactionStatus_result)that);
6096
      return false;
6097
    }
6098
 
6099
    public boolean equals(getTransactionStatus_result that) {
6100
      if (that == null)
6101
        return false;
6102
 
6103
      boolean this_present_success = true && this.isSetSuccess();
6104
      boolean that_present_success = true && that.isSetSuccess();
6105
      if (this_present_success || that_present_success) {
6106
        if (!(this_present_success && that_present_success))
6107
          return false;
6108
        if (!this.success.equals(that.success))
6109
          return false;
6110
      }
6111
 
6112
      boolean this_present_ex = true && this.isSetEx();
6113
      boolean that_present_ex = true && that.isSetEx();
6114
      if (this_present_ex || that_present_ex) {
6115
        if (!(this_present_ex && that_present_ex))
6116
          return false;
6117
        if (!this.ex.equals(that.ex))
6118
          return false;
6119
      }
6120
 
6121
      return true;
6122
    }
6123
 
6124
    @Override
6125
    public int hashCode() {
6126
      return 0;
6127
    }
6128
 
6129
    public int compareTo(getTransactionStatus_result other) {
6130
      if (!getClass().equals(other.getClass())) {
6131
        return getClass().getName().compareTo(other.getClass().getName());
6132
      }
6133
 
6134
      int lastComparison = 0;
6135
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6136
 
6137
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6138
      if (lastComparison != 0) {
6139
        return lastComparison;
6140
      }
6141
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6142
      if (lastComparison != 0) {
6143
        return lastComparison;
6144
      }
6145
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6146
      if (lastComparison != 0) {
6147
        return lastComparison;
6148
      }
6149
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6150
      if (lastComparison != 0) {
6151
        return lastComparison;
6152
      }
6153
      return 0;
6154
    }
6155
 
6156
    public void read(TProtocol iprot) throws TException {
6157
      TField field;
6158
      iprot.readStructBegin();
6159
      while (true)
6160
      {
6161
        field = iprot.readFieldBegin();
6162
        if (field.type == TType.STOP) { 
6163
          break;
6164
        }
6165
        _Fields fieldId = _Fields.findByThriftId(field.id);
6166
        if (fieldId == null) {
6167
          TProtocolUtil.skip(iprot, field.type);
6168
        } else {
6169
          switch (fieldId) {
6170
            case SUCCESS:
6171
              if (field.type == TType.I32) {
6172
                this.success = TransactionStatus.findByValue(iprot.readI32());
6173
              } else { 
6174
                TProtocolUtil.skip(iprot, field.type);
6175
              }
6176
              break;
6177
            case EX:
6178
              if (field.type == TType.STRUCT) {
6179
                this.ex = new TransactionServiceException();
6180
                this.ex.read(iprot);
6181
              } else { 
6182
                TProtocolUtil.skip(iprot, field.type);
6183
              }
6184
              break;
6185
          }
6186
          iprot.readFieldEnd();
6187
        }
6188
      }
6189
      iprot.readStructEnd();
6190
      validate();
6191
    }
6192
 
6193
    public void write(TProtocol oprot) throws TException {
6194
      oprot.writeStructBegin(STRUCT_DESC);
6195
 
6196
      if (this.isSetSuccess()) {
6197
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6198
        oprot.writeI32(this.success.getValue());
6199
        oprot.writeFieldEnd();
6200
      } else if (this.isSetEx()) {
6201
        oprot.writeFieldBegin(EX_FIELD_DESC);
6202
        this.ex.write(oprot);
6203
        oprot.writeFieldEnd();
6204
      }
6205
      oprot.writeFieldStop();
6206
      oprot.writeStructEnd();
6207
    }
6208
 
6209
    @Override
6210
    public String toString() {
6211
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6212
      boolean first = true;
6213
 
6214
      sb.append("success:");
6215
      if (this.success == null) {
6216
        sb.append("null");
6217
      } else {
6218
        String success_name = success.name();
6219
        if (success_name != null) {
6220
          sb.append(success_name);
6221
          sb.append(" (");
6222
        }
6223
        sb.append(this.success);
6224
        if (success_name != null) {
6225
          sb.append(")");
6226
        }
6227
      }
6228
      first = false;
6229
      if (!first) sb.append(", ");
6230
      sb.append("ex:");
6231
      if (this.ex == null) {
6232
        sb.append("null");
6233
      } else {
6234
        sb.append(this.ex);
6235
      }
6236
      first = false;
6237
      sb.append(")");
6238
      return sb.toString();
6239
    }
6240
 
6241
    public void validate() throws TException {
6242
      // check for required fields
6243
    }
6244
 
6245
  }
6246
 
6247
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6248
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6249
 
6250
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6251
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6252
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6253
 
6254
    private long transactionId;
6255
    private TransactionStatus status;
6256
    private String description;
6257
 
6258
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6259
    public enum _Fields implements TFieldIdEnum {
6260
      TRANSACTION_ID((short)1, "transactionId"),
6261
      /**
6262
       * 
6263
       * @see TransactionStatus
6264
       */
6265
      STATUS((short)2, "status"),
6266
      DESCRIPTION((short)3, "description");
6267
 
6268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6270
 
6271
      static {
6272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6273
          byId.put((int)field._thriftId, field);
6274
          byName.put(field.getFieldName(), field);
6275
        }
6276
      }
6277
 
6278
      /**
6279
       * Find the _Fields constant that matches fieldId, or null if its not found.
6280
       */
6281
      public static _Fields findByThriftId(int fieldId) {
6282
        return byId.get(fieldId);
6283
      }
6284
 
6285
      /**
6286
       * Find the _Fields constant that matches fieldId, throwing an exception
6287
       * if it is not found.
6288
       */
6289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6290
        _Fields fields = findByThriftId(fieldId);
6291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6292
        return fields;
6293
      }
6294
 
6295
      /**
6296
       * Find the _Fields constant that matches name, or null if its not found.
6297
       */
6298
      public static _Fields findByName(String name) {
6299
        return byName.get(name);
6300
      }
6301
 
6302
      private final short _thriftId;
6303
      private final String _fieldName;
6304
 
6305
      _Fields(short thriftId, String fieldName) {
6306
        _thriftId = thriftId;
6307
        _fieldName = fieldName;
6308
      }
6309
 
6310
      public short getThriftFieldId() {
6311
        return _thriftId;
6312
      }
6313
 
6314
      public String getFieldName() {
6315
        return _fieldName;
6316
      }
6317
    }
6318
 
6319
    // isset id assignments
6320
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6321
    private BitSet __isset_bit_vector = new BitSet(1);
6322
 
6323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6324
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6325
          new FieldValueMetaData(TType.I64)));
6326
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6327
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6328
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6329
          new FieldValueMetaData(TType.STRING)));
6330
    }});
6331
 
6332
    static {
6333
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6334
    }
6335
 
6336
    public changeTransactionStatus_args() {
6337
    }
6338
 
6339
    public changeTransactionStatus_args(
6340
      long transactionId,
6341
      TransactionStatus status,
6342
      String description)
6343
    {
6344
      this();
6345
      this.transactionId = transactionId;
6346
      setTransactionIdIsSet(true);
6347
      this.status = status;
6348
      this.description = description;
6349
    }
6350
 
6351
    /**
6352
     * Performs a deep copy on <i>other</i>.
6353
     */
6354
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6355
      __isset_bit_vector.clear();
6356
      __isset_bit_vector.or(other.__isset_bit_vector);
6357
      this.transactionId = other.transactionId;
6358
      if (other.isSetStatus()) {
6359
        this.status = other.status;
6360
      }
6361
      if (other.isSetDescription()) {
6362
        this.description = other.description;
6363
      }
6364
    }
6365
 
6366
    public changeTransactionStatus_args deepCopy() {
6367
      return new changeTransactionStatus_args(this);
6368
    }
6369
 
6370
    @Deprecated
6371
    public changeTransactionStatus_args clone() {
6372
      return new changeTransactionStatus_args(this);
6373
    }
6374
 
6375
    public long getTransactionId() {
6376
      return this.transactionId;
6377
    }
6378
 
6379
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6380
      this.transactionId = transactionId;
6381
      setTransactionIdIsSet(true);
6382
      return this;
6383
    }
6384
 
6385
    public void unsetTransactionId() {
6386
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6387
    }
6388
 
6389
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6390
    public boolean isSetTransactionId() {
6391
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6392
    }
6393
 
6394
    public void setTransactionIdIsSet(boolean value) {
6395
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6396
    }
6397
 
6398
    /**
6399
     * 
6400
     * @see TransactionStatus
6401
     */
6402
    public TransactionStatus getStatus() {
6403
      return this.status;
6404
    }
6405
 
6406
    /**
6407
     * 
6408
     * @see TransactionStatus
6409
     */
6410
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6411
      this.status = status;
6412
      return this;
6413
    }
6414
 
6415
    public void unsetStatus() {
6416
      this.status = null;
6417
    }
6418
 
6419
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6420
    public boolean isSetStatus() {
6421
      return this.status != null;
6422
    }
6423
 
6424
    public void setStatusIsSet(boolean value) {
6425
      if (!value) {
6426
        this.status = null;
6427
      }
6428
    }
6429
 
6430
    public String getDescription() {
6431
      return this.description;
6432
    }
6433
 
6434
    public changeTransactionStatus_args setDescription(String description) {
6435
      this.description = description;
6436
      return this;
6437
    }
6438
 
6439
    public void unsetDescription() {
6440
      this.description = null;
6441
    }
6442
 
6443
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6444
    public boolean isSetDescription() {
6445
      return this.description != null;
6446
    }
6447
 
6448
    public void setDescriptionIsSet(boolean value) {
6449
      if (!value) {
6450
        this.description = null;
6451
      }
6452
    }
6453
 
6454
    public void setFieldValue(_Fields field, Object value) {
6455
      switch (field) {
6456
      case TRANSACTION_ID:
6457
        if (value == null) {
6458
          unsetTransactionId();
6459
        } else {
6460
          setTransactionId((Long)value);
6461
        }
6462
        break;
6463
 
6464
      case STATUS:
6465
        if (value == null) {
6466
          unsetStatus();
6467
        } else {
6468
          setStatus((TransactionStatus)value);
6469
        }
6470
        break;
6471
 
6472
      case DESCRIPTION:
6473
        if (value == null) {
6474
          unsetDescription();
6475
        } else {
6476
          setDescription((String)value);
6477
        }
6478
        break;
6479
 
6480
      }
6481
    }
6482
 
6483
    public void setFieldValue(int fieldID, Object value) {
6484
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6485
    }
6486
 
6487
    public Object getFieldValue(_Fields field) {
6488
      switch (field) {
6489
      case TRANSACTION_ID:
6490
        return new Long(getTransactionId());
6491
 
6492
      case STATUS:
6493
        return getStatus();
6494
 
6495
      case DESCRIPTION:
6496
        return getDescription();
6497
 
6498
      }
6499
      throw new IllegalStateException();
6500
    }
6501
 
6502
    public Object getFieldValue(int fieldId) {
6503
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6504
    }
6505
 
6506
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6507
    public boolean isSet(_Fields field) {
6508
      switch (field) {
6509
      case TRANSACTION_ID:
6510
        return isSetTransactionId();
6511
      case STATUS:
6512
        return isSetStatus();
6513
      case DESCRIPTION:
6514
        return isSetDescription();
6515
      }
6516
      throw new IllegalStateException();
6517
    }
6518
 
6519
    public boolean isSet(int fieldID) {
6520
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6521
    }
6522
 
6523
    @Override
6524
    public boolean equals(Object that) {
6525
      if (that == null)
6526
        return false;
6527
      if (that instanceof changeTransactionStatus_args)
6528
        return this.equals((changeTransactionStatus_args)that);
6529
      return false;
6530
    }
6531
 
6532
    public boolean equals(changeTransactionStatus_args that) {
6533
      if (that == null)
6534
        return false;
6535
 
6536
      boolean this_present_transactionId = true;
6537
      boolean that_present_transactionId = true;
6538
      if (this_present_transactionId || that_present_transactionId) {
6539
        if (!(this_present_transactionId && that_present_transactionId))
6540
          return false;
6541
        if (this.transactionId != that.transactionId)
6542
          return false;
6543
      }
6544
 
6545
      boolean this_present_status = true && this.isSetStatus();
6546
      boolean that_present_status = true && that.isSetStatus();
6547
      if (this_present_status || that_present_status) {
6548
        if (!(this_present_status && that_present_status))
6549
          return false;
6550
        if (!this.status.equals(that.status))
6551
          return false;
6552
      }
6553
 
6554
      boolean this_present_description = true && this.isSetDescription();
6555
      boolean that_present_description = true && that.isSetDescription();
6556
      if (this_present_description || that_present_description) {
6557
        if (!(this_present_description && that_present_description))
6558
          return false;
6559
        if (!this.description.equals(that.description))
6560
          return false;
6561
      }
6562
 
6563
      return true;
6564
    }
6565
 
6566
    @Override
6567
    public int hashCode() {
6568
      return 0;
6569
    }
6570
 
6571
    public int compareTo(changeTransactionStatus_args other) {
6572
      if (!getClass().equals(other.getClass())) {
6573
        return getClass().getName().compareTo(other.getClass().getName());
6574
      }
6575
 
6576
      int lastComparison = 0;
6577
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6578
 
6579
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6580
      if (lastComparison != 0) {
6581
        return lastComparison;
6582
      }
6583
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6584
      if (lastComparison != 0) {
6585
        return lastComparison;
6586
      }
6587
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6588
      if (lastComparison != 0) {
6589
        return lastComparison;
6590
      }
6591
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6592
      if (lastComparison != 0) {
6593
        return lastComparison;
6594
      }
6595
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6596
      if (lastComparison != 0) {
6597
        return lastComparison;
6598
      }
6599
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6600
      if (lastComparison != 0) {
6601
        return lastComparison;
6602
      }
6603
      return 0;
6604
    }
6605
 
6606
    public void read(TProtocol iprot) throws TException {
6607
      TField field;
6608
      iprot.readStructBegin();
6609
      while (true)
6610
      {
6611
        field = iprot.readFieldBegin();
6612
        if (field.type == TType.STOP) { 
6613
          break;
6614
        }
6615
        _Fields fieldId = _Fields.findByThriftId(field.id);
6616
        if (fieldId == null) {
6617
          TProtocolUtil.skip(iprot, field.type);
6618
        } else {
6619
          switch (fieldId) {
6620
            case TRANSACTION_ID:
6621
              if (field.type == TType.I64) {
6622
                this.transactionId = iprot.readI64();
6623
                setTransactionIdIsSet(true);
6624
              } else { 
6625
                TProtocolUtil.skip(iprot, field.type);
6626
              }
6627
              break;
6628
            case STATUS:
6629
              if (field.type == TType.I32) {
6630
                this.status = TransactionStatus.findByValue(iprot.readI32());
6631
              } else { 
6632
                TProtocolUtil.skip(iprot, field.type);
6633
              }
6634
              break;
6635
            case DESCRIPTION:
6636
              if (field.type == TType.STRING) {
6637
                this.description = iprot.readString();
6638
              } else { 
6639
                TProtocolUtil.skip(iprot, field.type);
6640
              }
6641
              break;
6642
          }
6643
          iprot.readFieldEnd();
6644
        }
6645
      }
6646
      iprot.readStructEnd();
6647
      validate();
6648
    }
6649
 
6650
    public void write(TProtocol oprot) throws TException {
6651
      validate();
6652
 
6653
      oprot.writeStructBegin(STRUCT_DESC);
6654
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6655
      oprot.writeI64(this.transactionId);
6656
      oprot.writeFieldEnd();
6657
      if (this.status != null) {
6658
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6659
        oprot.writeI32(this.status.getValue());
6660
        oprot.writeFieldEnd();
6661
      }
6662
      if (this.description != null) {
6663
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6664
        oprot.writeString(this.description);
6665
        oprot.writeFieldEnd();
6666
      }
6667
      oprot.writeFieldStop();
6668
      oprot.writeStructEnd();
6669
    }
6670
 
6671
    @Override
6672
    public String toString() {
6673
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6674
      boolean first = true;
6675
 
6676
      sb.append("transactionId:");
6677
      sb.append(this.transactionId);
6678
      first = false;
6679
      if (!first) sb.append(", ");
6680
      sb.append("status:");
6681
      if (this.status == null) {
6682
        sb.append("null");
6683
      } else {
6684
        String status_name = status.name();
6685
        if (status_name != null) {
6686
          sb.append(status_name);
6687
          sb.append(" (");
6688
        }
6689
        sb.append(this.status);
6690
        if (status_name != null) {
6691
          sb.append(")");
6692
        }
6693
      }
6694
      first = false;
6695
      if (!first) sb.append(", ");
6696
      sb.append("description:");
6697
      if (this.description == null) {
6698
        sb.append("null");
6699
      } else {
6700
        sb.append(this.description);
6701
      }
6702
      first = false;
6703
      sb.append(")");
6704
      return sb.toString();
6705
    }
6706
 
6707
    public void validate() throws TException {
6708
      // check for required fields
6709
    }
6710
 
6711
  }
6712
 
6713
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6714
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6715
 
6716
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6717
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6718
 
6719
    private boolean success;
6720
    private TransactionServiceException ex;
6721
 
6722
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6723
    public enum _Fields implements TFieldIdEnum {
6724
      SUCCESS((short)0, "success"),
6725
      EX((short)1, "ex");
6726
 
6727
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6729
 
6730
      static {
6731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6732
          byId.put((int)field._thriftId, field);
6733
          byName.put(field.getFieldName(), field);
6734
        }
6735
      }
6736
 
6737
      /**
6738
       * Find the _Fields constant that matches fieldId, or null if its not found.
6739
       */
6740
      public static _Fields findByThriftId(int fieldId) {
6741
        return byId.get(fieldId);
6742
      }
6743
 
6744
      /**
6745
       * Find the _Fields constant that matches fieldId, throwing an exception
6746
       * if it is not found.
6747
       */
6748
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6749
        _Fields fields = findByThriftId(fieldId);
6750
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6751
        return fields;
6752
      }
6753
 
6754
      /**
6755
       * Find the _Fields constant that matches name, or null if its not found.
6756
       */
6757
      public static _Fields findByName(String name) {
6758
        return byName.get(name);
6759
      }
6760
 
6761
      private final short _thriftId;
6762
      private final String _fieldName;
6763
 
6764
      _Fields(short thriftId, String fieldName) {
6765
        _thriftId = thriftId;
6766
        _fieldName = fieldName;
6767
      }
6768
 
6769
      public short getThriftFieldId() {
6770
        return _thriftId;
6771
      }
6772
 
6773
      public String getFieldName() {
6774
        return _fieldName;
6775
      }
6776
    }
6777
 
6778
    // isset id assignments
6779
    private static final int __SUCCESS_ISSET_ID = 0;
6780
    private BitSet __isset_bit_vector = new BitSet(1);
6781
 
6782
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6783
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6784
          new FieldValueMetaData(TType.BOOL)));
6785
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6786
          new FieldValueMetaData(TType.STRUCT)));
6787
    }});
6788
 
6789
    static {
6790
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6791
    }
6792
 
6793
    public changeTransactionStatus_result() {
6794
    }
6795
 
6796
    public changeTransactionStatus_result(
6797
      boolean success,
6798
      TransactionServiceException ex)
6799
    {
6800
      this();
6801
      this.success = success;
6802
      setSuccessIsSet(true);
6803
      this.ex = ex;
6804
    }
6805
 
6806
    /**
6807
     * Performs a deep copy on <i>other</i>.
6808
     */
6809
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6810
      __isset_bit_vector.clear();
6811
      __isset_bit_vector.or(other.__isset_bit_vector);
6812
      this.success = other.success;
6813
      if (other.isSetEx()) {
6814
        this.ex = new TransactionServiceException(other.ex);
6815
      }
6816
    }
6817
 
6818
    public changeTransactionStatus_result deepCopy() {
6819
      return new changeTransactionStatus_result(this);
6820
    }
6821
 
6822
    @Deprecated
6823
    public changeTransactionStatus_result clone() {
6824
      return new changeTransactionStatus_result(this);
6825
    }
6826
 
6827
    public boolean isSuccess() {
6828
      return this.success;
6829
    }
6830
 
6831
    public changeTransactionStatus_result setSuccess(boolean success) {
6832
      this.success = success;
6833
      setSuccessIsSet(true);
6834
      return this;
6835
    }
6836
 
6837
    public void unsetSuccess() {
6838
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6839
    }
6840
 
6841
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6842
    public boolean isSetSuccess() {
6843
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6844
    }
6845
 
6846
    public void setSuccessIsSet(boolean value) {
6847
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6848
    }
6849
 
6850
    public TransactionServiceException getEx() {
6851
      return this.ex;
6852
    }
6853
 
6854
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6855
      this.ex = ex;
6856
      return this;
6857
    }
6858
 
6859
    public void unsetEx() {
6860
      this.ex = null;
6861
    }
6862
 
6863
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6864
    public boolean isSetEx() {
6865
      return this.ex != null;
6866
    }
6867
 
6868
    public void setExIsSet(boolean value) {
6869
      if (!value) {
6870
        this.ex = null;
6871
      }
6872
    }
6873
 
6874
    public void setFieldValue(_Fields field, Object value) {
6875
      switch (field) {
6876
      case SUCCESS:
6877
        if (value == null) {
6878
          unsetSuccess();
6879
        } else {
6880
          setSuccess((Boolean)value);
6881
        }
6882
        break;
6883
 
6884
      case EX:
6885
        if (value == null) {
6886
          unsetEx();
6887
        } else {
6888
          setEx((TransactionServiceException)value);
6889
        }
6890
        break;
6891
 
6892
      }
6893
    }
6894
 
6895
    public void setFieldValue(int fieldID, Object value) {
6896
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6897
    }
6898
 
6899
    public Object getFieldValue(_Fields field) {
6900
      switch (field) {
6901
      case SUCCESS:
6902
        return new Boolean(isSuccess());
6903
 
6904
      case EX:
6905
        return getEx();
6906
 
6907
      }
6908
      throw new IllegalStateException();
6909
    }
6910
 
6911
    public Object getFieldValue(int fieldId) {
6912
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6913
    }
6914
 
6915
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6916
    public boolean isSet(_Fields field) {
6917
      switch (field) {
6918
      case SUCCESS:
6919
        return isSetSuccess();
6920
      case EX:
6921
        return isSetEx();
6922
      }
6923
      throw new IllegalStateException();
6924
    }
6925
 
6926
    public boolean isSet(int fieldID) {
6927
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6928
    }
6929
 
6930
    @Override
6931
    public boolean equals(Object that) {
6932
      if (that == null)
6933
        return false;
6934
      if (that instanceof changeTransactionStatus_result)
6935
        return this.equals((changeTransactionStatus_result)that);
6936
      return false;
6937
    }
6938
 
6939
    public boolean equals(changeTransactionStatus_result that) {
6940
      if (that == null)
6941
        return false;
6942
 
6943
      boolean this_present_success = true;
6944
      boolean that_present_success = true;
6945
      if (this_present_success || that_present_success) {
6946
        if (!(this_present_success && that_present_success))
6947
          return false;
6948
        if (this.success != that.success)
6949
          return false;
6950
      }
6951
 
6952
      boolean this_present_ex = true && this.isSetEx();
6953
      boolean that_present_ex = true && that.isSetEx();
6954
      if (this_present_ex || that_present_ex) {
6955
        if (!(this_present_ex && that_present_ex))
6956
          return false;
6957
        if (!this.ex.equals(that.ex))
6958
          return false;
6959
      }
6960
 
6961
      return true;
6962
    }
6963
 
6964
    @Override
6965
    public int hashCode() {
6966
      return 0;
6967
    }
6968
 
6969
    public int compareTo(changeTransactionStatus_result other) {
6970
      if (!getClass().equals(other.getClass())) {
6971
        return getClass().getName().compareTo(other.getClass().getName());
6972
      }
6973
 
6974
      int lastComparison = 0;
6975
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6976
 
6977
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6978
      if (lastComparison != 0) {
6979
        return lastComparison;
6980
      }
6981
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6982
      if (lastComparison != 0) {
6983
        return lastComparison;
6984
      }
6985
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6986
      if (lastComparison != 0) {
6987
        return lastComparison;
6988
      }
6989
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6990
      if (lastComparison != 0) {
6991
        return lastComparison;
6992
      }
6993
      return 0;
6994
    }
6995
 
6996
    public void read(TProtocol iprot) throws TException {
6997
      TField field;
6998
      iprot.readStructBegin();
6999
      while (true)
7000
      {
7001
        field = iprot.readFieldBegin();
7002
        if (field.type == TType.STOP) { 
7003
          break;
7004
        }
7005
        _Fields fieldId = _Fields.findByThriftId(field.id);
7006
        if (fieldId == null) {
7007
          TProtocolUtil.skip(iprot, field.type);
7008
        } else {
7009
          switch (fieldId) {
7010
            case SUCCESS:
7011
              if (field.type == TType.BOOL) {
7012
                this.success = iprot.readBool();
7013
                setSuccessIsSet(true);
7014
              } else { 
7015
                TProtocolUtil.skip(iprot, field.type);
7016
              }
7017
              break;
7018
            case EX:
7019
              if (field.type == TType.STRUCT) {
7020
                this.ex = new TransactionServiceException();
7021
                this.ex.read(iprot);
7022
              } else { 
7023
                TProtocolUtil.skip(iprot, field.type);
7024
              }
7025
              break;
7026
          }
7027
          iprot.readFieldEnd();
7028
        }
7029
      }
7030
      iprot.readStructEnd();
7031
      validate();
7032
    }
7033
 
7034
    public void write(TProtocol oprot) throws TException {
7035
      oprot.writeStructBegin(STRUCT_DESC);
7036
 
7037
      if (this.isSetSuccess()) {
7038
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7039
        oprot.writeBool(this.success);
7040
        oprot.writeFieldEnd();
7041
      } else if (this.isSetEx()) {
7042
        oprot.writeFieldBegin(EX_FIELD_DESC);
7043
        this.ex.write(oprot);
7044
        oprot.writeFieldEnd();
7045
      }
7046
      oprot.writeFieldStop();
7047
      oprot.writeStructEnd();
7048
    }
7049
 
7050
    @Override
7051
    public String toString() {
7052
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7053
      boolean first = true;
7054
 
7055
      sb.append("success:");
7056
      sb.append(this.success);
7057
      first = false;
7058
      if (!first) sb.append(", ");
7059
      sb.append("ex:");
7060
      if (this.ex == null) {
7061
        sb.append("null");
7062
      } else {
7063
        sb.append(this.ex);
7064
      }
7065
      first = false;
7066
      sb.append(")");
7067
      return sb.toString();
7068
    }
7069
 
7070
    public void validate() throws TException {
7071
      // check for required fields
7072
    }
7073
 
7074
  }
7075
 
1398 varun.gupt 7076
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7077
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7078
 
7079
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7080
 
7081
    private long transactionId;
7082
 
7083
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7084
    public enum _Fields implements TFieldIdEnum {
7085
      TRANSACTION_ID((short)1, "transactionId");
7086
 
7087
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7088
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7089
 
7090
      static {
7091
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7092
          byId.put((int)field._thriftId, field);
7093
          byName.put(field.getFieldName(), field);
7094
        }
7095
      }
7096
 
7097
      /**
7098
       * Find the _Fields constant that matches fieldId, or null if its not found.
7099
       */
7100
      public static _Fields findByThriftId(int fieldId) {
7101
        return byId.get(fieldId);
7102
      }
7103
 
7104
      /**
7105
       * Find the _Fields constant that matches fieldId, throwing an exception
7106
       * if it is not found.
7107
       */
7108
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7109
        _Fields fields = findByThriftId(fieldId);
7110
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7111
        return fields;
7112
      }
7113
 
7114
      /**
7115
       * Find the _Fields constant that matches name, or null if its not found.
7116
       */
7117
      public static _Fields findByName(String name) {
7118
        return byName.get(name);
7119
      }
7120
 
7121
      private final short _thriftId;
7122
      private final String _fieldName;
7123
 
7124
      _Fields(short thriftId, String fieldName) {
7125
        _thriftId = thriftId;
7126
        _fieldName = fieldName;
7127
      }
7128
 
7129
      public short getThriftFieldId() {
7130
        return _thriftId;
7131
      }
7132
 
7133
      public String getFieldName() {
7134
        return _fieldName;
7135
      }
7136
    }
7137
 
7138
    // isset id assignments
7139
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7140
    private BitSet __isset_bit_vector = new BitSet(1);
7141
 
7142
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7143
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7144
          new FieldValueMetaData(TType.I64)));
7145
    }});
7146
 
7147
    static {
1398 varun.gupt 7148
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7149
    }
7150
 
1398 varun.gupt 7151
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7152
    }
7153
 
1398 varun.gupt 7154
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7155
      long transactionId)
7156
    {
7157
      this();
7158
      this.transactionId = transactionId;
7159
      setTransactionIdIsSet(true);
7160
    }
7161
 
7162
    /**
7163
     * Performs a deep copy on <i>other</i>.
7164
     */
1398 varun.gupt 7165
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7166
      __isset_bit_vector.clear();
7167
      __isset_bit_vector.or(other.__isset_bit_vector);
7168
      this.transactionId = other.transactionId;
7169
    }
7170
 
1398 varun.gupt 7171
    public enqueueTransactionInfoEmail_args deepCopy() {
7172
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7173
    }
7174
 
7175
    @Deprecated
1398 varun.gupt 7176
    public enqueueTransactionInfoEmail_args clone() {
7177
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7178
    }
7179
 
7180
    public long getTransactionId() {
7181
      return this.transactionId;
7182
    }
7183
 
1398 varun.gupt 7184
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7185
      this.transactionId = transactionId;
7186
      setTransactionIdIsSet(true);
7187
      return this;
7188
    }
7189
 
7190
    public void unsetTransactionId() {
7191
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7192
    }
7193
 
7194
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7195
    public boolean isSetTransactionId() {
7196
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7197
    }
7198
 
7199
    public void setTransactionIdIsSet(boolean value) {
7200
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7201
    }
7202
 
7203
    public void setFieldValue(_Fields field, Object value) {
7204
      switch (field) {
7205
      case TRANSACTION_ID:
7206
        if (value == null) {
7207
          unsetTransactionId();
7208
        } else {
7209
          setTransactionId((Long)value);
7210
        }
7211
        break;
7212
 
7213
      }
7214
    }
7215
 
7216
    public void setFieldValue(int fieldID, Object value) {
7217
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7218
    }
7219
 
7220
    public Object getFieldValue(_Fields field) {
7221
      switch (field) {
7222
      case TRANSACTION_ID:
7223
        return new Long(getTransactionId());
7224
 
7225
      }
7226
      throw new IllegalStateException();
7227
    }
7228
 
7229
    public Object getFieldValue(int fieldId) {
7230
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7231
    }
7232
 
7233
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7234
    public boolean isSet(_Fields field) {
7235
      switch (field) {
7236
      case TRANSACTION_ID:
7237
        return isSetTransactionId();
7238
      }
7239
      throw new IllegalStateException();
7240
    }
7241
 
7242
    public boolean isSet(int fieldID) {
7243
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7244
    }
7245
 
7246
    @Override
7247
    public boolean equals(Object that) {
7248
      if (that == null)
7249
        return false;
1398 varun.gupt 7250
      if (that instanceof enqueueTransactionInfoEmail_args)
7251
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7252
      return false;
7253
    }
7254
 
1398 varun.gupt 7255
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7256
      if (that == null)
7257
        return false;
7258
 
7259
      boolean this_present_transactionId = true;
7260
      boolean that_present_transactionId = true;
7261
      if (this_present_transactionId || that_present_transactionId) {
7262
        if (!(this_present_transactionId && that_present_transactionId))
7263
          return false;
7264
        if (this.transactionId != that.transactionId)
7265
          return false;
7266
      }
7267
 
7268
      return true;
7269
    }
7270
 
7271
    @Override
7272
    public int hashCode() {
7273
      return 0;
7274
    }
7275
 
1398 varun.gupt 7276
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7277
      if (!getClass().equals(other.getClass())) {
7278
        return getClass().getName().compareTo(other.getClass().getName());
7279
      }
7280
 
7281
      int lastComparison = 0;
1398 varun.gupt 7282
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7283
 
7284
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7285
      if (lastComparison != 0) {
7286
        return lastComparison;
7287
      }
7288
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7289
      if (lastComparison != 0) {
7290
        return lastComparison;
7291
      }
7292
      return 0;
7293
    }
7294
 
7295
    public void read(TProtocol iprot) throws TException {
7296
      TField field;
7297
      iprot.readStructBegin();
7298
      while (true)
7299
      {
7300
        field = iprot.readFieldBegin();
7301
        if (field.type == TType.STOP) { 
7302
          break;
7303
        }
7304
        _Fields fieldId = _Fields.findByThriftId(field.id);
7305
        if (fieldId == null) {
7306
          TProtocolUtil.skip(iprot, field.type);
7307
        } else {
7308
          switch (fieldId) {
7309
            case TRANSACTION_ID:
7310
              if (field.type == TType.I64) {
7311
                this.transactionId = iprot.readI64();
7312
                setTransactionIdIsSet(true);
7313
              } else { 
7314
                TProtocolUtil.skip(iprot, field.type);
7315
              }
7316
              break;
7317
          }
7318
          iprot.readFieldEnd();
7319
        }
7320
      }
7321
      iprot.readStructEnd();
7322
      validate();
7323
    }
7324
 
7325
    public void write(TProtocol oprot) throws TException {
7326
      validate();
7327
 
7328
      oprot.writeStructBegin(STRUCT_DESC);
7329
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7330
      oprot.writeI64(this.transactionId);
7331
      oprot.writeFieldEnd();
7332
      oprot.writeFieldStop();
7333
      oprot.writeStructEnd();
7334
    }
7335
 
7336
    @Override
7337
    public String toString() {
1398 varun.gupt 7338
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7339
      boolean first = true;
7340
 
7341
      sb.append("transactionId:");
7342
      sb.append(this.transactionId);
7343
      first = false;
7344
      sb.append(")");
7345
      return sb.toString();
7346
    }
7347
 
7348
    public void validate() throws TException {
7349
      // check for required fields
7350
    }
7351
 
7352
  }
7353
 
1398 varun.gupt 7354
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7355
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7356
 
7357
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7358
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7359
 
7360
    private boolean success;
7361
    private TransactionServiceException ex;
7362
 
7363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7364
    public enum _Fields implements TFieldIdEnum {
7365
      SUCCESS((short)0, "success"),
7366
      EX((short)1, "ex");
7367
 
7368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7370
 
7371
      static {
7372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7373
          byId.put((int)field._thriftId, field);
7374
          byName.put(field.getFieldName(), field);
7375
        }
7376
      }
7377
 
7378
      /**
7379
       * Find the _Fields constant that matches fieldId, or null if its not found.
7380
       */
7381
      public static _Fields findByThriftId(int fieldId) {
7382
        return byId.get(fieldId);
7383
      }
7384
 
7385
      /**
7386
       * Find the _Fields constant that matches fieldId, throwing an exception
7387
       * if it is not found.
7388
       */
7389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7390
        _Fields fields = findByThriftId(fieldId);
7391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7392
        return fields;
7393
      }
7394
 
7395
      /**
7396
       * Find the _Fields constant that matches name, or null if its not found.
7397
       */
7398
      public static _Fields findByName(String name) {
7399
        return byName.get(name);
7400
      }
7401
 
7402
      private final short _thriftId;
7403
      private final String _fieldName;
7404
 
7405
      _Fields(short thriftId, String fieldName) {
7406
        _thriftId = thriftId;
7407
        _fieldName = fieldName;
7408
      }
7409
 
7410
      public short getThriftFieldId() {
7411
        return _thriftId;
7412
      }
7413
 
7414
      public String getFieldName() {
7415
        return _fieldName;
7416
      }
7417
    }
7418
 
7419
    // isset id assignments
7420
    private static final int __SUCCESS_ISSET_ID = 0;
7421
    private BitSet __isset_bit_vector = new BitSet(1);
7422
 
7423
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7424
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7425
          new FieldValueMetaData(TType.BOOL)));
7426
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7427
          new FieldValueMetaData(TType.STRUCT)));
7428
    }});
7429
 
7430
    static {
1398 varun.gupt 7431
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7432
    }
7433
 
1398 varun.gupt 7434
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7435
    }
7436
 
1398 varun.gupt 7437
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7438
      boolean success,
7439
      TransactionServiceException ex)
7440
    {
7441
      this();
7442
      this.success = success;
7443
      setSuccessIsSet(true);
7444
      this.ex = ex;
7445
    }
7446
 
7447
    /**
7448
     * Performs a deep copy on <i>other</i>.
7449
     */
1398 varun.gupt 7450
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7451
      __isset_bit_vector.clear();
7452
      __isset_bit_vector.or(other.__isset_bit_vector);
7453
      this.success = other.success;
7454
      if (other.isSetEx()) {
7455
        this.ex = new TransactionServiceException(other.ex);
7456
      }
7457
    }
7458
 
1398 varun.gupt 7459
    public enqueueTransactionInfoEmail_result deepCopy() {
7460
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7461
    }
7462
 
7463
    @Deprecated
1398 varun.gupt 7464
    public enqueueTransactionInfoEmail_result clone() {
7465
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7466
    }
7467
 
7468
    public boolean isSuccess() {
7469
      return this.success;
7470
    }
7471
 
1398 varun.gupt 7472
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7473
      this.success = success;
7474
      setSuccessIsSet(true);
7475
      return this;
7476
    }
7477
 
7478
    public void unsetSuccess() {
7479
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7480
    }
7481
 
7482
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7483
    public boolean isSetSuccess() {
7484
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7485
    }
7486
 
7487
    public void setSuccessIsSet(boolean value) {
7488
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7489
    }
7490
 
7491
    public TransactionServiceException getEx() {
7492
      return this.ex;
7493
    }
7494
 
1398 varun.gupt 7495
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7496
      this.ex = ex;
7497
      return this;
7498
    }
7499
 
7500
    public void unsetEx() {
7501
      this.ex = null;
7502
    }
7503
 
7504
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7505
    public boolean isSetEx() {
7506
      return this.ex != null;
7507
    }
7508
 
7509
    public void setExIsSet(boolean value) {
7510
      if (!value) {
7511
        this.ex = null;
7512
      }
7513
    }
7514
 
7515
    public void setFieldValue(_Fields field, Object value) {
7516
      switch (field) {
7517
      case SUCCESS:
7518
        if (value == null) {
7519
          unsetSuccess();
7520
        } else {
7521
          setSuccess((Boolean)value);
7522
        }
7523
        break;
7524
 
7525
      case EX:
7526
        if (value == null) {
7527
          unsetEx();
7528
        } else {
7529
          setEx((TransactionServiceException)value);
7530
        }
7531
        break;
7532
 
7533
      }
7534
    }
7535
 
7536
    public void setFieldValue(int fieldID, Object value) {
7537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7538
    }
7539
 
7540
    public Object getFieldValue(_Fields field) {
7541
      switch (field) {
7542
      case SUCCESS:
7543
        return new Boolean(isSuccess());
7544
 
7545
      case EX:
7546
        return getEx();
7547
 
7548
      }
7549
      throw new IllegalStateException();
7550
    }
7551
 
7552
    public Object getFieldValue(int fieldId) {
7553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7554
    }
7555
 
7556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7557
    public boolean isSet(_Fields field) {
7558
      switch (field) {
7559
      case SUCCESS:
7560
        return isSetSuccess();
7561
      case EX:
7562
        return isSetEx();
7563
      }
7564
      throw new IllegalStateException();
7565
    }
7566
 
7567
    public boolean isSet(int fieldID) {
7568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7569
    }
7570
 
7571
    @Override
7572
    public boolean equals(Object that) {
7573
      if (that == null)
7574
        return false;
1398 varun.gupt 7575
      if (that instanceof enqueueTransactionInfoEmail_result)
7576
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7577
      return false;
7578
    }
7579
 
1398 varun.gupt 7580
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7581
      if (that == null)
7582
        return false;
7583
 
7584
      boolean this_present_success = true;
7585
      boolean that_present_success = true;
7586
      if (this_present_success || that_present_success) {
7587
        if (!(this_present_success && that_present_success))
7588
          return false;
7589
        if (this.success != that.success)
7590
          return false;
7591
      }
7592
 
7593
      boolean this_present_ex = true && this.isSetEx();
7594
      boolean that_present_ex = true && that.isSetEx();
7595
      if (this_present_ex || that_present_ex) {
7596
        if (!(this_present_ex && that_present_ex))
7597
          return false;
7598
        if (!this.ex.equals(that.ex))
7599
          return false;
7600
      }
7601
 
7602
      return true;
7603
    }
7604
 
7605
    @Override
7606
    public int hashCode() {
7607
      return 0;
7608
    }
7609
 
1398 varun.gupt 7610
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7611
      if (!getClass().equals(other.getClass())) {
7612
        return getClass().getName().compareTo(other.getClass().getName());
7613
      }
7614
 
7615
      int lastComparison = 0;
1398 varun.gupt 7616
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7617
 
7618
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7619
      if (lastComparison != 0) {
7620
        return lastComparison;
7621
      }
7622
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7623
      if (lastComparison != 0) {
7624
        return lastComparison;
7625
      }
7626
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7627
      if (lastComparison != 0) {
7628
        return lastComparison;
7629
      }
7630
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7631
      if (lastComparison != 0) {
7632
        return lastComparison;
7633
      }
7634
      return 0;
7635
    }
7636
 
7637
    public void read(TProtocol iprot) throws TException {
7638
      TField field;
7639
      iprot.readStructBegin();
7640
      while (true)
7641
      {
7642
        field = iprot.readFieldBegin();
7643
        if (field.type == TType.STOP) { 
7644
          break;
7645
        }
7646
        _Fields fieldId = _Fields.findByThriftId(field.id);
7647
        if (fieldId == null) {
7648
          TProtocolUtil.skip(iprot, field.type);
7649
        } else {
7650
          switch (fieldId) {
7651
            case SUCCESS:
7652
              if (field.type == TType.BOOL) {
7653
                this.success = iprot.readBool();
7654
                setSuccessIsSet(true);
7655
              } else { 
7656
                TProtocolUtil.skip(iprot, field.type);
7657
              }
7658
              break;
7659
            case EX:
7660
              if (field.type == TType.STRUCT) {
7661
                this.ex = new TransactionServiceException();
7662
                this.ex.read(iprot);
7663
              } else { 
7664
                TProtocolUtil.skip(iprot, field.type);
7665
              }
7666
              break;
7667
          }
7668
          iprot.readFieldEnd();
7669
        }
7670
      }
7671
      iprot.readStructEnd();
7672
      validate();
7673
    }
7674
 
7675
    public void write(TProtocol oprot) throws TException {
7676
      oprot.writeStructBegin(STRUCT_DESC);
7677
 
7678
      if (this.isSetSuccess()) {
7679
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7680
        oprot.writeBool(this.success);
7681
        oprot.writeFieldEnd();
7682
      } else if (this.isSetEx()) {
7683
        oprot.writeFieldBegin(EX_FIELD_DESC);
7684
        this.ex.write(oprot);
7685
        oprot.writeFieldEnd();
7686
      }
7687
      oprot.writeFieldStop();
7688
      oprot.writeStructEnd();
7689
    }
7690
 
7691
    @Override
7692
    public String toString() {
1398 varun.gupt 7693
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 7694
      boolean first = true;
7695
 
7696
      sb.append("success:");
7697
      sb.append(this.success);
7698
      first = false;
7699
      if (!first) sb.append(", ");
7700
      sb.append("ex:");
7701
      if (this.ex == null) {
7702
        sb.append("null");
7703
      } else {
7704
        sb.append(this.ex);
7705
      }
7706
      first = false;
7707
      sb.append(")");
7708
      return sb.toString();
7709
    }
7710
 
7711
    public void validate() throws TException {
7712
      // check for required fields
7713
    }
7714
 
7715
  }
7716
 
483 rajveer 7717
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
7718
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 7719
 
483 rajveer 7720
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7721
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
7722
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
7723
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 7724
 
483 rajveer 7725
    private OrderStatus status;
7726
    private long from_date;
7727
    private long to_date;
7728
    private long warehouse_id;
68 ashish 7729
 
7730
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7731
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7732
      /**
7733
       * 
7734
       * @see OrderStatus
7735
       */
7736
      STATUS((short)1, "status"),
7737
      FROM_DATE((short)2, "from_date"),
7738
      TO_DATE((short)3, "to_date"),
7739
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 7740
 
7741
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7742
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7743
 
7744
      static {
7745
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7746
          byId.put((int)field._thriftId, field);
7747
          byName.put(field.getFieldName(), field);
7748
        }
7749
      }
7750
 
7751
      /**
7752
       * Find the _Fields constant that matches fieldId, or null if its not found.
7753
       */
7754
      public static _Fields findByThriftId(int fieldId) {
7755
        return byId.get(fieldId);
7756
      }
7757
 
7758
      /**
7759
       * Find the _Fields constant that matches fieldId, throwing an exception
7760
       * if it is not found.
7761
       */
7762
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7763
        _Fields fields = findByThriftId(fieldId);
7764
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7765
        return fields;
7766
      }
7767
 
7768
      /**
7769
       * Find the _Fields constant that matches name, or null if its not found.
7770
       */
7771
      public static _Fields findByName(String name) {
7772
        return byName.get(name);
7773
      }
7774
 
7775
      private final short _thriftId;
7776
      private final String _fieldName;
7777
 
7778
      _Fields(short thriftId, String fieldName) {
7779
        _thriftId = thriftId;
7780
        _fieldName = fieldName;
7781
      }
7782
 
7783
      public short getThriftFieldId() {
7784
        return _thriftId;
7785
      }
7786
 
7787
      public String getFieldName() {
7788
        return _fieldName;
7789
      }
7790
    }
7791
 
7792
    // isset id assignments
483 rajveer 7793
    private static final int __FROM_DATE_ISSET_ID = 0;
7794
    private static final int __TO_DATE_ISSET_ID = 1;
7795
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7796
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 7797
 
7798
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 7799
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7800
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7801
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 7802
          new FieldValueMetaData(TType.I64)));
483 rajveer 7803
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
7804
          new FieldValueMetaData(TType.I64)));
7805
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7806
          new FieldValueMetaData(TType.I64)));
68 ashish 7807
    }});
7808
 
7809
    static {
483 rajveer 7810
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 7811
    }
7812
 
483 rajveer 7813
    public getAllOrders_args() {
68 ashish 7814
    }
7815
 
483 rajveer 7816
    public getAllOrders_args(
7817
      OrderStatus status,
7818
      long from_date,
7819
      long to_date,
7820
      long warehouse_id)
68 ashish 7821
    {
7822
      this();
483 rajveer 7823
      this.status = status;
7824
      this.from_date = from_date;
7825
      setFrom_dateIsSet(true);
7826
      this.to_date = to_date;
7827
      setTo_dateIsSet(true);
7828
      this.warehouse_id = warehouse_id;
7829
      setWarehouse_idIsSet(true);
68 ashish 7830
    }
7831
 
7832
    /**
7833
     * Performs a deep copy on <i>other</i>.
7834
     */
483 rajveer 7835
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 7836
      __isset_bit_vector.clear();
7837
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 7838
      if (other.isSetStatus()) {
7839
        this.status = other.status;
7840
      }
7841
      this.from_date = other.from_date;
7842
      this.to_date = other.to_date;
7843
      this.warehouse_id = other.warehouse_id;
68 ashish 7844
    }
7845
 
483 rajveer 7846
    public getAllOrders_args deepCopy() {
7847
      return new getAllOrders_args(this);
68 ashish 7848
    }
7849
 
7850
    @Deprecated
483 rajveer 7851
    public getAllOrders_args clone() {
7852
      return new getAllOrders_args(this);
68 ashish 7853
    }
7854
 
483 rajveer 7855
    /**
7856
     * 
7857
     * @see OrderStatus
7858
     */
7859
    public OrderStatus getStatus() {
7860
      return this.status;
68 ashish 7861
    }
7862
 
483 rajveer 7863
    /**
7864
     * 
7865
     * @see OrderStatus
7866
     */
7867
    public getAllOrders_args setStatus(OrderStatus status) {
7868
      this.status = status;
68 ashish 7869
      return this;
7870
    }
7871
 
483 rajveer 7872
    public void unsetStatus() {
7873
      this.status = null;
68 ashish 7874
    }
7875
 
483 rajveer 7876
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7877
    public boolean isSetStatus() {
7878
      return this.status != null;
68 ashish 7879
    }
7880
 
483 rajveer 7881
    public void setStatusIsSet(boolean value) {
7882
      if (!value) {
7883
        this.status = null;
68 ashish 7884
      }
7885
    }
7886
 
483 rajveer 7887
    public long getFrom_date() {
7888
      return this.from_date;
68 ashish 7889
    }
7890
 
483 rajveer 7891
    public getAllOrders_args setFrom_date(long from_date) {
7892
      this.from_date = from_date;
7893
      setFrom_dateIsSet(true);
7894
      return this;
68 ashish 7895
    }
7896
 
483 rajveer 7897
    public void unsetFrom_date() {
7898
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 7899
    }
7900
 
483 rajveer 7901
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
7902
    public boolean isSetFrom_date() {
7903
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 7904
    }
7905
 
483 rajveer 7906
    public void setFrom_dateIsSet(boolean value) {
7907
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 7908
    }
7909
 
483 rajveer 7910
    public long getTo_date() {
7911
      return this.to_date;
68 ashish 7912
    }
7913
 
483 rajveer 7914
    public getAllOrders_args setTo_date(long to_date) {
7915
      this.to_date = to_date;
7916
      setTo_dateIsSet(true);
68 ashish 7917
      return this;
7918
    }
7919
 
483 rajveer 7920
    public void unsetTo_date() {
7921
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 7922
    }
7923
 
483 rajveer 7924
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
7925
    public boolean isSetTo_date() {
7926
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 7927
    }
7928
 
483 rajveer 7929
    public void setTo_dateIsSet(boolean value) {
7930
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 7931
    }
7932
 
483 rajveer 7933
    public long getWarehouse_id() {
7934
      return this.warehouse_id;
68 ashish 7935
    }
7936
 
483 rajveer 7937
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
7938
      this.warehouse_id = warehouse_id;
7939
      setWarehouse_idIsSet(true);
68 ashish 7940
      return this;
7941
    }
7942
 
483 rajveer 7943
    public void unsetWarehouse_id() {
7944
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7945
    }
7946
 
483 rajveer 7947
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7948
    public boolean isSetWarehouse_id() {
7949
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7950
    }
7951
 
483 rajveer 7952
    public void setWarehouse_idIsSet(boolean value) {
7953
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 7954
    }
7955
 
7956
    public void setFieldValue(_Fields field, Object value) {
7957
      switch (field) {
483 rajveer 7958
      case STATUS:
68 ashish 7959
        if (value == null) {
483 rajveer 7960
          unsetStatus();
68 ashish 7961
        } else {
483 rajveer 7962
          setStatus((OrderStatus)value);
68 ashish 7963
        }
7964
        break;
7965
 
483 rajveer 7966
      case FROM_DATE:
68 ashish 7967
        if (value == null) {
483 rajveer 7968
          unsetFrom_date();
68 ashish 7969
        } else {
483 rajveer 7970
          setFrom_date((Long)value);
68 ashish 7971
        }
7972
        break;
7973
 
483 rajveer 7974
      case TO_DATE:
7975
        if (value == null) {
7976
          unsetTo_date();
7977
        } else {
7978
          setTo_date((Long)value);
7979
        }
7980
        break;
7981
 
7982
      case WAREHOUSE_ID:
7983
        if (value == null) {
7984
          unsetWarehouse_id();
7985
        } else {
7986
          setWarehouse_id((Long)value);
7987
        }
7988
        break;
7989
 
68 ashish 7990
      }
7991
    }
7992
 
7993
    public void setFieldValue(int fieldID, Object value) {
7994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7995
    }
7996
 
7997
    public Object getFieldValue(_Fields field) {
7998
      switch (field) {
483 rajveer 7999
      case STATUS:
8000
        return getStatus();
68 ashish 8001
 
483 rajveer 8002
      case FROM_DATE:
8003
        return new Long(getFrom_date());
68 ashish 8004
 
483 rajveer 8005
      case TO_DATE:
8006
        return new Long(getTo_date());
8007
 
8008
      case WAREHOUSE_ID:
8009
        return new Long(getWarehouse_id());
8010
 
68 ashish 8011
      }
8012
      throw new IllegalStateException();
8013
    }
8014
 
8015
    public Object getFieldValue(int fieldId) {
8016
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8017
    }
8018
 
8019
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8020
    public boolean isSet(_Fields field) {
8021
      switch (field) {
483 rajveer 8022
      case STATUS:
8023
        return isSetStatus();
8024
      case FROM_DATE:
8025
        return isSetFrom_date();
8026
      case TO_DATE:
8027
        return isSetTo_date();
8028
      case WAREHOUSE_ID:
8029
        return isSetWarehouse_id();
68 ashish 8030
      }
8031
      throw new IllegalStateException();
8032
    }
8033
 
8034
    public boolean isSet(int fieldID) {
8035
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8036
    }
8037
 
8038
    @Override
8039
    public boolean equals(Object that) {
8040
      if (that == null)
8041
        return false;
483 rajveer 8042
      if (that instanceof getAllOrders_args)
8043
        return this.equals((getAllOrders_args)that);
68 ashish 8044
      return false;
8045
    }
8046
 
483 rajveer 8047
    public boolean equals(getAllOrders_args that) {
68 ashish 8048
      if (that == null)
8049
        return false;
8050
 
483 rajveer 8051
      boolean this_present_status = true && this.isSetStatus();
8052
      boolean that_present_status = true && that.isSetStatus();
8053
      if (this_present_status || that_present_status) {
8054
        if (!(this_present_status && that_present_status))
68 ashish 8055
          return false;
483 rajveer 8056
        if (!this.status.equals(that.status))
68 ashish 8057
          return false;
8058
      }
8059
 
483 rajveer 8060
      boolean this_present_from_date = true;
8061
      boolean that_present_from_date = true;
8062
      if (this_present_from_date || that_present_from_date) {
8063
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8064
          return false;
483 rajveer 8065
        if (this.from_date != that.from_date)
68 ashish 8066
          return false;
8067
      }
8068
 
483 rajveer 8069
      boolean this_present_to_date = true;
8070
      boolean that_present_to_date = true;
8071
      if (this_present_to_date || that_present_to_date) {
8072
        if (!(this_present_to_date && that_present_to_date))
8073
          return false;
8074
        if (this.to_date != that.to_date)
8075
          return false;
68 ashish 8076
      }
8077
 
483 rajveer 8078
      boolean this_present_warehouse_id = true;
8079
      boolean that_present_warehouse_id = true;
8080
      if (this_present_warehouse_id || that_present_warehouse_id) {
8081
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8082
          return false;
483 rajveer 8083
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8084
          return false;
8085
      }
8086
 
8087
      return true;
8088
    }
8089
 
8090
    @Override
8091
    public int hashCode() {
8092
      return 0;
8093
    }
8094
 
483 rajveer 8095
    public int compareTo(getAllOrders_args other) {
68 ashish 8096
      if (!getClass().equals(other.getClass())) {
8097
        return getClass().getName().compareTo(other.getClass().getName());
8098
      }
8099
 
8100
      int lastComparison = 0;
483 rajveer 8101
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8102
 
483 rajveer 8103
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8104
      if (lastComparison != 0) {
8105
        return lastComparison;
8106
      }
483 rajveer 8107
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8108
      if (lastComparison != 0) {
8109
        return lastComparison;
8110
      }
483 rajveer 8111
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8112
      if (lastComparison != 0) {
8113
        return lastComparison;
8114
      }
8115
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8116
      if (lastComparison != 0) {
8117
        return lastComparison;
8118
      }
8119
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8120
      if (lastComparison != 0) {
8121
        return lastComparison;
8122
      }
8123
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8124
      if (lastComparison != 0) {
8125
        return lastComparison;
8126
      }
8127
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8128
      if (lastComparison != 0) {
8129
        return lastComparison;
8130
      }
8131
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8132
      if (lastComparison != 0) {
8133
        return lastComparison;
8134
      }
68 ashish 8135
      return 0;
8136
    }
8137
 
8138
    public void read(TProtocol iprot) throws TException {
8139
      TField field;
8140
      iprot.readStructBegin();
8141
      while (true)
8142
      {
8143
        field = iprot.readFieldBegin();
8144
        if (field.type == TType.STOP) { 
8145
          break;
8146
        }
8147
        _Fields fieldId = _Fields.findByThriftId(field.id);
8148
        if (fieldId == null) {
8149
          TProtocolUtil.skip(iprot, field.type);
8150
        } else {
8151
          switch (fieldId) {
483 rajveer 8152
            case STATUS:
8153
              if (field.type == TType.I32) {
8154
                this.status = OrderStatus.findByValue(iprot.readI32());
8155
              } else { 
8156
                TProtocolUtil.skip(iprot, field.type);
8157
              }
8158
              break;
8159
            case FROM_DATE:
68 ashish 8160
              if (field.type == TType.I64) {
483 rajveer 8161
                this.from_date = iprot.readI64();
8162
                setFrom_dateIsSet(true);
68 ashish 8163
              } else { 
8164
                TProtocolUtil.skip(iprot, field.type);
8165
              }
8166
              break;
483 rajveer 8167
            case TO_DATE:
8168
              if (field.type == TType.I64) {
8169
                this.to_date = iprot.readI64();
8170
                setTo_dateIsSet(true);
8171
              } else { 
8172
                TProtocolUtil.skip(iprot, field.type);
8173
              }
8174
              break;
8175
            case WAREHOUSE_ID:
8176
              if (field.type == TType.I64) {
8177
                this.warehouse_id = iprot.readI64();
8178
                setWarehouse_idIsSet(true);
8179
              } else { 
8180
                TProtocolUtil.skip(iprot, field.type);
8181
              }
8182
              break;
68 ashish 8183
          }
8184
          iprot.readFieldEnd();
8185
        }
8186
      }
8187
      iprot.readStructEnd();
8188
      validate();
8189
    }
8190
 
8191
    public void write(TProtocol oprot) throws TException {
8192
      validate();
8193
 
8194
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8195
      if (this.status != null) {
8196
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8197
        oprot.writeI32(this.status.getValue());
8198
        oprot.writeFieldEnd();
8199
      }
8200
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8201
      oprot.writeI64(this.from_date);
68 ashish 8202
      oprot.writeFieldEnd();
483 rajveer 8203
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8204
      oprot.writeI64(this.to_date);
8205
      oprot.writeFieldEnd();
8206
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8207
      oprot.writeI64(this.warehouse_id);
8208
      oprot.writeFieldEnd();
68 ashish 8209
      oprot.writeFieldStop();
8210
      oprot.writeStructEnd();
8211
    }
8212
 
8213
    @Override
8214
    public String toString() {
483 rajveer 8215
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8216
      boolean first = true;
8217
 
483 rajveer 8218
      sb.append("status:");
8219
      if (this.status == null) {
8220
        sb.append("null");
8221
      } else {
8222
        String status_name = status.name();
8223
        if (status_name != null) {
8224
          sb.append(status_name);
8225
          sb.append(" (");
8226
        }
8227
        sb.append(this.status);
8228
        if (status_name != null) {
8229
          sb.append(")");
8230
        }
8231
      }
68 ashish 8232
      first = false;
483 rajveer 8233
      if (!first) sb.append(", ");
8234
      sb.append("from_date:");
8235
      sb.append(this.from_date);
8236
      first = false;
8237
      if (!first) sb.append(", ");
8238
      sb.append("to_date:");
8239
      sb.append(this.to_date);
8240
      first = false;
8241
      if (!first) sb.append(", ");
8242
      sb.append("warehouse_id:");
8243
      sb.append(this.warehouse_id);
8244
      first = false;
68 ashish 8245
      sb.append(")");
8246
      return sb.toString();
8247
    }
8248
 
8249
    public void validate() throws TException {
8250
      // check for required fields
8251
    }
8252
 
8253
  }
8254
 
483 rajveer 8255
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8256
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8257
 
483 rajveer 8258
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8259
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8260
 
483 rajveer 8261
    private List<Order> success;
68 ashish 8262
    private TransactionServiceException ex;
8263
 
8264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8265
    public enum _Fields implements TFieldIdEnum {
8266
      SUCCESS((short)0, "success"),
8267
      EX((short)1, "ex");
8268
 
8269
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8270
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8271
 
8272
      static {
8273
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8274
          byId.put((int)field._thriftId, field);
8275
          byName.put(field.getFieldName(), field);
8276
        }
8277
      }
8278
 
8279
      /**
8280
       * Find the _Fields constant that matches fieldId, or null if its not found.
8281
       */
8282
      public static _Fields findByThriftId(int fieldId) {
8283
        return byId.get(fieldId);
8284
      }
8285
 
8286
      /**
8287
       * Find the _Fields constant that matches fieldId, throwing an exception
8288
       * if it is not found.
8289
       */
8290
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8291
        _Fields fields = findByThriftId(fieldId);
8292
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8293
        return fields;
8294
      }
8295
 
8296
      /**
8297
       * Find the _Fields constant that matches name, or null if its not found.
8298
       */
8299
      public static _Fields findByName(String name) {
8300
        return byName.get(name);
8301
      }
8302
 
8303
      private final short _thriftId;
8304
      private final String _fieldName;
8305
 
8306
      _Fields(short thriftId, String fieldName) {
8307
        _thriftId = thriftId;
8308
        _fieldName = fieldName;
8309
      }
8310
 
8311
      public short getThriftFieldId() {
8312
        return _thriftId;
8313
      }
8314
 
8315
      public String getFieldName() {
8316
        return _fieldName;
8317
      }
8318
    }
8319
 
8320
    // isset id assignments
8321
 
8322
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8323
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8324
          new ListMetaData(TType.LIST, 
8325
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8326
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8327
          new FieldValueMetaData(TType.STRUCT)));
8328
    }});
8329
 
8330
    static {
483 rajveer 8331
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8332
    }
8333
 
483 rajveer 8334
    public getAllOrders_result() {
68 ashish 8335
    }
8336
 
483 rajveer 8337
    public getAllOrders_result(
8338
      List<Order> success,
68 ashish 8339
      TransactionServiceException ex)
8340
    {
8341
      this();
8342
      this.success = success;
8343
      this.ex = ex;
8344
    }
8345
 
8346
    /**
8347
     * Performs a deep copy on <i>other</i>.
8348
     */
483 rajveer 8349
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8350
      if (other.isSetSuccess()) {
483 rajveer 8351
        List<Order> __this__success = new ArrayList<Order>();
8352
        for (Order other_element : other.success) {
8353
          __this__success.add(new Order(other_element));
8354
        }
8355
        this.success = __this__success;
68 ashish 8356
      }
8357
      if (other.isSetEx()) {
8358
        this.ex = new TransactionServiceException(other.ex);
8359
      }
8360
    }
8361
 
483 rajveer 8362
    public getAllOrders_result deepCopy() {
8363
      return new getAllOrders_result(this);
68 ashish 8364
    }
8365
 
8366
    @Deprecated
483 rajveer 8367
    public getAllOrders_result clone() {
8368
      return new getAllOrders_result(this);
68 ashish 8369
    }
8370
 
483 rajveer 8371
    public int getSuccessSize() {
8372
      return (this.success == null) ? 0 : this.success.size();
8373
    }
8374
 
8375
    public java.util.Iterator<Order> getSuccessIterator() {
8376
      return (this.success == null) ? null : this.success.iterator();
8377
    }
8378
 
8379
    public void addToSuccess(Order elem) {
8380
      if (this.success == null) {
8381
        this.success = new ArrayList<Order>();
8382
      }
8383
      this.success.add(elem);
8384
    }
8385
 
8386
    public List<Order> getSuccess() {
68 ashish 8387
      return this.success;
8388
    }
8389
 
483 rajveer 8390
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8391
      this.success = success;
8392
      return this;
8393
    }
8394
 
8395
    public void unsetSuccess() {
8396
      this.success = null;
8397
    }
8398
 
8399
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8400
    public boolean isSetSuccess() {
8401
      return this.success != null;
8402
    }
8403
 
8404
    public void setSuccessIsSet(boolean value) {
8405
      if (!value) {
8406
        this.success = null;
8407
      }
8408
    }
8409
 
8410
    public TransactionServiceException getEx() {
8411
      return this.ex;
8412
    }
8413
 
483 rajveer 8414
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8415
      this.ex = ex;
8416
      return this;
8417
    }
8418
 
8419
    public void unsetEx() {
8420
      this.ex = null;
8421
    }
8422
 
8423
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8424
    public boolean isSetEx() {
8425
      return this.ex != null;
8426
    }
8427
 
8428
    public void setExIsSet(boolean value) {
8429
      if (!value) {
8430
        this.ex = null;
8431
      }
8432
    }
8433
 
8434
    public void setFieldValue(_Fields field, Object value) {
8435
      switch (field) {
8436
      case SUCCESS:
8437
        if (value == null) {
8438
          unsetSuccess();
8439
        } else {
483 rajveer 8440
          setSuccess((List<Order>)value);
68 ashish 8441
        }
8442
        break;
8443
 
8444
      case EX:
8445
        if (value == null) {
8446
          unsetEx();
8447
        } else {
8448
          setEx((TransactionServiceException)value);
8449
        }
8450
        break;
8451
 
8452
      }
8453
    }
8454
 
8455
    public void setFieldValue(int fieldID, Object value) {
8456
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8457
    }
8458
 
8459
    public Object getFieldValue(_Fields field) {
8460
      switch (field) {
8461
      case SUCCESS:
8462
        return getSuccess();
8463
 
8464
      case EX:
8465
        return getEx();
8466
 
8467
      }
8468
      throw new IllegalStateException();
8469
    }
8470
 
8471
    public Object getFieldValue(int fieldId) {
8472
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8473
    }
8474
 
8475
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8476
    public boolean isSet(_Fields field) {
8477
      switch (field) {
8478
      case SUCCESS:
8479
        return isSetSuccess();
8480
      case EX:
8481
        return isSetEx();
8482
      }
8483
      throw new IllegalStateException();
8484
    }
8485
 
8486
    public boolean isSet(int fieldID) {
8487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8488
    }
8489
 
8490
    @Override
8491
    public boolean equals(Object that) {
8492
      if (that == null)
8493
        return false;
483 rajveer 8494
      if (that instanceof getAllOrders_result)
8495
        return this.equals((getAllOrders_result)that);
68 ashish 8496
      return false;
8497
    }
8498
 
483 rajveer 8499
    public boolean equals(getAllOrders_result that) {
68 ashish 8500
      if (that == null)
8501
        return false;
8502
 
8503
      boolean this_present_success = true && this.isSetSuccess();
8504
      boolean that_present_success = true && that.isSetSuccess();
8505
      if (this_present_success || that_present_success) {
8506
        if (!(this_present_success && that_present_success))
8507
          return false;
8508
        if (!this.success.equals(that.success))
8509
          return false;
8510
      }
8511
 
8512
      boolean this_present_ex = true && this.isSetEx();
8513
      boolean that_present_ex = true && that.isSetEx();
8514
      if (this_present_ex || that_present_ex) {
8515
        if (!(this_present_ex && that_present_ex))
8516
          return false;
8517
        if (!this.ex.equals(that.ex))
8518
          return false;
8519
      }
8520
 
8521
      return true;
8522
    }
8523
 
8524
    @Override
8525
    public int hashCode() {
8526
      return 0;
8527
    }
8528
 
483 rajveer 8529
    public int compareTo(getAllOrders_result other) {
8530
      if (!getClass().equals(other.getClass())) {
8531
        return getClass().getName().compareTo(other.getClass().getName());
8532
      }
8533
 
8534
      int lastComparison = 0;
8535
      getAllOrders_result typedOther = (getAllOrders_result)other;
8536
 
8537
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8538
      if (lastComparison != 0) {
8539
        return lastComparison;
8540
      }
8541
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8542
      if (lastComparison != 0) {
8543
        return lastComparison;
8544
      }
8545
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8546
      if (lastComparison != 0) {
8547
        return lastComparison;
8548
      }
8549
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8550
      if (lastComparison != 0) {
8551
        return lastComparison;
8552
      }
8553
      return 0;
8554
    }
8555
 
68 ashish 8556
    public void read(TProtocol iprot) throws TException {
8557
      TField field;
8558
      iprot.readStructBegin();
8559
      while (true)
8560
      {
8561
        field = iprot.readFieldBegin();
8562
        if (field.type == TType.STOP) { 
8563
          break;
8564
        }
8565
        _Fields fieldId = _Fields.findByThriftId(field.id);
8566
        if (fieldId == null) {
8567
          TProtocolUtil.skip(iprot, field.type);
8568
        } else {
8569
          switch (fieldId) {
8570
            case SUCCESS:
483 rajveer 8571
              if (field.type == TType.LIST) {
8572
                {
684 chandransh 8573
                  TList _list16 = iprot.readListBegin();
8574
                  this.success = new ArrayList<Order>(_list16.size);
8575
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8576
                  {
684 chandransh 8577
                    Order _elem18;
8578
                    _elem18 = new Order();
8579
                    _elem18.read(iprot);
8580
                    this.success.add(_elem18);
483 rajveer 8581
                  }
8582
                  iprot.readListEnd();
8583
                }
68 ashish 8584
              } else { 
8585
                TProtocolUtil.skip(iprot, field.type);
8586
              }
8587
              break;
8588
            case EX:
8589
              if (field.type == TType.STRUCT) {
8590
                this.ex = new TransactionServiceException();
8591
                this.ex.read(iprot);
8592
              } else { 
8593
                TProtocolUtil.skip(iprot, field.type);
8594
              }
8595
              break;
8596
          }
8597
          iprot.readFieldEnd();
8598
        }
8599
      }
8600
      iprot.readStructEnd();
8601
      validate();
8602
    }
8603
 
8604
    public void write(TProtocol oprot) throws TException {
8605
      oprot.writeStructBegin(STRUCT_DESC);
8606
 
8607
      if (this.isSetSuccess()) {
8608
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8609
        {
8610
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8611
          for (Order _iter19 : this.success)
483 rajveer 8612
          {
684 chandransh 8613
            _iter19.write(oprot);
483 rajveer 8614
          }
8615
          oprot.writeListEnd();
8616
        }
68 ashish 8617
        oprot.writeFieldEnd();
8618
      } else if (this.isSetEx()) {
8619
        oprot.writeFieldBegin(EX_FIELD_DESC);
8620
        this.ex.write(oprot);
8621
        oprot.writeFieldEnd();
8622
      }
8623
      oprot.writeFieldStop();
8624
      oprot.writeStructEnd();
8625
    }
8626
 
8627
    @Override
8628
    public String toString() {
483 rajveer 8629
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8630
      boolean first = true;
8631
 
8632
      sb.append("success:");
8633
      if (this.success == null) {
8634
        sb.append("null");
8635
      } else {
8636
        sb.append(this.success);
8637
      }
8638
      first = false;
8639
      if (!first) sb.append(", ");
8640
      sb.append("ex:");
8641
      if (this.ex == null) {
8642
        sb.append("null");
8643
      } else {
8644
        sb.append(this.ex);
8645
      }
8646
      first = false;
8647
      sb.append(")");
8648
      return sb.toString();
8649
    }
8650
 
8651
    public void validate() throws TException {
8652
      // check for required fields
8653
    }
8654
 
8655
  }
8656
 
1022 varun.gupt 8657
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8658
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8659
 
8660
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8661
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8662
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8663
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8664
 
8665
    private OrderStatus status;
8666
    private long start_billing_date;
8667
    private long end_billing_date;
8668
    private long warehouse_id;
8669
 
8670
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8671
    public enum _Fields implements TFieldIdEnum {
8672
      /**
8673
       * 
8674
       * @see OrderStatus
8675
       */
8676
      STATUS((short)1, "status"),
8677
      START_BILLING_DATE((short)2, "start_billing_date"),
8678
      END_BILLING_DATE((short)3, "end_billing_date"),
8679
      WAREHOUSE_ID((short)4, "warehouse_id");
8680
 
8681
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8682
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8683
 
8684
      static {
8685
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8686
          byId.put((int)field._thriftId, field);
8687
          byName.put(field.getFieldName(), field);
8688
        }
8689
      }
8690
 
8691
      /**
8692
       * Find the _Fields constant that matches fieldId, or null if its not found.
8693
       */
8694
      public static _Fields findByThriftId(int fieldId) {
8695
        return byId.get(fieldId);
8696
      }
8697
 
8698
      /**
8699
       * Find the _Fields constant that matches fieldId, throwing an exception
8700
       * if it is not found.
8701
       */
8702
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8703
        _Fields fields = findByThriftId(fieldId);
8704
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8705
        return fields;
8706
      }
8707
 
8708
      /**
8709
       * Find the _Fields constant that matches name, or null if its not found.
8710
       */
8711
      public static _Fields findByName(String name) {
8712
        return byName.get(name);
8713
      }
8714
 
8715
      private final short _thriftId;
8716
      private final String _fieldName;
8717
 
8718
      _Fields(short thriftId, String fieldName) {
8719
        _thriftId = thriftId;
8720
        _fieldName = fieldName;
8721
      }
8722
 
8723
      public short getThriftFieldId() {
8724
        return _thriftId;
8725
      }
8726
 
8727
      public String getFieldName() {
8728
        return _fieldName;
8729
      }
8730
    }
8731
 
8732
    // isset id assignments
8733
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
8734
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
8735
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8736
    private BitSet __isset_bit_vector = new BitSet(3);
8737
 
8738
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8739
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8740
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8741
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
8742
          new FieldValueMetaData(TType.I64)));
8743
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
8744
          new FieldValueMetaData(TType.I64)));
8745
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8746
          new FieldValueMetaData(TType.I64)));
8747
    }});
8748
 
8749
    static {
8750
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
8751
    }
8752
 
8753
    public getOrdersByBillingDate_args() {
8754
    }
8755
 
8756
    public getOrdersByBillingDate_args(
8757
      OrderStatus status,
8758
      long start_billing_date,
8759
      long end_billing_date,
8760
      long warehouse_id)
8761
    {
8762
      this();
8763
      this.status = status;
8764
      this.start_billing_date = start_billing_date;
8765
      setStart_billing_dateIsSet(true);
8766
      this.end_billing_date = end_billing_date;
8767
      setEnd_billing_dateIsSet(true);
8768
      this.warehouse_id = warehouse_id;
8769
      setWarehouse_idIsSet(true);
8770
    }
8771
 
8772
    /**
8773
     * Performs a deep copy on <i>other</i>.
8774
     */
8775
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
8776
      __isset_bit_vector.clear();
8777
      __isset_bit_vector.or(other.__isset_bit_vector);
8778
      if (other.isSetStatus()) {
8779
        this.status = other.status;
8780
      }
8781
      this.start_billing_date = other.start_billing_date;
8782
      this.end_billing_date = other.end_billing_date;
8783
      this.warehouse_id = other.warehouse_id;
8784
    }
8785
 
8786
    public getOrdersByBillingDate_args deepCopy() {
8787
      return new getOrdersByBillingDate_args(this);
8788
    }
8789
 
8790
    @Deprecated
8791
    public getOrdersByBillingDate_args clone() {
8792
      return new getOrdersByBillingDate_args(this);
8793
    }
8794
 
8795
    /**
8796
     * 
8797
     * @see OrderStatus
8798
     */
8799
    public OrderStatus getStatus() {
8800
      return this.status;
8801
    }
8802
 
8803
    /**
8804
     * 
8805
     * @see OrderStatus
8806
     */
8807
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
8808
      this.status = status;
8809
      return this;
8810
    }
8811
 
8812
    public void unsetStatus() {
8813
      this.status = null;
8814
    }
8815
 
8816
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8817
    public boolean isSetStatus() {
8818
      return this.status != null;
8819
    }
8820
 
8821
    public void setStatusIsSet(boolean value) {
8822
      if (!value) {
8823
        this.status = null;
8824
      }
8825
    }
8826
 
8827
    public long getStart_billing_date() {
8828
      return this.start_billing_date;
8829
    }
8830
 
8831
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
8832
      this.start_billing_date = start_billing_date;
8833
      setStart_billing_dateIsSet(true);
8834
      return this;
8835
    }
8836
 
8837
    public void unsetStart_billing_date() {
8838
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
8839
    }
8840
 
8841
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
8842
    public boolean isSetStart_billing_date() {
8843
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
8844
    }
8845
 
8846
    public void setStart_billing_dateIsSet(boolean value) {
8847
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
8848
    }
8849
 
8850
    public long getEnd_billing_date() {
8851
      return this.end_billing_date;
8852
    }
8853
 
8854
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
8855
      this.end_billing_date = end_billing_date;
8856
      setEnd_billing_dateIsSet(true);
8857
      return this;
8858
    }
8859
 
8860
    public void unsetEnd_billing_date() {
8861
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
8862
    }
8863
 
8864
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
8865
    public boolean isSetEnd_billing_date() {
8866
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
8867
    }
8868
 
8869
    public void setEnd_billing_dateIsSet(boolean value) {
8870
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
8871
    }
8872
 
8873
    public long getWarehouse_id() {
8874
      return this.warehouse_id;
8875
    }
8876
 
8877
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
8878
      this.warehouse_id = warehouse_id;
8879
      setWarehouse_idIsSet(true);
8880
      return this;
8881
    }
8882
 
8883
    public void unsetWarehouse_id() {
8884
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
8885
    }
8886
 
8887
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8888
    public boolean isSetWarehouse_id() {
8889
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
8890
    }
8891
 
8892
    public void setWarehouse_idIsSet(boolean value) {
8893
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
8894
    }
8895
 
8896
    public void setFieldValue(_Fields field, Object value) {
8897
      switch (field) {
8898
      case STATUS:
8899
        if (value == null) {
8900
          unsetStatus();
8901
        } else {
8902
          setStatus((OrderStatus)value);
8903
        }
8904
        break;
8905
 
8906
      case START_BILLING_DATE:
8907
        if (value == null) {
8908
          unsetStart_billing_date();
8909
        } else {
8910
          setStart_billing_date((Long)value);
8911
        }
8912
        break;
8913
 
8914
      case END_BILLING_DATE:
8915
        if (value == null) {
8916
          unsetEnd_billing_date();
8917
        } else {
8918
          setEnd_billing_date((Long)value);
8919
        }
8920
        break;
8921
 
8922
      case WAREHOUSE_ID:
8923
        if (value == null) {
8924
          unsetWarehouse_id();
8925
        } else {
8926
          setWarehouse_id((Long)value);
8927
        }
8928
        break;
8929
 
8930
      }
8931
    }
8932
 
8933
    public void setFieldValue(int fieldID, Object value) {
8934
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8935
    }
8936
 
8937
    public Object getFieldValue(_Fields field) {
8938
      switch (field) {
8939
      case STATUS:
8940
        return getStatus();
8941
 
8942
      case START_BILLING_DATE:
8943
        return new Long(getStart_billing_date());
8944
 
8945
      case END_BILLING_DATE:
8946
        return new Long(getEnd_billing_date());
8947
 
8948
      case WAREHOUSE_ID:
8949
        return new Long(getWarehouse_id());
8950
 
8951
      }
8952
      throw new IllegalStateException();
8953
    }
8954
 
8955
    public Object getFieldValue(int fieldId) {
8956
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8957
    }
8958
 
8959
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8960
    public boolean isSet(_Fields field) {
8961
      switch (field) {
8962
      case STATUS:
8963
        return isSetStatus();
8964
      case START_BILLING_DATE:
8965
        return isSetStart_billing_date();
8966
      case END_BILLING_DATE:
8967
        return isSetEnd_billing_date();
8968
      case WAREHOUSE_ID:
8969
        return isSetWarehouse_id();
8970
      }
8971
      throw new IllegalStateException();
8972
    }
8973
 
8974
    public boolean isSet(int fieldID) {
8975
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8976
    }
8977
 
8978
    @Override
8979
    public boolean equals(Object that) {
8980
      if (that == null)
8981
        return false;
8982
      if (that instanceof getOrdersByBillingDate_args)
8983
        return this.equals((getOrdersByBillingDate_args)that);
8984
      return false;
8985
    }
8986
 
8987
    public boolean equals(getOrdersByBillingDate_args that) {
8988
      if (that == null)
8989
        return false;
8990
 
8991
      boolean this_present_status = true && this.isSetStatus();
8992
      boolean that_present_status = true && that.isSetStatus();
8993
      if (this_present_status || that_present_status) {
8994
        if (!(this_present_status && that_present_status))
8995
          return false;
8996
        if (!this.status.equals(that.status))
8997
          return false;
8998
      }
8999
 
9000
      boolean this_present_start_billing_date = true;
9001
      boolean that_present_start_billing_date = true;
9002
      if (this_present_start_billing_date || that_present_start_billing_date) {
9003
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9004
          return false;
9005
        if (this.start_billing_date != that.start_billing_date)
9006
          return false;
9007
      }
9008
 
9009
      boolean this_present_end_billing_date = true;
9010
      boolean that_present_end_billing_date = true;
9011
      if (this_present_end_billing_date || that_present_end_billing_date) {
9012
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9013
          return false;
9014
        if (this.end_billing_date != that.end_billing_date)
9015
          return false;
9016
      }
9017
 
9018
      boolean this_present_warehouse_id = true;
9019
      boolean that_present_warehouse_id = true;
9020
      if (this_present_warehouse_id || that_present_warehouse_id) {
9021
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9022
          return false;
9023
        if (this.warehouse_id != that.warehouse_id)
9024
          return false;
9025
      }
9026
 
9027
      return true;
9028
    }
9029
 
9030
    @Override
9031
    public int hashCode() {
9032
      return 0;
9033
    }
9034
 
9035
    public int compareTo(getOrdersByBillingDate_args other) {
9036
      if (!getClass().equals(other.getClass())) {
9037
        return getClass().getName().compareTo(other.getClass().getName());
9038
      }
9039
 
9040
      int lastComparison = 0;
9041
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9042
 
9043
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9044
      if (lastComparison != 0) {
9045
        return lastComparison;
9046
      }
9047
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9048
      if (lastComparison != 0) {
9049
        return lastComparison;
9050
      }
9051
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9052
      if (lastComparison != 0) {
9053
        return lastComparison;
9054
      }
9055
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9056
      if (lastComparison != 0) {
9057
        return lastComparison;
9058
      }
9059
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9060
      if (lastComparison != 0) {
9061
        return lastComparison;
9062
      }
9063
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9064
      if (lastComparison != 0) {
9065
        return lastComparison;
9066
      }
9067
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9068
      if (lastComparison != 0) {
9069
        return lastComparison;
9070
      }
9071
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9072
      if (lastComparison != 0) {
9073
        return lastComparison;
9074
      }
9075
      return 0;
9076
    }
9077
 
9078
    public void read(TProtocol iprot) throws TException {
9079
      TField field;
9080
      iprot.readStructBegin();
9081
      while (true)
9082
      {
9083
        field = iprot.readFieldBegin();
9084
        if (field.type == TType.STOP) { 
9085
          break;
9086
        }
9087
        _Fields fieldId = _Fields.findByThriftId(field.id);
9088
        if (fieldId == null) {
9089
          TProtocolUtil.skip(iprot, field.type);
9090
        } else {
9091
          switch (fieldId) {
9092
            case STATUS:
9093
              if (field.type == TType.I32) {
9094
                this.status = OrderStatus.findByValue(iprot.readI32());
9095
              } else { 
9096
                TProtocolUtil.skip(iprot, field.type);
9097
              }
9098
              break;
9099
            case START_BILLING_DATE:
9100
              if (field.type == TType.I64) {
9101
                this.start_billing_date = iprot.readI64();
9102
                setStart_billing_dateIsSet(true);
9103
              } else { 
9104
                TProtocolUtil.skip(iprot, field.type);
9105
              }
9106
              break;
9107
            case END_BILLING_DATE:
9108
              if (field.type == TType.I64) {
9109
                this.end_billing_date = iprot.readI64();
9110
                setEnd_billing_dateIsSet(true);
9111
              } else { 
9112
                TProtocolUtil.skip(iprot, field.type);
9113
              }
9114
              break;
9115
            case WAREHOUSE_ID:
9116
              if (field.type == TType.I64) {
9117
                this.warehouse_id = iprot.readI64();
9118
                setWarehouse_idIsSet(true);
9119
              } else { 
9120
                TProtocolUtil.skip(iprot, field.type);
9121
              }
9122
              break;
9123
          }
9124
          iprot.readFieldEnd();
9125
        }
9126
      }
9127
      iprot.readStructEnd();
9128
      validate();
9129
    }
9130
 
9131
    public void write(TProtocol oprot) throws TException {
9132
      validate();
9133
 
9134
      oprot.writeStructBegin(STRUCT_DESC);
9135
      if (this.status != null) {
9136
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9137
        oprot.writeI32(this.status.getValue());
9138
        oprot.writeFieldEnd();
9139
      }
9140
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9141
      oprot.writeI64(this.start_billing_date);
9142
      oprot.writeFieldEnd();
9143
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9144
      oprot.writeI64(this.end_billing_date);
9145
      oprot.writeFieldEnd();
9146
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9147
      oprot.writeI64(this.warehouse_id);
9148
      oprot.writeFieldEnd();
9149
      oprot.writeFieldStop();
9150
      oprot.writeStructEnd();
9151
    }
9152
 
9153
    @Override
9154
    public String toString() {
9155
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9156
      boolean first = true;
9157
 
9158
      sb.append("status:");
9159
      if (this.status == null) {
9160
        sb.append("null");
9161
      } else {
9162
        String status_name = status.name();
9163
        if (status_name != null) {
9164
          sb.append(status_name);
9165
          sb.append(" (");
9166
        }
9167
        sb.append(this.status);
9168
        if (status_name != null) {
9169
          sb.append(")");
9170
        }
9171
      }
9172
      first = false;
9173
      if (!first) sb.append(", ");
9174
      sb.append("start_billing_date:");
9175
      sb.append(this.start_billing_date);
9176
      first = false;
9177
      if (!first) sb.append(", ");
9178
      sb.append("end_billing_date:");
9179
      sb.append(this.end_billing_date);
9180
      first = false;
9181
      if (!first) sb.append(", ");
9182
      sb.append("warehouse_id:");
9183
      sb.append(this.warehouse_id);
9184
      first = false;
9185
      sb.append(")");
9186
      return sb.toString();
9187
    }
9188
 
9189
    public void validate() throws TException {
9190
      // check for required fields
9191
    }
9192
 
9193
  }
9194
 
9195
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9196
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9197
 
9198
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9199
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9200
 
9201
    private List<Order> success;
9202
    private TransactionServiceException ex;
9203
 
9204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9205
    public enum _Fields implements TFieldIdEnum {
9206
      SUCCESS((short)0, "success"),
9207
      EX((short)1, "ex");
9208
 
9209
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9211
 
9212
      static {
9213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9214
          byId.put((int)field._thriftId, field);
9215
          byName.put(field.getFieldName(), field);
9216
        }
9217
      }
9218
 
9219
      /**
9220
       * Find the _Fields constant that matches fieldId, or null if its not found.
9221
       */
9222
      public static _Fields findByThriftId(int fieldId) {
9223
        return byId.get(fieldId);
9224
      }
9225
 
9226
      /**
9227
       * Find the _Fields constant that matches fieldId, throwing an exception
9228
       * if it is not found.
9229
       */
9230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9231
        _Fields fields = findByThriftId(fieldId);
9232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9233
        return fields;
9234
      }
9235
 
9236
      /**
9237
       * Find the _Fields constant that matches name, or null if its not found.
9238
       */
9239
      public static _Fields findByName(String name) {
9240
        return byName.get(name);
9241
      }
9242
 
9243
      private final short _thriftId;
9244
      private final String _fieldName;
9245
 
9246
      _Fields(short thriftId, String fieldName) {
9247
        _thriftId = thriftId;
9248
        _fieldName = fieldName;
9249
      }
9250
 
9251
      public short getThriftFieldId() {
9252
        return _thriftId;
9253
      }
9254
 
9255
      public String getFieldName() {
9256
        return _fieldName;
9257
      }
9258
    }
9259
 
9260
    // isset id assignments
9261
 
9262
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9263
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9264
          new ListMetaData(TType.LIST, 
9265
              new StructMetaData(TType.STRUCT, Order.class))));
9266
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9267
          new FieldValueMetaData(TType.STRUCT)));
9268
    }});
9269
 
9270
    static {
9271
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9272
    }
9273
 
9274
    public getOrdersByBillingDate_result() {
9275
    }
9276
 
9277
    public getOrdersByBillingDate_result(
9278
      List<Order> success,
9279
      TransactionServiceException ex)
9280
    {
9281
      this();
9282
      this.success = success;
9283
      this.ex = ex;
9284
    }
9285
 
9286
    /**
9287
     * Performs a deep copy on <i>other</i>.
9288
     */
9289
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9290
      if (other.isSetSuccess()) {
9291
        List<Order> __this__success = new ArrayList<Order>();
9292
        for (Order other_element : other.success) {
9293
          __this__success.add(new Order(other_element));
9294
        }
9295
        this.success = __this__success;
9296
      }
9297
      if (other.isSetEx()) {
9298
        this.ex = new TransactionServiceException(other.ex);
9299
      }
9300
    }
9301
 
9302
    public getOrdersByBillingDate_result deepCopy() {
9303
      return new getOrdersByBillingDate_result(this);
9304
    }
9305
 
9306
    @Deprecated
9307
    public getOrdersByBillingDate_result clone() {
9308
      return new getOrdersByBillingDate_result(this);
9309
    }
9310
 
9311
    public int getSuccessSize() {
9312
      return (this.success == null) ? 0 : this.success.size();
9313
    }
9314
 
9315
    public java.util.Iterator<Order> getSuccessIterator() {
9316
      return (this.success == null) ? null : this.success.iterator();
9317
    }
9318
 
9319
    public void addToSuccess(Order elem) {
9320
      if (this.success == null) {
9321
        this.success = new ArrayList<Order>();
9322
      }
9323
      this.success.add(elem);
9324
    }
9325
 
9326
    public List<Order> getSuccess() {
9327
      return this.success;
9328
    }
9329
 
9330
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9331
      this.success = success;
9332
      return this;
9333
    }
9334
 
9335
    public void unsetSuccess() {
9336
      this.success = null;
9337
    }
9338
 
9339
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9340
    public boolean isSetSuccess() {
9341
      return this.success != null;
9342
    }
9343
 
9344
    public void setSuccessIsSet(boolean value) {
9345
      if (!value) {
9346
        this.success = null;
9347
      }
9348
    }
9349
 
9350
    public TransactionServiceException getEx() {
9351
      return this.ex;
9352
    }
9353
 
9354
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9355
      this.ex = ex;
9356
      return this;
9357
    }
9358
 
9359
    public void unsetEx() {
9360
      this.ex = null;
9361
    }
9362
 
9363
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9364
    public boolean isSetEx() {
9365
      return this.ex != null;
9366
    }
9367
 
9368
    public void setExIsSet(boolean value) {
9369
      if (!value) {
9370
        this.ex = null;
9371
      }
9372
    }
9373
 
9374
    public void setFieldValue(_Fields field, Object value) {
9375
      switch (field) {
9376
      case SUCCESS:
9377
        if (value == null) {
9378
          unsetSuccess();
9379
        } else {
9380
          setSuccess((List<Order>)value);
9381
        }
9382
        break;
9383
 
9384
      case EX:
9385
        if (value == null) {
9386
          unsetEx();
9387
        } else {
9388
          setEx((TransactionServiceException)value);
9389
        }
9390
        break;
9391
 
9392
      }
9393
    }
9394
 
9395
    public void setFieldValue(int fieldID, Object value) {
9396
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9397
    }
9398
 
9399
    public Object getFieldValue(_Fields field) {
9400
      switch (field) {
9401
      case SUCCESS:
9402
        return getSuccess();
9403
 
9404
      case EX:
9405
        return getEx();
9406
 
9407
      }
9408
      throw new IllegalStateException();
9409
    }
9410
 
9411
    public Object getFieldValue(int fieldId) {
9412
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9413
    }
9414
 
9415
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9416
    public boolean isSet(_Fields field) {
9417
      switch (field) {
9418
      case SUCCESS:
9419
        return isSetSuccess();
9420
      case EX:
9421
        return isSetEx();
9422
      }
9423
      throw new IllegalStateException();
9424
    }
9425
 
9426
    public boolean isSet(int fieldID) {
9427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9428
    }
9429
 
9430
    @Override
9431
    public boolean equals(Object that) {
9432
      if (that == null)
9433
        return false;
9434
      if (that instanceof getOrdersByBillingDate_result)
9435
        return this.equals((getOrdersByBillingDate_result)that);
9436
      return false;
9437
    }
9438
 
9439
    public boolean equals(getOrdersByBillingDate_result that) {
9440
      if (that == null)
9441
        return false;
9442
 
9443
      boolean this_present_success = true && this.isSetSuccess();
9444
      boolean that_present_success = true && that.isSetSuccess();
9445
      if (this_present_success || that_present_success) {
9446
        if (!(this_present_success && that_present_success))
9447
          return false;
9448
        if (!this.success.equals(that.success))
9449
          return false;
9450
      }
9451
 
9452
      boolean this_present_ex = true && this.isSetEx();
9453
      boolean that_present_ex = true && that.isSetEx();
9454
      if (this_present_ex || that_present_ex) {
9455
        if (!(this_present_ex && that_present_ex))
9456
          return false;
9457
        if (!this.ex.equals(that.ex))
9458
          return false;
9459
      }
9460
 
9461
      return true;
9462
    }
9463
 
9464
    @Override
9465
    public int hashCode() {
9466
      return 0;
9467
    }
9468
 
9469
    public int compareTo(getOrdersByBillingDate_result other) {
9470
      if (!getClass().equals(other.getClass())) {
9471
        return getClass().getName().compareTo(other.getClass().getName());
9472
      }
9473
 
9474
      int lastComparison = 0;
9475
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9476
 
9477
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9478
      if (lastComparison != 0) {
9479
        return lastComparison;
9480
      }
9481
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9482
      if (lastComparison != 0) {
9483
        return lastComparison;
9484
      }
9485
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9486
      if (lastComparison != 0) {
9487
        return lastComparison;
9488
      }
9489
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9490
      if (lastComparison != 0) {
9491
        return lastComparison;
9492
      }
9493
      return 0;
9494
    }
9495
 
9496
    public void read(TProtocol iprot) throws TException {
9497
      TField field;
9498
      iprot.readStructBegin();
9499
      while (true)
9500
      {
9501
        field = iprot.readFieldBegin();
9502
        if (field.type == TType.STOP) { 
9503
          break;
9504
        }
9505
        _Fields fieldId = _Fields.findByThriftId(field.id);
9506
        if (fieldId == null) {
9507
          TProtocolUtil.skip(iprot, field.type);
9508
        } else {
9509
          switch (fieldId) {
9510
            case SUCCESS:
9511
              if (field.type == TType.LIST) {
9512
                {
9513
                  TList _list20 = iprot.readListBegin();
9514
                  this.success = new ArrayList<Order>(_list20.size);
9515
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9516
                  {
9517
                    Order _elem22;
9518
                    _elem22 = new Order();
9519
                    _elem22.read(iprot);
9520
                    this.success.add(_elem22);
9521
                  }
9522
                  iprot.readListEnd();
9523
                }
9524
              } else { 
9525
                TProtocolUtil.skip(iprot, field.type);
9526
              }
9527
              break;
9528
            case EX:
9529
              if (field.type == TType.STRUCT) {
9530
                this.ex = new TransactionServiceException();
9531
                this.ex.read(iprot);
9532
              } else { 
9533
                TProtocolUtil.skip(iprot, field.type);
9534
              }
9535
              break;
9536
          }
9537
          iprot.readFieldEnd();
9538
        }
9539
      }
9540
      iprot.readStructEnd();
9541
      validate();
9542
    }
9543
 
9544
    public void write(TProtocol oprot) throws TException {
9545
      oprot.writeStructBegin(STRUCT_DESC);
9546
 
9547
      if (this.isSetSuccess()) {
9548
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9549
        {
9550
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9551
          for (Order _iter23 : this.success)
9552
          {
9553
            _iter23.write(oprot);
9554
          }
9555
          oprot.writeListEnd();
9556
        }
9557
        oprot.writeFieldEnd();
9558
      } else if (this.isSetEx()) {
9559
        oprot.writeFieldBegin(EX_FIELD_DESC);
9560
        this.ex.write(oprot);
9561
        oprot.writeFieldEnd();
9562
      }
9563
      oprot.writeFieldStop();
9564
      oprot.writeStructEnd();
9565
    }
9566
 
9567
    @Override
9568
    public String toString() {
9569
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9570
      boolean first = true;
9571
 
9572
      sb.append("success:");
9573
      if (this.success == null) {
9574
        sb.append("null");
9575
      } else {
9576
        sb.append(this.success);
9577
      }
9578
      first = false;
9579
      if (!first) sb.append(", ");
9580
      sb.append("ex:");
9581
      if (this.ex == null) {
9582
        sb.append("null");
9583
      } else {
9584
        sb.append(this.ex);
9585
      }
9586
      first = false;
9587
      sb.append(")");
9588
      return sb.toString();
9589
    }
9590
 
9591
    public void validate() throws TException {
9592
      // check for required fields
9593
    }
9594
 
9595
  }
9596
 
1382 varun.gupt 9597
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9598
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9599
 
9600
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9601
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9602
 
9603
    private long customer_id;
9604
    private long limit;
9605
 
9606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9607
    public enum _Fields implements TFieldIdEnum {
9608
      CUSTOMER_ID((short)1, "customer_id"),
9609
      LIMIT((short)2, "limit");
9610
 
9611
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9612
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9613
 
9614
      static {
9615
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9616
          byId.put((int)field._thriftId, field);
9617
          byName.put(field.getFieldName(), field);
9618
        }
9619
      }
9620
 
9621
      /**
9622
       * Find the _Fields constant that matches fieldId, or null if its not found.
9623
       */
9624
      public static _Fields findByThriftId(int fieldId) {
9625
        return byId.get(fieldId);
9626
      }
9627
 
9628
      /**
9629
       * Find the _Fields constant that matches fieldId, throwing an exception
9630
       * if it is not found.
9631
       */
9632
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9633
        _Fields fields = findByThriftId(fieldId);
9634
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9635
        return fields;
9636
      }
9637
 
9638
      /**
9639
       * Find the _Fields constant that matches name, or null if its not found.
9640
       */
9641
      public static _Fields findByName(String name) {
9642
        return byName.get(name);
9643
      }
9644
 
9645
      private final short _thriftId;
9646
      private final String _fieldName;
9647
 
9648
      _Fields(short thriftId, String fieldName) {
9649
        _thriftId = thriftId;
9650
        _fieldName = fieldName;
9651
      }
9652
 
9653
      public short getThriftFieldId() {
9654
        return _thriftId;
9655
      }
9656
 
9657
      public String getFieldName() {
9658
        return _fieldName;
9659
      }
9660
    }
9661
 
9662
    // isset id assignments
9663
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9664
    private static final int __LIMIT_ISSET_ID = 1;
9665
    private BitSet __isset_bit_vector = new BitSet(2);
9666
 
9667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9668
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9669
          new FieldValueMetaData(TType.I64)));
9670
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9671
          new FieldValueMetaData(TType.I64)));
9672
    }});
9673
 
9674
    static {
9675
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9676
    }
9677
 
9678
    public getReturnableOrdersForCustomer_args() {
9679
    }
9680
 
9681
    public getReturnableOrdersForCustomer_args(
9682
      long customer_id,
9683
      long limit)
9684
    {
9685
      this();
9686
      this.customer_id = customer_id;
9687
      setCustomer_idIsSet(true);
9688
      this.limit = limit;
9689
      setLimitIsSet(true);
9690
    }
9691
 
9692
    /**
9693
     * Performs a deep copy on <i>other</i>.
9694
     */
9695
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
9696
      __isset_bit_vector.clear();
9697
      __isset_bit_vector.or(other.__isset_bit_vector);
9698
      this.customer_id = other.customer_id;
9699
      this.limit = other.limit;
9700
    }
9701
 
9702
    public getReturnableOrdersForCustomer_args deepCopy() {
9703
      return new getReturnableOrdersForCustomer_args(this);
9704
    }
9705
 
9706
    @Deprecated
9707
    public getReturnableOrdersForCustomer_args clone() {
9708
      return new getReturnableOrdersForCustomer_args(this);
9709
    }
9710
 
9711
    public long getCustomer_id() {
9712
      return this.customer_id;
9713
    }
9714
 
9715
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
9716
      this.customer_id = customer_id;
9717
      setCustomer_idIsSet(true);
9718
      return this;
9719
    }
9720
 
9721
    public void unsetCustomer_id() {
9722
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
9723
    }
9724
 
9725
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
9726
    public boolean isSetCustomer_id() {
9727
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
9728
    }
9729
 
9730
    public void setCustomer_idIsSet(boolean value) {
9731
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
9732
    }
9733
 
9734
    public long getLimit() {
9735
      return this.limit;
9736
    }
9737
 
9738
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
9739
      this.limit = limit;
9740
      setLimitIsSet(true);
9741
      return this;
9742
    }
9743
 
9744
    public void unsetLimit() {
9745
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
9746
    }
9747
 
9748
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
9749
    public boolean isSetLimit() {
9750
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
9751
    }
9752
 
9753
    public void setLimitIsSet(boolean value) {
9754
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
9755
    }
9756
 
9757
    public void setFieldValue(_Fields field, Object value) {
9758
      switch (field) {
9759
      case CUSTOMER_ID:
9760
        if (value == null) {
9761
          unsetCustomer_id();
9762
        } else {
9763
          setCustomer_id((Long)value);
9764
        }
9765
        break;
9766
 
9767
      case LIMIT:
9768
        if (value == null) {
9769
          unsetLimit();
9770
        } else {
9771
          setLimit((Long)value);
9772
        }
9773
        break;
9774
 
9775
      }
9776
    }
9777
 
9778
    public void setFieldValue(int fieldID, Object value) {
9779
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9780
    }
9781
 
9782
    public Object getFieldValue(_Fields field) {
9783
      switch (field) {
9784
      case CUSTOMER_ID:
9785
        return new Long(getCustomer_id());
9786
 
9787
      case LIMIT:
9788
        return new Long(getLimit());
9789
 
9790
      }
9791
      throw new IllegalStateException();
9792
    }
9793
 
9794
    public Object getFieldValue(int fieldId) {
9795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9796
    }
9797
 
9798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9799
    public boolean isSet(_Fields field) {
9800
      switch (field) {
9801
      case CUSTOMER_ID:
9802
        return isSetCustomer_id();
9803
      case LIMIT:
9804
        return isSetLimit();
9805
      }
9806
      throw new IllegalStateException();
9807
    }
9808
 
9809
    public boolean isSet(int fieldID) {
9810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9811
    }
9812
 
9813
    @Override
9814
    public boolean equals(Object that) {
9815
      if (that == null)
9816
        return false;
9817
      if (that instanceof getReturnableOrdersForCustomer_args)
9818
        return this.equals((getReturnableOrdersForCustomer_args)that);
9819
      return false;
9820
    }
9821
 
9822
    public boolean equals(getReturnableOrdersForCustomer_args that) {
9823
      if (that == null)
9824
        return false;
9825
 
9826
      boolean this_present_customer_id = true;
9827
      boolean that_present_customer_id = true;
9828
      if (this_present_customer_id || that_present_customer_id) {
9829
        if (!(this_present_customer_id && that_present_customer_id))
9830
          return false;
9831
        if (this.customer_id != that.customer_id)
9832
          return false;
9833
      }
9834
 
9835
      boolean this_present_limit = true;
9836
      boolean that_present_limit = true;
9837
      if (this_present_limit || that_present_limit) {
9838
        if (!(this_present_limit && that_present_limit))
9839
          return false;
9840
        if (this.limit != that.limit)
9841
          return false;
9842
      }
9843
 
9844
      return true;
9845
    }
9846
 
9847
    @Override
9848
    public int hashCode() {
9849
      return 0;
9850
    }
9851
 
9852
    public int compareTo(getReturnableOrdersForCustomer_args other) {
9853
      if (!getClass().equals(other.getClass())) {
9854
        return getClass().getName().compareTo(other.getClass().getName());
9855
      }
9856
 
9857
      int lastComparison = 0;
9858
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
9859
 
9860
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
9861
      if (lastComparison != 0) {
9862
        return lastComparison;
9863
      }
9864
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
9865
      if (lastComparison != 0) {
9866
        return lastComparison;
9867
      }
9868
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
9869
      if (lastComparison != 0) {
9870
        return lastComparison;
9871
      }
9872
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
9873
      if (lastComparison != 0) {
9874
        return lastComparison;
9875
      }
9876
      return 0;
9877
    }
9878
 
9879
    public void read(TProtocol iprot) throws TException {
9880
      TField field;
9881
      iprot.readStructBegin();
9882
      while (true)
9883
      {
9884
        field = iprot.readFieldBegin();
9885
        if (field.type == TType.STOP) { 
9886
          break;
9887
        }
9888
        _Fields fieldId = _Fields.findByThriftId(field.id);
9889
        if (fieldId == null) {
9890
          TProtocolUtil.skip(iprot, field.type);
9891
        } else {
9892
          switch (fieldId) {
9893
            case CUSTOMER_ID:
9894
              if (field.type == TType.I64) {
9895
                this.customer_id = iprot.readI64();
9896
                setCustomer_idIsSet(true);
9897
              } else { 
9898
                TProtocolUtil.skip(iprot, field.type);
9899
              }
9900
              break;
9901
            case LIMIT:
9902
              if (field.type == TType.I64) {
9903
                this.limit = iprot.readI64();
9904
                setLimitIsSet(true);
9905
              } else { 
9906
                TProtocolUtil.skip(iprot, field.type);
9907
              }
9908
              break;
9909
          }
9910
          iprot.readFieldEnd();
9911
        }
9912
      }
9913
      iprot.readStructEnd();
9914
      validate();
9915
    }
9916
 
9917
    public void write(TProtocol oprot) throws TException {
9918
      validate();
9919
 
9920
      oprot.writeStructBegin(STRUCT_DESC);
9921
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
9922
      oprot.writeI64(this.customer_id);
9923
      oprot.writeFieldEnd();
9924
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
9925
      oprot.writeI64(this.limit);
9926
      oprot.writeFieldEnd();
9927
      oprot.writeFieldStop();
9928
      oprot.writeStructEnd();
9929
    }
9930
 
9931
    @Override
9932
    public String toString() {
9933
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
9934
      boolean first = true;
9935
 
9936
      sb.append("customer_id:");
9937
      sb.append(this.customer_id);
9938
      first = false;
9939
      if (!first) sb.append(", ");
9940
      sb.append("limit:");
9941
      sb.append(this.limit);
9942
      first = false;
9943
      sb.append(")");
9944
      return sb.toString();
9945
    }
9946
 
9947
    public void validate() throws TException {
9948
      // check for required fields
9949
    }
9950
 
9951
  }
9952
 
9953
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
9954
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
9955
 
9956
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9957
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9958
 
9959
    private List<Long> success;
9960
    private TransactionServiceException ex;
9961
 
9962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9963
    public enum _Fields implements TFieldIdEnum {
9964
      SUCCESS((short)0, "success"),
9965
      EX((short)1, "ex");
9966
 
9967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9969
 
9970
      static {
9971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9972
          byId.put((int)field._thriftId, field);
9973
          byName.put(field.getFieldName(), field);
9974
        }
9975
      }
9976
 
9977
      /**
9978
       * Find the _Fields constant that matches fieldId, or null if its not found.
9979
       */
9980
      public static _Fields findByThriftId(int fieldId) {
9981
        return byId.get(fieldId);
9982
      }
9983
 
9984
      /**
9985
       * Find the _Fields constant that matches fieldId, throwing an exception
9986
       * if it is not found.
9987
       */
9988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9989
        _Fields fields = findByThriftId(fieldId);
9990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9991
        return fields;
9992
      }
9993
 
9994
      /**
9995
       * Find the _Fields constant that matches name, or null if its not found.
9996
       */
9997
      public static _Fields findByName(String name) {
9998
        return byName.get(name);
9999
      }
10000
 
10001
      private final short _thriftId;
10002
      private final String _fieldName;
10003
 
10004
      _Fields(short thriftId, String fieldName) {
10005
        _thriftId = thriftId;
10006
        _fieldName = fieldName;
10007
      }
10008
 
10009
      public short getThriftFieldId() {
10010
        return _thriftId;
10011
      }
10012
 
10013
      public String getFieldName() {
10014
        return _fieldName;
10015
      }
10016
    }
10017
 
10018
    // isset id assignments
10019
 
10020
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10021
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10022
          new ListMetaData(TType.LIST, 
10023
              new FieldValueMetaData(TType.I64))));
10024
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10025
          new FieldValueMetaData(TType.STRUCT)));
10026
    }});
10027
 
10028
    static {
10029
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10030
    }
10031
 
10032
    public getReturnableOrdersForCustomer_result() {
10033
    }
10034
 
10035
    public getReturnableOrdersForCustomer_result(
10036
      List<Long> success,
10037
      TransactionServiceException ex)
10038
    {
10039
      this();
10040
      this.success = success;
10041
      this.ex = ex;
10042
    }
10043
 
10044
    /**
10045
     * Performs a deep copy on <i>other</i>.
10046
     */
10047
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10048
      if (other.isSetSuccess()) {
10049
        List<Long> __this__success = new ArrayList<Long>();
10050
        for (Long other_element : other.success) {
10051
          __this__success.add(other_element);
10052
        }
10053
        this.success = __this__success;
10054
      }
10055
      if (other.isSetEx()) {
10056
        this.ex = new TransactionServiceException(other.ex);
10057
      }
10058
    }
10059
 
10060
    public getReturnableOrdersForCustomer_result deepCopy() {
10061
      return new getReturnableOrdersForCustomer_result(this);
10062
    }
10063
 
10064
    @Deprecated
10065
    public getReturnableOrdersForCustomer_result clone() {
10066
      return new getReturnableOrdersForCustomer_result(this);
10067
    }
10068
 
10069
    public int getSuccessSize() {
10070
      return (this.success == null) ? 0 : this.success.size();
10071
    }
10072
 
10073
    public java.util.Iterator<Long> getSuccessIterator() {
10074
      return (this.success == null) ? null : this.success.iterator();
10075
    }
10076
 
10077
    public void addToSuccess(long elem) {
10078
      if (this.success == null) {
10079
        this.success = new ArrayList<Long>();
10080
      }
10081
      this.success.add(elem);
10082
    }
10083
 
10084
    public List<Long> getSuccess() {
10085
      return this.success;
10086
    }
10087
 
10088
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10089
      this.success = success;
10090
      return this;
10091
    }
10092
 
10093
    public void unsetSuccess() {
10094
      this.success = null;
10095
    }
10096
 
10097
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10098
    public boolean isSetSuccess() {
10099
      return this.success != null;
10100
    }
10101
 
10102
    public void setSuccessIsSet(boolean value) {
10103
      if (!value) {
10104
        this.success = null;
10105
      }
10106
    }
10107
 
10108
    public TransactionServiceException getEx() {
10109
      return this.ex;
10110
    }
10111
 
10112
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10113
      this.ex = ex;
10114
      return this;
10115
    }
10116
 
10117
    public void unsetEx() {
10118
      this.ex = null;
10119
    }
10120
 
10121
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10122
    public boolean isSetEx() {
10123
      return this.ex != null;
10124
    }
10125
 
10126
    public void setExIsSet(boolean value) {
10127
      if (!value) {
10128
        this.ex = null;
10129
      }
10130
    }
10131
 
10132
    public void setFieldValue(_Fields field, Object value) {
10133
      switch (field) {
10134
      case SUCCESS:
10135
        if (value == null) {
10136
          unsetSuccess();
10137
        } else {
10138
          setSuccess((List<Long>)value);
10139
        }
10140
        break;
10141
 
10142
      case EX:
10143
        if (value == null) {
10144
          unsetEx();
10145
        } else {
10146
          setEx((TransactionServiceException)value);
10147
        }
10148
        break;
10149
 
10150
      }
10151
    }
10152
 
10153
    public void setFieldValue(int fieldID, Object value) {
10154
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10155
    }
10156
 
10157
    public Object getFieldValue(_Fields field) {
10158
      switch (field) {
10159
      case SUCCESS:
10160
        return getSuccess();
10161
 
10162
      case EX:
10163
        return getEx();
10164
 
10165
      }
10166
      throw new IllegalStateException();
10167
    }
10168
 
10169
    public Object getFieldValue(int fieldId) {
10170
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10171
    }
10172
 
10173
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10174
    public boolean isSet(_Fields field) {
10175
      switch (field) {
10176
      case SUCCESS:
10177
        return isSetSuccess();
10178
      case EX:
10179
        return isSetEx();
10180
      }
10181
      throw new IllegalStateException();
10182
    }
10183
 
10184
    public boolean isSet(int fieldID) {
10185
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10186
    }
10187
 
10188
    @Override
10189
    public boolean equals(Object that) {
10190
      if (that == null)
10191
        return false;
10192
      if (that instanceof getReturnableOrdersForCustomer_result)
10193
        return this.equals((getReturnableOrdersForCustomer_result)that);
10194
      return false;
10195
    }
10196
 
10197
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10198
      if (that == null)
10199
        return false;
10200
 
10201
      boolean this_present_success = true && this.isSetSuccess();
10202
      boolean that_present_success = true && that.isSetSuccess();
10203
      if (this_present_success || that_present_success) {
10204
        if (!(this_present_success && that_present_success))
10205
          return false;
10206
        if (!this.success.equals(that.success))
10207
          return false;
10208
      }
10209
 
10210
      boolean this_present_ex = true && this.isSetEx();
10211
      boolean that_present_ex = true && that.isSetEx();
10212
      if (this_present_ex || that_present_ex) {
10213
        if (!(this_present_ex && that_present_ex))
10214
          return false;
10215
        if (!this.ex.equals(that.ex))
10216
          return false;
10217
      }
10218
 
10219
      return true;
10220
    }
10221
 
10222
    @Override
10223
    public int hashCode() {
10224
      return 0;
10225
    }
10226
 
10227
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10228
      if (!getClass().equals(other.getClass())) {
10229
        return getClass().getName().compareTo(other.getClass().getName());
10230
      }
10231
 
10232
      int lastComparison = 0;
10233
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10234
 
10235
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10236
      if (lastComparison != 0) {
10237
        return lastComparison;
10238
      }
10239
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10240
      if (lastComparison != 0) {
10241
        return lastComparison;
10242
      }
10243
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10244
      if (lastComparison != 0) {
10245
        return lastComparison;
10246
      }
10247
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10248
      if (lastComparison != 0) {
10249
        return lastComparison;
10250
      }
10251
      return 0;
10252
    }
10253
 
10254
    public void read(TProtocol iprot) throws TException {
10255
      TField field;
10256
      iprot.readStructBegin();
10257
      while (true)
10258
      {
10259
        field = iprot.readFieldBegin();
10260
        if (field.type == TType.STOP) { 
10261
          break;
10262
        }
10263
        _Fields fieldId = _Fields.findByThriftId(field.id);
10264
        if (fieldId == null) {
10265
          TProtocolUtil.skip(iprot, field.type);
10266
        } else {
10267
          switch (fieldId) {
10268
            case SUCCESS:
10269
              if (field.type == TType.LIST) {
10270
                {
10271
                  TList _list24 = iprot.readListBegin();
10272
                  this.success = new ArrayList<Long>(_list24.size);
10273
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10274
                  {
10275
                    long _elem26;
10276
                    _elem26 = iprot.readI64();
10277
                    this.success.add(_elem26);
10278
                  }
10279
                  iprot.readListEnd();
10280
                }
10281
              } else { 
10282
                TProtocolUtil.skip(iprot, field.type);
10283
              }
10284
              break;
10285
            case EX:
10286
              if (field.type == TType.STRUCT) {
10287
                this.ex = new TransactionServiceException();
10288
                this.ex.read(iprot);
10289
              } else { 
10290
                TProtocolUtil.skip(iprot, field.type);
10291
              }
10292
              break;
10293
          }
10294
          iprot.readFieldEnd();
10295
        }
10296
      }
10297
      iprot.readStructEnd();
10298
      validate();
10299
    }
10300
 
10301
    public void write(TProtocol oprot) throws TException {
10302
      oprot.writeStructBegin(STRUCT_DESC);
10303
 
10304
      if (this.isSetSuccess()) {
10305
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10306
        {
10307
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10308
          for (long _iter27 : this.success)
10309
          {
10310
            oprot.writeI64(_iter27);
10311
          }
10312
          oprot.writeListEnd();
10313
        }
10314
        oprot.writeFieldEnd();
10315
      } else if (this.isSetEx()) {
10316
        oprot.writeFieldBegin(EX_FIELD_DESC);
10317
        this.ex.write(oprot);
10318
        oprot.writeFieldEnd();
10319
      }
10320
      oprot.writeFieldStop();
10321
      oprot.writeStructEnd();
10322
    }
10323
 
10324
    @Override
10325
    public String toString() {
10326
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10327
      boolean first = true;
10328
 
10329
      sb.append("success:");
10330
      if (this.success == null) {
10331
        sb.append("null");
10332
      } else {
10333
        sb.append(this.success);
10334
      }
10335
      first = false;
10336
      if (!first) sb.append(", ");
10337
      sb.append("ex:");
10338
      if (this.ex == null) {
10339
        sb.append("null");
10340
      } else {
10341
        sb.append(this.ex);
10342
      }
10343
      first = false;
10344
      sb.append(")");
10345
      return sb.toString();
10346
    }
10347
 
10348
    public void validate() throws TException {
10349
      // check for required fields
10350
    }
10351
 
10352
  }
10353
 
10354
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10355
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10356
 
10357
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10358
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10359
 
10360
    private long customer_id;
10361
    private long limit;
10362
 
10363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10364
    public enum _Fields implements TFieldIdEnum {
10365
      CUSTOMER_ID((short)1, "customer_id"),
10366
      LIMIT((short)2, "limit");
10367
 
10368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10370
 
10371
      static {
10372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10373
          byId.put((int)field._thriftId, field);
10374
          byName.put(field.getFieldName(), field);
10375
        }
10376
      }
10377
 
10378
      /**
10379
       * Find the _Fields constant that matches fieldId, or null if its not found.
10380
       */
10381
      public static _Fields findByThriftId(int fieldId) {
10382
        return byId.get(fieldId);
10383
      }
10384
 
10385
      /**
10386
       * Find the _Fields constant that matches fieldId, throwing an exception
10387
       * if it is not found.
10388
       */
10389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10390
        _Fields fields = findByThriftId(fieldId);
10391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10392
        return fields;
10393
      }
10394
 
10395
      /**
10396
       * Find the _Fields constant that matches name, or null if its not found.
10397
       */
10398
      public static _Fields findByName(String name) {
10399
        return byName.get(name);
10400
      }
10401
 
10402
      private final short _thriftId;
10403
      private final String _fieldName;
10404
 
10405
      _Fields(short thriftId, String fieldName) {
10406
        _thriftId = thriftId;
10407
        _fieldName = fieldName;
10408
      }
10409
 
10410
      public short getThriftFieldId() {
10411
        return _thriftId;
10412
      }
10413
 
10414
      public String getFieldName() {
10415
        return _fieldName;
10416
      }
10417
    }
10418
 
10419
    // isset id assignments
10420
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10421
    private static final int __LIMIT_ISSET_ID = 1;
10422
    private BitSet __isset_bit_vector = new BitSet(2);
10423
 
10424
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10425
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10426
          new FieldValueMetaData(TType.I64)));
10427
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10428
          new FieldValueMetaData(TType.I64)));
10429
    }});
10430
 
10431
    static {
10432
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10433
    }
10434
 
10435
    public getCancellableOrdersForCustomer_args() {
10436
    }
10437
 
10438
    public getCancellableOrdersForCustomer_args(
10439
      long customer_id,
10440
      long limit)
10441
    {
10442
      this();
10443
      this.customer_id = customer_id;
10444
      setCustomer_idIsSet(true);
10445
      this.limit = limit;
10446
      setLimitIsSet(true);
10447
    }
10448
 
10449
    /**
10450
     * Performs a deep copy on <i>other</i>.
10451
     */
10452
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10453
      __isset_bit_vector.clear();
10454
      __isset_bit_vector.or(other.__isset_bit_vector);
10455
      this.customer_id = other.customer_id;
10456
      this.limit = other.limit;
10457
    }
10458
 
10459
    public getCancellableOrdersForCustomer_args deepCopy() {
10460
      return new getCancellableOrdersForCustomer_args(this);
10461
    }
10462
 
10463
    @Deprecated
10464
    public getCancellableOrdersForCustomer_args clone() {
10465
      return new getCancellableOrdersForCustomer_args(this);
10466
    }
10467
 
10468
    public long getCustomer_id() {
10469
      return this.customer_id;
10470
    }
10471
 
10472
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10473
      this.customer_id = customer_id;
10474
      setCustomer_idIsSet(true);
10475
      return this;
10476
    }
10477
 
10478
    public void unsetCustomer_id() {
10479
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10480
    }
10481
 
10482
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10483
    public boolean isSetCustomer_id() {
10484
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10485
    }
10486
 
10487
    public void setCustomer_idIsSet(boolean value) {
10488
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10489
    }
10490
 
10491
    public long getLimit() {
10492
      return this.limit;
10493
    }
10494
 
10495
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10496
      this.limit = limit;
10497
      setLimitIsSet(true);
10498
      return this;
10499
    }
10500
 
10501
    public void unsetLimit() {
10502
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10503
    }
10504
 
10505
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10506
    public boolean isSetLimit() {
10507
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10508
    }
10509
 
10510
    public void setLimitIsSet(boolean value) {
10511
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10512
    }
10513
 
10514
    public void setFieldValue(_Fields field, Object value) {
10515
      switch (field) {
10516
      case CUSTOMER_ID:
10517
        if (value == null) {
10518
          unsetCustomer_id();
10519
        } else {
10520
          setCustomer_id((Long)value);
10521
        }
10522
        break;
10523
 
10524
      case LIMIT:
10525
        if (value == null) {
10526
          unsetLimit();
10527
        } else {
10528
          setLimit((Long)value);
10529
        }
10530
        break;
10531
 
10532
      }
10533
    }
10534
 
10535
    public void setFieldValue(int fieldID, Object value) {
10536
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10537
    }
10538
 
10539
    public Object getFieldValue(_Fields field) {
10540
      switch (field) {
10541
      case CUSTOMER_ID:
10542
        return new Long(getCustomer_id());
10543
 
10544
      case LIMIT:
10545
        return new Long(getLimit());
10546
 
10547
      }
10548
      throw new IllegalStateException();
10549
    }
10550
 
10551
    public Object getFieldValue(int fieldId) {
10552
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10553
    }
10554
 
10555
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10556
    public boolean isSet(_Fields field) {
10557
      switch (field) {
10558
      case CUSTOMER_ID:
10559
        return isSetCustomer_id();
10560
      case LIMIT:
10561
        return isSetLimit();
10562
      }
10563
      throw new IllegalStateException();
10564
    }
10565
 
10566
    public boolean isSet(int fieldID) {
10567
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10568
    }
10569
 
10570
    @Override
10571
    public boolean equals(Object that) {
10572
      if (that == null)
10573
        return false;
10574
      if (that instanceof getCancellableOrdersForCustomer_args)
10575
        return this.equals((getCancellableOrdersForCustomer_args)that);
10576
      return false;
10577
    }
10578
 
10579
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10580
      if (that == null)
10581
        return false;
10582
 
10583
      boolean this_present_customer_id = true;
10584
      boolean that_present_customer_id = true;
10585
      if (this_present_customer_id || that_present_customer_id) {
10586
        if (!(this_present_customer_id && that_present_customer_id))
10587
          return false;
10588
        if (this.customer_id != that.customer_id)
10589
          return false;
10590
      }
10591
 
10592
      boolean this_present_limit = true;
10593
      boolean that_present_limit = true;
10594
      if (this_present_limit || that_present_limit) {
10595
        if (!(this_present_limit && that_present_limit))
10596
          return false;
10597
        if (this.limit != that.limit)
10598
          return false;
10599
      }
10600
 
10601
      return true;
10602
    }
10603
 
10604
    @Override
10605
    public int hashCode() {
10606
      return 0;
10607
    }
10608
 
10609
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10610
      if (!getClass().equals(other.getClass())) {
10611
        return getClass().getName().compareTo(other.getClass().getName());
10612
      }
10613
 
10614
      int lastComparison = 0;
10615
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10616
 
10617
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10618
      if (lastComparison != 0) {
10619
        return lastComparison;
10620
      }
10621
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10622
      if (lastComparison != 0) {
10623
        return lastComparison;
10624
      }
10625
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10626
      if (lastComparison != 0) {
10627
        return lastComparison;
10628
      }
10629
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10630
      if (lastComparison != 0) {
10631
        return lastComparison;
10632
      }
10633
      return 0;
10634
    }
10635
 
10636
    public void read(TProtocol iprot) throws TException {
10637
      TField field;
10638
      iprot.readStructBegin();
10639
      while (true)
10640
      {
10641
        field = iprot.readFieldBegin();
10642
        if (field.type == TType.STOP) { 
10643
          break;
10644
        }
10645
        _Fields fieldId = _Fields.findByThriftId(field.id);
10646
        if (fieldId == null) {
10647
          TProtocolUtil.skip(iprot, field.type);
10648
        } else {
10649
          switch (fieldId) {
10650
            case CUSTOMER_ID:
10651
              if (field.type == TType.I64) {
10652
                this.customer_id = iprot.readI64();
10653
                setCustomer_idIsSet(true);
10654
              } else { 
10655
                TProtocolUtil.skip(iprot, field.type);
10656
              }
10657
              break;
10658
            case LIMIT:
10659
              if (field.type == TType.I64) {
10660
                this.limit = iprot.readI64();
10661
                setLimitIsSet(true);
10662
              } else { 
10663
                TProtocolUtil.skip(iprot, field.type);
10664
              }
10665
              break;
10666
          }
10667
          iprot.readFieldEnd();
10668
        }
10669
      }
10670
      iprot.readStructEnd();
10671
      validate();
10672
    }
10673
 
10674
    public void write(TProtocol oprot) throws TException {
10675
      validate();
10676
 
10677
      oprot.writeStructBegin(STRUCT_DESC);
10678
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10679
      oprot.writeI64(this.customer_id);
10680
      oprot.writeFieldEnd();
10681
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10682
      oprot.writeI64(this.limit);
10683
      oprot.writeFieldEnd();
10684
      oprot.writeFieldStop();
10685
      oprot.writeStructEnd();
10686
    }
10687
 
10688
    @Override
10689
    public String toString() {
10690
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10691
      boolean first = true;
10692
 
10693
      sb.append("customer_id:");
10694
      sb.append(this.customer_id);
10695
      first = false;
10696
      if (!first) sb.append(", ");
10697
      sb.append("limit:");
10698
      sb.append(this.limit);
10699
      first = false;
10700
      sb.append(")");
10701
      return sb.toString();
10702
    }
10703
 
10704
    public void validate() throws TException {
10705
      // check for required fields
10706
    }
10707
 
10708
  }
10709
 
10710
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
10711
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
10712
 
10713
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10714
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10715
 
10716
    private List<Long> success;
10717
    private TransactionServiceException ex;
10718
 
10719
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10720
    public enum _Fields implements TFieldIdEnum {
10721
      SUCCESS((short)0, "success"),
10722
      EX((short)1, "ex");
10723
 
10724
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10725
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10726
 
10727
      static {
10728
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10729
          byId.put((int)field._thriftId, field);
10730
          byName.put(field.getFieldName(), field);
10731
        }
10732
      }
10733
 
10734
      /**
10735
       * Find the _Fields constant that matches fieldId, or null if its not found.
10736
       */
10737
      public static _Fields findByThriftId(int fieldId) {
10738
        return byId.get(fieldId);
10739
      }
10740
 
10741
      /**
10742
       * Find the _Fields constant that matches fieldId, throwing an exception
10743
       * if it is not found.
10744
       */
10745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10746
        _Fields fields = findByThriftId(fieldId);
10747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10748
        return fields;
10749
      }
10750
 
10751
      /**
10752
       * Find the _Fields constant that matches name, or null if its not found.
10753
       */
10754
      public static _Fields findByName(String name) {
10755
        return byName.get(name);
10756
      }
10757
 
10758
      private final short _thriftId;
10759
      private final String _fieldName;
10760
 
10761
      _Fields(short thriftId, String fieldName) {
10762
        _thriftId = thriftId;
10763
        _fieldName = fieldName;
10764
      }
10765
 
10766
      public short getThriftFieldId() {
10767
        return _thriftId;
10768
      }
10769
 
10770
      public String getFieldName() {
10771
        return _fieldName;
10772
      }
10773
    }
10774
 
10775
    // isset id assignments
10776
 
10777
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10778
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10779
          new ListMetaData(TType.LIST, 
10780
              new FieldValueMetaData(TType.I64))));
10781
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10782
          new FieldValueMetaData(TType.STRUCT)));
10783
    }});
10784
 
10785
    static {
10786
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
10787
    }
10788
 
10789
    public getCancellableOrdersForCustomer_result() {
10790
    }
10791
 
10792
    public getCancellableOrdersForCustomer_result(
10793
      List<Long> success,
10794
      TransactionServiceException ex)
10795
    {
10796
      this();
10797
      this.success = success;
10798
      this.ex = ex;
10799
    }
10800
 
10801
    /**
10802
     * Performs a deep copy on <i>other</i>.
10803
     */
10804
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
10805
      if (other.isSetSuccess()) {
10806
        List<Long> __this__success = new ArrayList<Long>();
10807
        for (Long other_element : other.success) {
10808
          __this__success.add(other_element);
10809
        }
10810
        this.success = __this__success;
10811
      }
10812
      if (other.isSetEx()) {
10813
        this.ex = new TransactionServiceException(other.ex);
10814
      }
10815
    }
10816
 
10817
    public getCancellableOrdersForCustomer_result deepCopy() {
10818
      return new getCancellableOrdersForCustomer_result(this);
10819
    }
10820
 
10821
    @Deprecated
10822
    public getCancellableOrdersForCustomer_result clone() {
10823
      return new getCancellableOrdersForCustomer_result(this);
10824
    }
10825
 
10826
    public int getSuccessSize() {
10827
      return (this.success == null) ? 0 : this.success.size();
10828
    }
10829
 
10830
    public java.util.Iterator<Long> getSuccessIterator() {
10831
      return (this.success == null) ? null : this.success.iterator();
10832
    }
10833
 
10834
    public void addToSuccess(long elem) {
10835
      if (this.success == null) {
10836
        this.success = new ArrayList<Long>();
10837
      }
10838
      this.success.add(elem);
10839
    }
10840
 
10841
    public List<Long> getSuccess() {
10842
      return this.success;
10843
    }
10844
 
10845
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
10846
      this.success = success;
10847
      return this;
10848
    }
10849
 
10850
    public void unsetSuccess() {
10851
      this.success = null;
10852
    }
10853
 
10854
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10855
    public boolean isSetSuccess() {
10856
      return this.success != null;
10857
    }
10858
 
10859
    public void setSuccessIsSet(boolean value) {
10860
      if (!value) {
10861
        this.success = null;
10862
      }
10863
    }
10864
 
10865
    public TransactionServiceException getEx() {
10866
      return this.ex;
10867
    }
10868
 
10869
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10870
      this.ex = ex;
10871
      return this;
10872
    }
10873
 
10874
    public void unsetEx() {
10875
      this.ex = null;
10876
    }
10877
 
10878
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10879
    public boolean isSetEx() {
10880
      return this.ex != null;
10881
    }
10882
 
10883
    public void setExIsSet(boolean value) {
10884
      if (!value) {
10885
        this.ex = null;
10886
      }
10887
    }
10888
 
10889
    public void setFieldValue(_Fields field, Object value) {
10890
      switch (field) {
10891
      case SUCCESS:
10892
        if (value == null) {
10893
          unsetSuccess();
10894
        } else {
10895
          setSuccess((List<Long>)value);
10896
        }
10897
        break;
10898
 
10899
      case EX:
10900
        if (value == null) {
10901
          unsetEx();
10902
        } else {
10903
          setEx((TransactionServiceException)value);
10904
        }
10905
        break;
10906
 
10907
      }
10908
    }
10909
 
10910
    public void setFieldValue(int fieldID, Object value) {
10911
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10912
    }
10913
 
10914
    public Object getFieldValue(_Fields field) {
10915
      switch (field) {
10916
      case SUCCESS:
10917
        return getSuccess();
10918
 
10919
      case EX:
10920
        return getEx();
10921
 
10922
      }
10923
      throw new IllegalStateException();
10924
    }
10925
 
10926
    public Object getFieldValue(int fieldId) {
10927
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10928
    }
10929
 
10930
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10931
    public boolean isSet(_Fields field) {
10932
      switch (field) {
10933
      case SUCCESS:
10934
        return isSetSuccess();
10935
      case EX:
10936
        return isSetEx();
10937
      }
10938
      throw new IllegalStateException();
10939
    }
10940
 
10941
    public boolean isSet(int fieldID) {
10942
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10943
    }
10944
 
10945
    @Override
10946
    public boolean equals(Object that) {
10947
      if (that == null)
10948
        return false;
10949
      if (that instanceof getCancellableOrdersForCustomer_result)
10950
        return this.equals((getCancellableOrdersForCustomer_result)that);
10951
      return false;
10952
    }
10953
 
10954
    public boolean equals(getCancellableOrdersForCustomer_result that) {
10955
      if (that == null)
10956
        return false;
10957
 
10958
      boolean this_present_success = true && this.isSetSuccess();
10959
      boolean that_present_success = true && that.isSetSuccess();
10960
      if (this_present_success || that_present_success) {
10961
        if (!(this_present_success && that_present_success))
10962
          return false;
10963
        if (!this.success.equals(that.success))
10964
          return false;
10965
      }
10966
 
10967
      boolean this_present_ex = true && this.isSetEx();
10968
      boolean that_present_ex = true && that.isSetEx();
10969
      if (this_present_ex || that_present_ex) {
10970
        if (!(this_present_ex && that_present_ex))
10971
          return false;
10972
        if (!this.ex.equals(that.ex))
10973
          return false;
10974
      }
10975
 
10976
      return true;
10977
    }
10978
 
10979
    @Override
10980
    public int hashCode() {
10981
      return 0;
10982
    }
10983
 
10984
    public int compareTo(getCancellableOrdersForCustomer_result other) {
10985
      if (!getClass().equals(other.getClass())) {
10986
        return getClass().getName().compareTo(other.getClass().getName());
10987
      }
10988
 
10989
      int lastComparison = 0;
10990
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
10991
 
10992
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10993
      if (lastComparison != 0) {
10994
        return lastComparison;
10995
      }
10996
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10997
      if (lastComparison != 0) {
10998
        return lastComparison;
10999
      }
11000
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11001
      if (lastComparison != 0) {
11002
        return lastComparison;
11003
      }
11004
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11005
      if (lastComparison != 0) {
11006
        return lastComparison;
11007
      }
11008
      return 0;
11009
    }
11010
 
11011
    public void read(TProtocol iprot) throws TException {
11012
      TField field;
11013
      iprot.readStructBegin();
11014
      while (true)
11015
      {
11016
        field = iprot.readFieldBegin();
11017
        if (field.type == TType.STOP) { 
11018
          break;
11019
        }
11020
        _Fields fieldId = _Fields.findByThriftId(field.id);
11021
        if (fieldId == null) {
11022
          TProtocolUtil.skip(iprot, field.type);
11023
        } else {
11024
          switch (fieldId) {
11025
            case SUCCESS:
11026
              if (field.type == TType.LIST) {
11027
                {
11028
                  TList _list28 = iprot.readListBegin();
11029
                  this.success = new ArrayList<Long>(_list28.size);
11030
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11031
                  {
11032
                    long _elem30;
11033
                    _elem30 = iprot.readI64();
11034
                    this.success.add(_elem30);
11035
                  }
11036
                  iprot.readListEnd();
11037
                }
11038
              } else { 
11039
                TProtocolUtil.skip(iprot, field.type);
11040
              }
11041
              break;
11042
            case EX:
11043
              if (field.type == TType.STRUCT) {
11044
                this.ex = new TransactionServiceException();
11045
                this.ex.read(iprot);
11046
              } else { 
11047
                TProtocolUtil.skip(iprot, field.type);
11048
              }
11049
              break;
11050
          }
11051
          iprot.readFieldEnd();
11052
        }
11053
      }
11054
      iprot.readStructEnd();
11055
      validate();
11056
    }
11057
 
11058
    public void write(TProtocol oprot) throws TException {
11059
      oprot.writeStructBegin(STRUCT_DESC);
11060
 
11061
      if (this.isSetSuccess()) {
11062
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11063
        {
11064
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11065
          for (long _iter31 : this.success)
11066
          {
11067
            oprot.writeI64(_iter31);
11068
          }
11069
          oprot.writeListEnd();
11070
        }
11071
        oprot.writeFieldEnd();
11072
      } else if (this.isSetEx()) {
11073
        oprot.writeFieldBegin(EX_FIELD_DESC);
11074
        this.ex.write(oprot);
11075
        oprot.writeFieldEnd();
11076
      }
11077
      oprot.writeFieldStop();
11078
      oprot.writeStructEnd();
11079
    }
11080
 
11081
    @Override
11082
    public String toString() {
11083
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11084
      boolean first = true;
11085
 
11086
      sb.append("success:");
11087
      if (this.success == null) {
11088
        sb.append("null");
11089
      } else {
11090
        sb.append(this.success);
11091
      }
11092
      first = false;
11093
      if (!first) sb.append(", ");
11094
      sb.append("ex:");
11095
      if (this.ex == null) {
11096
        sb.append("null");
11097
      } else {
11098
        sb.append(this.ex);
11099
      }
11100
      first = false;
11101
      sb.append(")");
11102
      return sb.toString();
11103
    }
11104
 
11105
    public void validate() throws TException {
11106
      // check for required fields
11107
    }
11108
 
11109
  }
11110
 
483 rajveer 11111
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11112
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11113
 
483 rajveer 11114
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11115
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11116
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11117
 
483 rajveer 11118
    private long orderId;
11119
    private OrderStatus status;
11120
    private String description;
68 ashish 11121
 
11122
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11123
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11124
      ORDER_ID((short)1, "orderId"),
11125
      /**
11126
       * 
11127
       * @see OrderStatus
11128
       */
11129
      STATUS((short)2, "status"),
11130
      DESCRIPTION((short)3, "description");
68 ashish 11131
 
11132
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11134
 
11135
      static {
11136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11137
          byId.put((int)field._thriftId, field);
11138
          byName.put(field.getFieldName(), field);
11139
        }
11140
      }
11141
 
11142
      /**
11143
       * Find the _Fields constant that matches fieldId, or null if its not found.
11144
       */
11145
      public static _Fields findByThriftId(int fieldId) {
11146
        return byId.get(fieldId);
11147
      }
11148
 
11149
      /**
11150
       * Find the _Fields constant that matches fieldId, throwing an exception
11151
       * if it is not found.
11152
       */
11153
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11154
        _Fields fields = findByThriftId(fieldId);
11155
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11156
        return fields;
11157
      }
11158
 
11159
      /**
11160
       * Find the _Fields constant that matches name, or null if its not found.
11161
       */
11162
      public static _Fields findByName(String name) {
11163
        return byName.get(name);
11164
      }
11165
 
11166
      private final short _thriftId;
11167
      private final String _fieldName;
11168
 
11169
      _Fields(short thriftId, String fieldName) {
11170
        _thriftId = thriftId;
11171
        _fieldName = fieldName;
11172
      }
11173
 
11174
      public short getThriftFieldId() {
11175
        return _thriftId;
11176
      }
11177
 
11178
      public String getFieldName() {
11179
        return _fieldName;
11180
      }
11181
    }
11182
 
11183
    // isset id assignments
483 rajveer 11184
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11185
    private BitSet __isset_bit_vector = new BitSet(1);
11186
 
11187
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11188
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11189
          new FieldValueMetaData(TType.I64)));
483 rajveer 11190
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11191
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11192
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11193
          new FieldValueMetaData(TType.STRING)));
68 ashish 11194
    }});
11195
 
11196
    static {
483 rajveer 11197
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11198
    }
11199
 
483 rajveer 11200
    public changeOrderStatus_args() {
68 ashish 11201
    }
11202
 
483 rajveer 11203
    public changeOrderStatus_args(
11204
      long orderId,
11205
      OrderStatus status,
11206
      String description)
68 ashish 11207
    {
11208
      this();
483 rajveer 11209
      this.orderId = orderId;
11210
      setOrderIdIsSet(true);
11211
      this.status = status;
11212
      this.description = description;
68 ashish 11213
    }
11214
 
11215
    /**
11216
     * Performs a deep copy on <i>other</i>.
11217
     */
483 rajveer 11218
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11219
      __isset_bit_vector.clear();
11220
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11221
      this.orderId = other.orderId;
11222
      if (other.isSetStatus()) {
11223
        this.status = other.status;
11224
      }
11225
      if (other.isSetDescription()) {
11226
        this.description = other.description;
11227
      }
68 ashish 11228
    }
11229
 
483 rajveer 11230
    public changeOrderStatus_args deepCopy() {
11231
      return new changeOrderStatus_args(this);
68 ashish 11232
    }
11233
 
11234
    @Deprecated
483 rajveer 11235
    public changeOrderStatus_args clone() {
11236
      return new changeOrderStatus_args(this);
68 ashish 11237
    }
11238
 
483 rajveer 11239
    public long getOrderId() {
11240
      return this.orderId;
68 ashish 11241
    }
11242
 
483 rajveer 11243
    public changeOrderStatus_args setOrderId(long orderId) {
11244
      this.orderId = orderId;
11245
      setOrderIdIsSet(true);
68 ashish 11246
      return this;
11247
    }
11248
 
483 rajveer 11249
    public void unsetOrderId() {
11250
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11251
    }
11252
 
483 rajveer 11253
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11254
    public boolean isSetOrderId() {
11255
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11256
    }
11257
 
483 rajveer 11258
    public void setOrderIdIsSet(boolean value) {
11259
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11260
    }
11261
 
483 rajveer 11262
    /**
11263
     * 
11264
     * @see OrderStatus
11265
     */
11266
    public OrderStatus getStatus() {
11267
      return this.status;
68 ashish 11268
    }
11269
 
11270
    /**
483 rajveer 11271
     * 
11272
     * @see OrderStatus
68 ashish 11273
     */
483 rajveer 11274
    public changeOrderStatus_args setStatus(OrderStatus status) {
11275
      this.status = status;
68 ashish 11276
      return this;
11277
    }
11278
 
483 rajveer 11279
    public void unsetStatus() {
11280
      this.status = null;
68 ashish 11281
    }
11282
 
483 rajveer 11283
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11284
    public boolean isSetStatus() {
11285
      return this.status != null;
68 ashish 11286
    }
11287
 
483 rajveer 11288
    public void setStatusIsSet(boolean value) {
68 ashish 11289
      if (!value) {
483 rajveer 11290
        this.status = null;
68 ashish 11291
      }
11292
    }
11293
 
483 rajveer 11294
    public String getDescription() {
11295
      return this.description;
68 ashish 11296
    }
11297
 
483 rajveer 11298
    public changeOrderStatus_args setDescription(String description) {
11299
      this.description = description;
68 ashish 11300
      return this;
11301
    }
11302
 
483 rajveer 11303
    public void unsetDescription() {
11304
      this.description = null;
68 ashish 11305
    }
11306
 
483 rajveer 11307
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11308
    public boolean isSetDescription() {
11309
      return this.description != null;
68 ashish 11310
    }
11311
 
483 rajveer 11312
    public void setDescriptionIsSet(boolean value) {
68 ashish 11313
      if (!value) {
483 rajveer 11314
        this.description = null;
68 ashish 11315
      }
11316
    }
11317
 
11318
    public void setFieldValue(_Fields field, Object value) {
11319
      switch (field) {
483 rajveer 11320
      case ORDER_ID:
68 ashish 11321
        if (value == null) {
483 rajveer 11322
          unsetOrderId();
68 ashish 11323
        } else {
483 rajveer 11324
          setOrderId((Long)value);
68 ashish 11325
        }
11326
        break;
11327
 
483 rajveer 11328
      case STATUS:
68 ashish 11329
        if (value == null) {
483 rajveer 11330
          unsetStatus();
68 ashish 11331
        } else {
483 rajveer 11332
          setStatus((OrderStatus)value);
68 ashish 11333
        }
11334
        break;
11335
 
483 rajveer 11336
      case DESCRIPTION:
11337
        if (value == null) {
11338
          unsetDescription();
11339
        } else {
11340
          setDescription((String)value);
11341
        }
11342
        break;
11343
 
68 ashish 11344
      }
11345
    }
11346
 
11347
    public void setFieldValue(int fieldID, Object value) {
11348
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11349
    }
11350
 
11351
    public Object getFieldValue(_Fields field) {
11352
      switch (field) {
483 rajveer 11353
      case ORDER_ID:
11354
        return new Long(getOrderId());
68 ashish 11355
 
483 rajveer 11356
      case STATUS:
11357
        return getStatus();
68 ashish 11358
 
483 rajveer 11359
      case DESCRIPTION:
11360
        return getDescription();
11361
 
68 ashish 11362
      }
11363
      throw new IllegalStateException();
11364
    }
11365
 
11366
    public Object getFieldValue(int fieldId) {
11367
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11368
    }
11369
 
11370
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11371
    public boolean isSet(_Fields field) {
11372
      switch (field) {
483 rajveer 11373
      case ORDER_ID:
11374
        return isSetOrderId();
11375
      case STATUS:
11376
        return isSetStatus();
11377
      case DESCRIPTION:
11378
        return isSetDescription();
68 ashish 11379
      }
11380
      throw new IllegalStateException();
11381
    }
11382
 
11383
    public boolean isSet(int fieldID) {
11384
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11385
    }
11386
 
11387
    @Override
11388
    public boolean equals(Object that) {
11389
      if (that == null)
11390
        return false;
483 rajveer 11391
      if (that instanceof changeOrderStatus_args)
11392
        return this.equals((changeOrderStatus_args)that);
68 ashish 11393
      return false;
11394
    }
11395
 
483 rajveer 11396
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11397
      if (that == null)
11398
        return false;
11399
 
483 rajveer 11400
      boolean this_present_orderId = true;
11401
      boolean that_present_orderId = true;
11402
      if (this_present_orderId || that_present_orderId) {
11403
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11404
          return false;
483 rajveer 11405
        if (this.orderId != that.orderId)
68 ashish 11406
          return false;
11407
      }
11408
 
483 rajveer 11409
      boolean this_present_status = true && this.isSetStatus();
11410
      boolean that_present_status = true && that.isSetStatus();
11411
      if (this_present_status || that_present_status) {
11412
        if (!(this_present_status && that_present_status))
68 ashish 11413
          return false;
483 rajveer 11414
        if (!this.status.equals(that.status))
68 ashish 11415
          return false;
11416
      }
11417
 
483 rajveer 11418
      boolean this_present_description = true && this.isSetDescription();
11419
      boolean that_present_description = true && that.isSetDescription();
11420
      if (this_present_description || that_present_description) {
11421
        if (!(this_present_description && that_present_description))
11422
          return false;
11423
        if (!this.description.equals(that.description))
11424
          return false;
11425
      }
11426
 
68 ashish 11427
      return true;
11428
    }
11429
 
11430
    @Override
11431
    public int hashCode() {
11432
      return 0;
11433
    }
11434
 
483 rajveer 11435
    public int compareTo(changeOrderStatus_args other) {
11436
      if (!getClass().equals(other.getClass())) {
11437
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11438
      }
11439
 
483 rajveer 11440
      int lastComparison = 0;
11441
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11442
 
483 rajveer 11443
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11444
      if (lastComparison != 0) {
11445
        return lastComparison;
68 ashish 11446
      }
483 rajveer 11447
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11448
      if (lastComparison != 0) {
11449
        return lastComparison;
68 ashish 11450
      }
483 rajveer 11451
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11452
      if (lastComparison != 0) {
11453
        return lastComparison;
68 ashish 11454
      }
483 rajveer 11455
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11456
      if (lastComparison != 0) {
11457
        return lastComparison;
68 ashish 11458
      }
483 rajveer 11459
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11460
      if (lastComparison != 0) {
11461
        return lastComparison;
68 ashish 11462
      }
483 rajveer 11463
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11464
      if (lastComparison != 0) {
11465
        return lastComparison;
68 ashish 11466
      }
11467
      return 0;
11468
    }
11469
 
11470
    public void read(TProtocol iprot) throws TException {
11471
      TField field;
11472
      iprot.readStructBegin();
11473
      while (true)
11474
      {
11475
        field = iprot.readFieldBegin();
11476
        if (field.type == TType.STOP) { 
11477
          break;
11478
        }
11479
        _Fields fieldId = _Fields.findByThriftId(field.id);
11480
        if (fieldId == null) {
11481
          TProtocolUtil.skip(iprot, field.type);
11482
        } else {
11483
          switch (fieldId) {
483 rajveer 11484
            case ORDER_ID:
68 ashish 11485
              if (field.type == TType.I64) {
483 rajveer 11486
                this.orderId = iprot.readI64();
11487
                setOrderIdIsSet(true);
68 ashish 11488
              } else { 
11489
                TProtocolUtil.skip(iprot, field.type);
11490
              }
11491
              break;
483 rajveer 11492
            case STATUS:
11493
              if (field.type == TType.I32) {
11494
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11495
              } else { 
11496
                TProtocolUtil.skip(iprot, field.type);
11497
              }
11498
              break;
483 rajveer 11499
            case DESCRIPTION:
11500
              if (field.type == TType.STRING) {
11501
                this.description = iprot.readString();
11502
              } else { 
11503
                TProtocolUtil.skip(iprot, field.type);
11504
              }
11505
              break;
68 ashish 11506
          }
11507
          iprot.readFieldEnd();
11508
        }
11509
      }
11510
      iprot.readStructEnd();
11511
      validate();
11512
    }
11513
 
11514
    public void write(TProtocol oprot) throws TException {
11515
      validate();
11516
 
11517
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11518
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11519
      oprot.writeI64(this.orderId);
68 ashish 11520
      oprot.writeFieldEnd();
483 rajveer 11521
      if (this.status != null) {
11522
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11523
        oprot.writeI32(this.status.getValue());
68 ashish 11524
        oprot.writeFieldEnd();
11525
      }
483 rajveer 11526
      if (this.description != null) {
11527
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11528
        oprot.writeString(this.description);
11529
        oprot.writeFieldEnd();
11530
      }
68 ashish 11531
      oprot.writeFieldStop();
11532
      oprot.writeStructEnd();
11533
    }
11534
 
11535
    @Override
11536
    public String toString() {
483 rajveer 11537
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11538
      boolean first = true;
11539
 
483 rajveer 11540
      sb.append("orderId:");
11541
      sb.append(this.orderId);
68 ashish 11542
      first = false;
11543
      if (!first) sb.append(", ");
483 rajveer 11544
      sb.append("status:");
11545
      if (this.status == null) {
68 ashish 11546
        sb.append("null");
11547
      } else {
483 rajveer 11548
        String status_name = status.name();
11549
        if (status_name != null) {
11550
          sb.append(status_name);
11551
          sb.append(" (");
11552
        }
11553
        sb.append(this.status);
11554
        if (status_name != null) {
11555
          sb.append(")");
11556
        }
68 ashish 11557
      }
11558
      first = false;
483 rajveer 11559
      if (!first) sb.append(", ");
11560
      sb.append("description:");
11561
      if (this.description == null) {
11562
        sb.append("null");
11563
      } else {
11564
        sb.append(this.description);
11565
      }
11566
      first = false;
68 ashish 11567
      sb.append(")");
11568
      return sb.toString();
11569
    }
11570
 
11571
    public void validate() throws TException {
11572
      // check for required fields
11573
    }
11574
 
11575
  }
11576
 
483 rajveer 11577
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11578
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11579
 
11580
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11581
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11582
 
11583
    private boolean success;
11584
    private TransactionServiceException ex;
11585
 
11586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11587
    public enum _Fields implements TFieldIdEnum {
11588
      SUCCESS((short)0, "success"),
11589
      EX((short)1, "ex");
11590
 
11591
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11593
 
11594
      static {
11595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11596
          byId.put((int)field._thriftId, field);
11597
          byName.put(field.getFieldName(), field);
11598
        }
11599
      }
11600
 
11601
      /**
11602
       * Find the _Fields constant that matches fieldId, or null if its not found.
11603
       */
11604
      public static _Fields findByThriftId(int fieldId) {
11605
        return byId.get(fieldId);
11606
      }
11607
 
11608
      /**
11609
       * Find the _Fields constant that matches fieldId, throwing an exception
11610
       * if it is not found.
11611
       */
11612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11613
        _Fields fields = findByThriftId(fieldId);
11614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11615
        return fields;
11616
      }
11617
 
11618
      /**
11619
       * Find the _Fields constant that matches name, or null if its not found.
11620
       */
11621
      public static _Fields findByName(String name) {
11622
        return byName.get(name);
11623
      }
11624
 
11625
      private final short _thriftId;
11626
      private final String _fieldName;
11627
 
11628
      _Fields(short thriftId, String fieldName) {
11629
        _thriftId = thriftId;
11630
        _fieldName = fieldName;
11631
      }
11632
 
11633
      public short getThriftFieldId() {
11634
        return _thriftId;
11635
      }
11636
 
11637
      public String getFieldName() {
11638
        return _fieldName;
11639
      }
11640
    }
11641
 
11642
    // isset id assignments
11643
    private static final int __SUCCESS_ISSET_ID = 0;
11644
    private BitSet __isset_bit_vector = new BitSet(1);
11645
 
11646
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11647
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11648
          new FieldValueMetaData(TType.BOOL)));
11649
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11650
          new FieldValueMetaData(TType.STRUCT)));
11651
    }});
11652
 
11653
    static {
483 rajveer 11654
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11655
    }
11656
 
483 rajveer 11657
    public changeOrderStatus_result() {
68 ashish 11658
    }
11659
 
483 rajveer 11660
    public changeOrderStatus_result(
68 ashish 11661
      boolean success,
11662
      TransactionServiceException ex)
11663
    {
11664
      this();
11665
      this.success = success;
11666
      setSuccessIsSet(true);
11667
      this.ex = ex;
11668
    }
11669
 
11670
    /**
11671
     * Performs a deep copy on <i>other</i>.
11672
     */
483 rajveer 11673
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11674
      __isset_bit_vector.clear();
11675
      __isset_bit_vector.or(other.__isset_bit_vector);
11676
      this.success = other.success;
11677
      if (other.isSetEx()) {
11678
        this.ex = new TransactionServiceException(other.ex);
11679
      }
11680
    }
11681
 
483 rajveer 11682
    public changeOrderStatus_result deepCopy() {
11683
      return new changeOrderStatus_result(this);
68 ashish 11684
    }
11685
 
11686
    @Deprecated
483 rajveer 11687
    public changeOrderStatus_result clone() {
11688
      return new changeOrderStatus_result(this);
68 ashish 11689
    }
11690
 
11691
    public boolean isSuccess() {
11692
      return this.success;
11693
    }
11694
 
483 rajveer 11695
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 11696
      this.success = success;
11697
      setSuccessIsSet(true);
11698
      return this;
11699
    }
11700
 
11701
    public void unsetSuccess() {
11702
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11703
    }
11704
 
11705
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11706
    public boolean isSetSuccess() {
11707
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11708
    }
11709
 
11710
    public void setSuccessIsSet(boolean value) {
11711
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11712
    }
11713
 
11714
    public TransactionServiceException getEx() {
11715
      return this.ex;
11716
    }
11717
 
483 rajveer 11718
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 11719
      this.ex = ex;
11720
      return this;
11721
    }
11722
 
11723
    public void unsetEx() {
11724
      this.ex = null;
11725
    }
11726
 
11727
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11728
    public boolean isSetEx() {
11729
      return this.ex != null;
11730
    }
11731
 
11732
    public void setExIsSet(boolean value) {
11733
      if (!value) {
11734
        this.ex = null;
11735
      }
11736
    }
11737
 
11738
    public void setFieldValue(_Fields field, Object value) {
11739
      switch (field) {
11740
      case SUCCESS:
11741
        if (value == null) {
11742
          unsetSuccess();
11743
        } else {
11744
          setSuccess((Boolean)value);
11745
        }
11746
        break;
11747
 
11748
      case EX:
11749
        if (value == null) {
11750
          unsetEx();
11751
        } else {
11752
          setEx((TransactionServiceException)value);
11753
        }
11754
        break;
11755
 
11756
      }
11757
    }
11758
 
11759
    public void setFieldValue(int fieldID, Object value) {
11760
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11761
    }
11762
 
11763
    public Object getFieldValue(_Fields field) {
11764
      switch (field) {
11765
      case SUCCESS:
11766
        return new Boolean(isSuccess());
11767
 
11768
      case EX:
11769
        return getEx();
11770
 
11771
      }
11772
      throw new IllegalStateException();
11773
    }
11774
 
11775
    public Object getFieldValue(int fieldId) {
11776
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11777
    }
11778
 
11779
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11780
    public boolean isSet(_Fields field) {
11781
      switch (field) {
11782
      case SUCCESS:
11783
        return isSetSuccess();
11784
      case EX:
11785
        return isSetEx();
11786
      }
11787
      throw new IllegalStateException();
11788
    }
11789
 
11790
    public boolean isSet(int fieldID) {
11791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11792
    }
11793
 
11794
    @Override
11795
    public boolean equals(Object that) {
11796
      if (that == null)
11797
        return false;
483 rajveer 11798
      if (that instanceof changeOrderStatus_result)
11799
        return this.equals((changeOrderStatus_result)that);
68 ashish 11800
      return false;
11801
    }
11802
 
483 rajveer 11803
    public boolean equals(changeOrderStatus_result that) {
68 ashish 11804
      if (that == null)
11805
        return false;
11806
 
11807
      boolean this_present_success = true;
11808
      boolean that_present_success = true;
11809
      if (this_present_success || that_present_success) {
11810
        if (!(this_present_success && that_present_success))
11811
          return false;
11812
        if (this.success != that.success)
11813
          return false;
11814
      }
11815
 
11816
      boolean this_present_ex = true && this.isSetEx();
11817
      boolean that_present_ex = true && that.isSetEx();
11818
      if (this_present_ex || that_present_ex) {
11819
        if (!(this_present_ex && that_present_ex))
11820
          return false;
11821
        if (!this.ex.equals(that.ex))
11822
          return false;
11823
      }
11824
 
11825
      return true;
11826
    }
11827
 
11828
    @Override
11829
    public int hashCode() {
11830
      return 0;
11831
    }
11832
 
483 rajveer 11833
    public int compareTo(changeOrderStatus_result other) {
68 ashish 11834
      if (!getClass().equals(other.getClass())) {
11835
        return getClass().getName().compareTo(other.getClass().getName());
11836
      }
11837
 
11838
      int lastComparison = 0;
483 rajveer 11839
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 11840
 
11841
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11842
      if (lastComparison != 0) {
11843
        return lastComparison;
11844
      }
11845
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11846
      if (lastComparison != 0) {
11847
        return lastComparison;
11848
      }
11849
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11850
      if (lastComparison != 0) {
11851
        return lastComparison;
11852
      }
11853
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11854
      if (lastComparison != 0) {
11855
        return lastComparison;
11856
      }
11857
      return 0;
11858
    }
11859
 
11860
    public void read(TProtocol iprot) throws TException {
11861
      TField field;
11862
      iprot.readStructBegin();
11863
      while (true)
11864
      {
11865
        field = iprot.readFieldBegin();
11866
        if (field.type == TType.STOP) { 
11867
          break;
11868
        }
11869
        _Fields fieldId = _Fields.findByThriftId(field.id);
11870
        if (fieldId == null) {
11871
          TProtocolUtil.skip(iprot, field.type);
11872
        } else {
11873
          switch (fieldId) {
11874
            case SUCCESS:
11875
              if (field.type == TType.BOOL) {
11876
                this.success = iprot.readBool();
11877
                setSuccessIsSet(true);
11878
              } else { 
11879
                TProtocolUtil.skip(iprot, field.type);
11880
              }
11881
              break;
11882
            case EX:
11883
              if (field.type == TType.STRUCT) {
11884
                this.ex = new TransactionServiceException();
11885
                this.ex.read(iprot);
11886
              } else { 
11887
                TProtocolUtil.skip(iprot, field.type);
11888
              }
11889
              break;
11890
          }
11891
          iprot.readFieldEnd();
11892
        }
11893
      }
11894
      iprot.readStructEnd();
11895
      validate();
11896
    }
11897
 
11898
    public void write(TProtocol oprot) throws TException {
11899
      oprot.writeStructBegin(STRUCT_DESC);
11900
 
11901
      if (this.isSetSuccess()) {
11902
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11903
        oprot.writeBool(this.success);
11904
        oprot.writeFieldEnd();
11905
      } else if (this.isSetEx()) {
11906
        oprot.writeFieldBegin(EX_FIELD_DESC);
11907
        this.ex.write(oprot);
11908
        oprot.writeFieldEnd();
11909
      }
11910
      oprot.writeFieldStop();
11911
      oprot.writeStructEnd();
11912
    }
11913
 
11914
    @Override
11915
    public String toString() {
483 rajveer 11916
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 11917
      boolean first = true;
11918
 
11919
      sb.append("success:");
11920
      sb.append(this.success);
11921
      first = false;
11922
      if (!first) sb.append(", ");
11923
      sb.append("ex:");
11924
      if (this.ex == null) {
11925
        sb.append("null");
11926
      } else {
11927
        sb.append(this.ex);
11928
      }
11929
      first = false;
11930
      sb.append(")");
11931
      return sb.toString();
11932
    }
11933
 
11934
    public void validate() throws TException {
11935
      // check for required fields
11936
    }
11937
 
11938
  }
11939
 
495 rajveer 11940
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
11941
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
11942
 
11943
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11944
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 11945
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 11946
 
11947
    private long orderId;
11948
    private String invoice_number;
11949
    private String billed_by;
11950
 
11951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11952
    public enum _Fields implements TFieldIdEnum {
11953
      ORDER_ID((short)1, "orderId"),
11954
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 11955
      BILLED_BY((short)3, "billed_by");
495 rajveer 11956
 
11957
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11959
 
11960
      static {
11961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11962
          byId.put((int)field._thriftId, field);
11963
          byName.put(field.getFieldName(), field);
11964
        }
11965
      }
11966
 
11967
      /**
11968
       * Find the _Fields constant that matches fieldId, or null if its not found.
11969
       */
11970
      public static _Fields findByThriftId(int fieldId) {
11971
        return byId.get(fieldId);
11972
      }
11973
 
11974
      /**
11975
       * Find the _Fields constant that matches fieldId, throwing an exception
11976
       * if it is not found.
11977
       */
11978
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11979
        _Fields fields = findByThriftId(fieldId);
11980
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11981
        return fields;
11982
      }
11983
 
11984
      /**
11985
       * Find the _Fields constant that matches name, or null if its not found.
11986
       */
11987
      public static _Fields findByName(String name) {
11988
        return byName.get(name);
11989
      }
11990
 
11991
      private final short _thriftId;
11992
      private final String _fieldName;
11993
 
11994
      _Fields(short thriftId, String fieldName) {
11995
        _thriftId = thriftId;
11996
        _fieldName = fieldName;
11997
      }
11998
 
11999
      public short getThriftFieldId() {
12000
        return _thriftId;
12001
      }
12002
 
12003
      public String getFieldName() {
12004
        return _fieldName;
12005
      }
12006
    }
12007
 
12008
    // isset id assignments
12009
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12010
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12011
 
12012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12013
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12014
          new FieldValueMetaData(TType.I64)));
12015
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12016
          new FieldValueMetaData(TType.STRING)));
12017
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12018
          new FieldValueMetaData(TType.STRING)));
12019
    }});
12020
 
12021
    static {
12022
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12023
    }
12024
 
12025
    public addBillingDetails_args() {
12026
    }
12027
 
12028
    public addBillingDetails_args(
12029
      long orderId,
12030
      String invoice_number,
12031
      String billed_by)
12032
    {
12033
      this();
12034
      this.orderId = orderId;
12035
      setOrderIdIsSet(true);
12036
      this.invoice_number = invoice_number;
12037
      this.billed_by = billed_by;
12038
    }
12039
 
12040
    /**
12041
     * Performs a deep copy on <i>other</i>.
12042
     */
12043
    public addBillingDetails_args(addBillingDetails_args other) {
12044
      __isset_bit_vector.clear();
12045
      __isset_bit_vector.or(other.__isset_bit_vector);
12046
      this.orderId = other.orderId;
12047
      if (other.isSetInvoice_number()) {
12048
        this.invoice_number = other.invoice_number;
12049
      }
12050
      if (other.isSetBilled_by()) {
12051
        this.billed_by = other.billed_by;
12052
      }
12053
    }
12054
 
12055
    public addBillingDetails_args deepCopy() {
12056
      return new addBillingDetails_args(this);
12057
    }
12058
 
12059
    @Deprecated
12060
    public addBillingDetails_args clone() {
12061
      return new addBillingDetails_args(this);
12062
    }
12063
 
12064
    public long getOrderId() {
12065
      return this.orderId;
12066
    }
12067
 
12068
    public addBillingDetails_args setOrderId(long orderId) {
12069
      this.orderId = orderId;
12070
      setOrderIdIsSet(true);
12071
      return this;
12072
    }
12073
 
12074
    public void unsetOrderId() {
12075
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12076
    }
12077
 
12078
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12079
    public boolean isSetOrderId() {
12080
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12081
    }
12082
 
12083
    public void setOrderIdIsSet(boolean value) {
12084
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12085
    }
12086
 
12087
    public String getInvoice_number() {
12088
      return this.invoice_number;
12089
    }
12090
 
12091
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12092
      this.invoice_number = invoice_number;
12093
      return this;
12094
    }
12095
 
12096
    public void unsetInvoice_number() {
12097
      this.invoice_number = null;
12098
    }
12099
 
12100
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12101
    public boolean isSetInvoice_number() {
12102
      return this.invoice_number != null;
12103
    }
12104
 
12105
    public void setInvoice_numberIsSet(boolean value) {
12106
      if (!value) {
12107
        this.invoice_number = null;
12108
      }
12109
    }
12110
 
12111
    public String getBilled_by() {
12112
      return this.billed_by;
12113
    }
12114
 
12115
    public addBillingDetails_args setBilled_by(String billed_by) {
12116
      this.billed_by = billed_by;
12117
      return this;
12118
    }
12119
 
12120
    public void unsetBilled_by() {
12121
      this.billed_by = null;
12122
    }
12123
 
12124
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12125
    public boolean isSetBilled_by() {
12126
      return this.billed_by != null;
12127
    }
12128
 
12129
    public void setBilled_byIsSet(boolean value) {
12130
      if (!value) {
12131
        this.billed_by = null;
12132
      }
12133
    }
12134
 
12135
    public void setFieldValue(_Fields field, Object value) {
12136
      switch (field) {
12137
      case ORDER_ID:
12138
        if (value == null) {
12139
          unsetOrderId();
12140
        } else {
12141
          setOrderId((Long)value);
12142
        }
12143
        break;
12144
 
12145
      case INVOICE_NUMBER:
12146
        if (value == null) {
12147
          unsetInvoice_number();
12148
        } else {
12149
          setInvoice_number((String)value);
12150
        }
12151
        break;
12152
 
12153
      case BILLED_BY:
12154
        if (value == null) {
12155
          unsetBilled_by();
12156
        } else {
12157
          setBilled_by((String)value);
12158
        }
12159
        break;
12160
 
12161
      }
12162
    }
12163
 
12164
    public void setFieldValue(int fieldID, Object value) {
12165
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12166
    }
12167
 
12168
    public Object getFieldValue(_Fields field) {
12169
      switch (field) {
12170
      case ORDER_ID:
12171
        return new Long(getOrderId());
12172
 
12173
      case INVOICE_NUMBER:
12174
        return getInvoice_number();
12175
 
12176
      case BILLED_BY:
12177
        return getBilled_by();
12178
 
12179
      }
12180
      throw new IllegalStateException();
12181
    }
12182
 
12183
    public Object getFieldValue(int fieldId) {
12184
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12185
    }
12186
 
12187
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12188
    public boolean isSet(_Fields field) {
12189
      switch (field) {
12190
      case ORDER_ID:
12191
        return isSetOrderId();
12192
      case INVOICE_NUMBER:
12193
        return isSetInvoice_number();
12194
      case BILLED_BY:
12195
        return isSetBilled_by();
12196
      }
12197
      throw new IllegalStateException();
12198
    }
12199
 
12200
    public boolean isSet(int fieldID) {
12201
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12202
    }
12203
 
12204
    @Override
12205
    public boolean equals(Object that) {
12206
      if (that == null)
12207
        return false;
12208
      if (that instanceof addBillingDetails_args)
12209
        return this.equals((addBillingDetails_args)that);
12210
      return false;
12211
    }
12212
 
12213
    public boolean equals(addBillingDetails_args that) {
12214
      if (that == null)
12215
        return false;
12216
 
12217
      boolean this_present_orderId = true;
12218
      boolean that_present_orderId = true;
12219
      if (this_present_orderId || that_present_orderId) {
12220
        if (!(this_present_orderId && that_present_orderId))
12221
          return false;
12222
        if (this.orderId != that.orderId)
12223
          return false;
12224
      }
12225
 
12226
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12227
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12228
      if (this_present_invoice_number || that_present_invoice_number) {
12229
        if (!(this_present_invoice_number && that_present_invoice_number))
12230
          return false;
12231
        if (!this.invoice_number.equals(that.invoice_number))
12232
          return false;
12233
      }
12234
 
12235
      boolean this_present_billed_by = true && this.isSetBilled_by();
12236
      boolean that_present_billed_by = true && that.isSetBilled_by();
12237
      if (this_present_billed_by || that_present_billed_by) {
12238
        if (!(this_present_billed_by && that_present_billed_by))
12239
          return false;
12240
        if (!this.billed_by.equals(that.billed_by))
12241
          return false;
12242
      }
12243
 
12244
      return true;
12245
    }
12246
 
12247
    @Override
12248
    public int hashCode() {
12249
      return 0;
12250
    }
12251
 
12252
    public int compareTo(addBillingDetails_args other) {
12253
      if (!getClass().equals(other.getClass())) {
12254
        return getClass().getName().compareTo(other.getClass().getName());
12255
      }
12256
 
12257
      int lastComparison = 0;
12258
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12259
 
12260
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12261
      if (lastComparison != 0) {
12262
        return lastComparison;
12263
      }
12264
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12265
      if (lastComparison != 0) {
12266
        return lastComparison;
12267
      }
12268
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12269
      if (lastComparison != 0) {
12270
        return lastComparison;
12271
      }
12272
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12273
      if (lastComparison != 0) {
12274
        return lastComparison;
12275
      }
12276
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12277
      if (lastComparison != 0) {
12278
        return lastComparison;
12279
      }
12280
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12281
      if (lastComparison != 0) {
12282
        return lastComparison;
12283
      }
12284
      return 0;
12285
    }
12286
 
12287
    public void read(TProtocol iprot) throws TException {
12288
      TField field;
12289
      iprot.readStructBegin();
12290
      while (true)
12291
      {
12292
        field = iprot.readFieldBegin();
12293
        if (field.type == TType.STOP) { 
12294
          break;
12295
        }
12296
        _Fields fieldId = _Fields.findByThriftId(field.id);
12297
        if (fieldId == null) {
12298
          TProtocolUtil.skip(iprot, field.type);
12299
        } else {
12300
          switch (fieldId) {
12301
            case ORDER_ID:
12302
              if (field.type == TType.I64) {
12303
                this.orderId = iprot.readI64();
12304
                setOrderIdIsSet(true);
12305
              } else { 
12306
                TProtocolUtil.skip(iprot, field.type);
12307
              }
12308
              break;
12309
            case INVOICE_NUMBER:
12310
              if (field.type == TType.STRING) {
12311
                this.invoice_number = iprot.readString();
12312
              } else { 
12313
                TProtocolUtil.skip(iprot, field.type);
12314
              }
12315
              break;
12316
            case BILLED_BY:
12317
              if (field.type == TType.STRING) {
12318
                this.billed_by = iprot.readString();
12319
              } else { 
12320
                TProtocolUtil.skip(iprot, field.type);
12321
              }
12322
              break;
12323
          }
12324
          iprot.readFieldEnd();
12325
        }
12326
      }
12327
      iprot.readStructEnd();
12328
      validate();
12329
    }
12330
 
12331
    public void write(TProtocol oprot) throws TException {
12332
      validate();
12333
 
12334
      oprot.writeStructBegin(STRUCT_DESC);
12335
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12336
      oprot.writeI64(this.orderId);
12337
      oprot.writeFieldEnd();
12338
      if (this.invoice_number != null) {
12339
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12340
        oprot.writeString(this.invoice_number);
12341
        oprot.writeFieldEnd();
12342
      }
12343
      if (this.billed_by != null) {
12344
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12345
        oprot.writeString(this.billed_by);
12346
        oprot.writeFieldEnd();
12347
      }
12348
      oprot.writeFieldStop();
12349
      oprot.writeStructEnd();
12350
    }
12351
 
12352
    @Override
12353
    public String toString() {
12354
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12355
      boolean first = true;
12356
 
12357
      sb.append("orderId:");
12358
      sb.append(this.orderId);
12359
      first = false;
12360
      if (!first) sb.append(", ");
12361
      sb.append("invoice_number:");
12362
      if (this.invoice_number == null) {
12363
        sb.append("null");
12364
      } else {
12365
        sb.append(this.invoice_number);
12366
      }
12367
      first = false;
12368
      if (!first) sb.append(", ");
12369
      sb.append("billed_by:");
12370
      if (this.billed_by == null) {
12371
        sb.append("null");
12372
      } else {
12373
        sb.append(this.billed_by);
12374
      }
12375
      first = false;
12376
      sb.append(")");
12377
      return sb.toString();
12378
    }
12379
 
12380
    public void validate() throws TException {
12381
      // check for required fields
12382
    }
12383
 
12384
  }
12385
 
12386
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12387
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12388
 
12389
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12390
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12391
 
12392
    private boolean success;
12393
    private TransactionServiceException ex;
12394
 
12395
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12396
    public enum _Fields implements TFieldIdEnum {
12397
      SUCCESS((short)0, "success"),
12398
      EX((short)1, "ex");
12399
 
12400
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12402
 
12403
      static {
12404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12405
          byId.put((int)field._thriftId, field);
12406
          byName.put(field.getFieldName(), field);
12407
        }
12408
      }
12409
 
12410
      /**
12411
       * Find the _Fields constant that matches fieldId, or null if its not found.
12412
       */
12413
      public static _Fields findByThriftId(int fieldId) {
12414
        return byId.get(fieldId);
12415
      }
12416
 
12417
      /**
12418
       * Find the _Fields constant that matches fieldId, throwing an exception
12419
       * if it is not found.
12420
       */
12421
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12422
        _Fields fields = findByThriftId(fieldId);
12423
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12424
        return fields;
12425
      }
12426
 
12427
      /**
12428
       * Find the _Fields constant that matches name, or null if its not found.
12429
       */
12430
      public static _Fields findByName(String name) {
12431
        return byName.get(name);
12432
      }
12433
 
12434
      private final short _thriftId;
12435
      private final String _fieldName;
12436
 
12437
      _Fields(short thriftId, String fieldName) {
12438
        _thriftId = thriftId;
12439
        _fieldName = fieldName;
12440
      }
12441
 
12442
      public short getThriftFieldId() {
12443
        return _thriftId;
12444
      }
12445
 
12446
      public String getFieldName() {
12447
        return _fieldName;
12448
      }
12449
    }
12450
 
12451
    // isset id assignments
12452
    private static final int __SUCCESS_ISSET_ID = 0;
12453
    private BitSet __isset_bit_vector = new BitSet(1);
12454
 
12455
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12456
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12457
          new FieldValueMetaData(TType.BOOL)));
12458
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12459
          new FieldValueMetaData(TType.STRUCT)));
12460
    }});
12461
 
12462
    static {
12463
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12464
    }
12465
 
12466
    public addBillingDetails_result() {
12467
    }
12468
 
12469
    public addBillingDetails_result(
12470
      boolean success,
12471
      TransactionServiceException ex)
12472
    {
12473
      this();
12474
      this.success = success;
12475
      setSuccessIsSet(true);
12476
      this.ex = ex;
12477
    }
12478
 
12479
    /**
12480
     * Performs a deep copy on <i>other</i>.
12481
     */
12482
    public addBillingDetails_result(addBillingDetails_result other) {
12483
      __isset_bit_vector.clear();
12484
      __isset_bit_vector.or(other.__isset_bit_vector);
12485
      this.success = other.success;
12486
      if (other.isSetEx()) {
12487
        this.ex = new TransactionServiceException(other.ex);
12488
      }
12489
    }
12490
 
12491
    public addBillingDetails_result deepCopy() {
12492
      return new addBillingDetails_result(this);
12493
    }
12494
 
12495
    @Deprecated
12496
    public addBillingDetails_result clone() {
12497
      return new addBillingDetails_result(this);
12498
    }
12499
 
12500
    public boolean isSuccess() {
12501
      return this.success;
12502
    }
12503
 
12504
    public addBillingDetails_result setSuccess(boolean success) {
12505
      this.success = success;
12506
      setSuccessIsSet(true);
12507
      return this;
12508
    }
12509
 
12510
    public void unsetSuccess() {
12511
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12512
    }
12513
 
12514
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12515
    public boolean isSetSuccess() {
12516
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12517
    }
12518
 
12519
    public void setSuccessIsSet(boolean value) {
12520
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12521
    }
12522
 
12523
    public TransactionServiceException getEx() {
12524
      return this.ex;
12525
    }
12526
 
12527
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12528
      this.ex = ex;
12529
      return this;
12530
    }
12531
 
12532
    public void unsetEx() {
12533
      this.ex = null;
12534
    }
12535
 
12536
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12537
    public boolean isSetEx() {
12538
      return this.ex != null;
12539
    }
12540
 
12541
    public void setExIsSet(boolean value) {
12542
      if (!value) {
12543
        this.ex = null;
12544
      }
12545
    }
12546
 
12547
    public void setFieldValue(_Fields field, Object value) {
12548
      switch (field) {
12549
      case SUCCESS:
12550
        if (value == null) {
12551
          unsetSuccess();
12552
        } else {
12553
          setSuccess((Boolean)value);
12554
        }
12555
        break;
12556
 
12557
      case EX:
12558
        if (value == null) {
12559
          unsetEx();
12560
        } else {
12561
          setEx((TransactionServiceException)value);
12562
        }
12563
        break;
12564
 
12565
      }
12566
    }
12567
 
12568
    public void setFieldValue(int fieldID, Object value) {
12569
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12570
    }
12571
 
12572
    public Object getFieldValue(_Fields field) {
12573
      switch (field) {
12574
      case SUCCESS:
12575
        return new Boolean(isSuccess());
12576
 
12577
      case EX:
12578
        return getEx();
12579
 
12580
      }
12581
      throw new IllegalStateException();
12582
    }
12583
 
12584
    public Object getFieldValue(int fieldId) {
12585
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12586
    }
12587
 
12588
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12589
    public boolean isSet(_Fields field) {
12590
      switch (field) {
12591
      case SUCCESS:
12592
        return isSetSuccess();
12593
      case EX:
12594
        return isSetEx();
12595
      }
12596
      throw new IllegalStateException();
12597
    }
12598
 
12599
    public boolean isSet(int fieldID) {
12600
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12601
    }
12602
 
12603
    @Override
12604
    public boolean equals(Object that) {
12605
      if (that == null)
12606
        return false;
12607
      if (that instanceof addBillingDetails_result)
12608
        return this.equals((addBillingDetails_result)that);
12609
      return false;
12610
    }
12611
 
12612
    public boolean equals(addBillingDetails_result that) {
12613
      if (that == null)
12614
        return false;
12615
 
12616
      boolean this_present_success = true;
12617
      boolean that_present_success = true;
12618
      if (this_present_success || that_present_success) {
12619
        if (!(this_present_success && that_present_success))
12620
          return false;
12621
        if (this.success != that.success)
12622
          return false;
12623
      }
12624
 
12625
      boolean this_present_ex = true && this.isSetEx();
12626
      boolean that_present_ex = true && that.isSetEx();
12627
      if (this_present_ex || that_present_ex) {
12628
        if (!(this_present_ex && that_present_ex))
12629
          return false;
12630
        if (!this.ex.equals(that.ex))
12631
          return false;
12632
      }
12633
 
12634
      return true;
12635
    }
12636
 
12637
    @Override
12638
    public int hashCode() {
12639
      return 0;
12640
    }
12641
 
12642
    public int compareTo(addBillingDetails_result other) {
12643
      if (!getClass().equals(other.getClass())) {
12644
        return getClass().getName().compareTo(other.getClass().getName());
12645
      }
12646
 
12647
      int lastComparison = 0;
12648
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12649
 
12650
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12651
      if (lastComparison != 0) {
12652
        return lastComparison;
12653
      }
12654
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12655
      if (lastComparison != 0) {
12656
        return lastComparison;
12657
      }
12658
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12659
      if (lastComparison != 0) {
12660
        return lastComparison;
12661
      }
12662
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12663
      if (lastComparison != 0) {
12664
        return lastComparison;
12665
      }
12666
      return 0;
12667
    }
12668
 
12669
    public void read(TProtocol iprot) throws TException {
12670
      TField field;
12671
      iprot.readStructBegin();
12672
      while (true)
12673
      {
12674
        field = iprot.readFieldBegin();
12675
        if (field.type == TType.STOP) { 
12676
          break;
12677
        }
12678
        _Fields fieldId = _Fields.findByThriftId(field.id);
12679
        if (fieldId == null) {
12680
          TProtocolUtil.skip(iprot, field.type);
12681
        } else {
12682
          switch (fieldId) {
12683
            case SUCCESS:
12684
              if (field.type == TType.BOOL) {
12685
                this.success = iprot.readBool();
12686
                setSuccessIsSet(true);
12687
              } else { 
12688
                TProtocolUtil.skip(iprot, field.type);
12689
              }
12690
              break;
12691
            case EX:
12692
              if (field.type == TType.STRUCT) {
12693
                this.ex = new TransactionServiceException();
12694
                this.ex.read(iprot);
12695
              } else { 
12696
                TProtocolUtil.skip(iprot, field.type);
12697
              }
12698
              break;
12699
          }
12700
          iprot.readFieldEnd();
12701
        }
12702
      }
12703
      iprot.readStructEnd();
12704
      validate();
12705
    }
12706
 
12707
    public void write(TProtocol oprot) throws TException {
12708
      oprot.writeStructBegin(STRUCT_DESC);
12709
 
12710
      if (this.isSetSuccess()) {
12711
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12712
        oprot.writeBool(this.success);
12713
        oprot.writeFieldEnd();
12714
      } else if (this.isSetEx()) {
12715
        oprot.writeFieldBegin(EX_FIELD_DESC);
12716
        this.ex.write(oprot);
12717
        oprot.writeFieldEnd();
12718
      }
12719
      oprot.writeFieldStop();
12720
      oprot.writeStructEnd();
12721
    }
12722
 
12723
    @Override
12724
    public String toString() {
12725
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
12726
      boolean first = true;
12727
 
12728
      sb.append("success:");
12729
      sb.append(this.success);
12730
      first = false;
12731
      if (!first) sb.append(", ");
12732
      sb.append("ex:");
12733
      if (this.ex == null) {
12734
        sb.append("null");
12735
      } else {
12736
        sb.append(this.ex);
12737
      }
12738
      first = false;
12739
      sb.append(")");
12740
      return sb.toString();
12741
    }
12742
 
12743
    public void validate() throws TException {
12744
      // check for required fields
12745
    }
12746
 
12747
  }
12748
 
1148 chandransh 12749
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
12750
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
12751
 
12752
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12753
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
12754
 
12755
    private long orderId;
12756
    private long jacketNumber;
12757
 
12758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12759
    public enum _Fields implements TFieldIdEnum {
12760
      ORDER_ID((short)1, "orderId"),
12761
      JACKET_NUMBER((short)2, "jacketNumber");
12762
 
12763
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12765
 
12766
      static {
12767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12768
          byId.put((int)field._thriftId, field);
12769
          byName.put(field.getFieldName(), field);
12770
        }
12771
      }
12772
 
12773
      /**
12774
       * Find the _Fields constant that matches fieldId, or null if its not found.
12775
       */
12776
      public static _Fields findByThriftId(int fieldId) {
12777
        return byId.get(fieldId);
12778
      }
12779
 
12780
      /**
12781
       * Find the _Fields constant that matches fieldId, throwing an exception
12782
       * if it is not found.
12783
       */
12784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12785
        _Fields fields = findByThriftId(fieldId);
12786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12787
        return fields;
12788
      }
12789
 
12790
      /**
12791
       * Find the _Fields constant that matches name, or null if its not found.
12792
       */
12793
      public static _Fields findByName(String name) {
12794
        return byName.get(name);
12795
      }
12796
 
12797
      private final short _thriftId;
12798
      private final String _fieldName;
12799
 
12800
      _Fields(short thriftId, String fieldName) {
12801
        _thriftId = thriftId;
12802
        _fieldName = fieldName;
12803
      }
12804
 
12805
      public short getThriftFieldId() {
12806
        return _thriftId;
12807
      }
12808
 
12809
      public String getFieldName() {
12810
        return _fieldName;
12811
      }
12812
    }
12813
 
12814
    // isset id assignments
12815
    private static final int __ORDERID_ISSET_ID = 0;
12816
    private static final int __JACKETNUMBER_ISSET_ID = 1;
12817
    private BitSet __isset_bit_vector = new BitSet(2);
12818
 
12819
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12820
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12821
          new FieldValueMetaData(TType.I64)));
12822
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
12823
          new FieldValueMetaData(TType.I64)));
12824
    }});
12825
 
12826
    static {
12827
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
12828
    }
12829
 
12830
    public addJacketNumber_args() {
12831
    }
12832
 
12833
    public addJacketNumber_args(
12834
      long orderId,
12835
      long jacketNumber)
12836
    {
12837
      this();
12838
      this.orderId = orderId;
12839
      setOrderIdIsSet(true);
12840
      this.jacketNumber = jacketNumber;
12841
      setJacketNumberIsSet(true);
12842
    }
12843
 
12844
    /**
12845
     * Performs a deep copy on <i>other</i>.
12846
     */
12847
    public addJacketNumber_args(addJacketNumber_args other) {
12848
      __isset_bit_vector.clear();
12849
      __isset_bit_vector.or(other.__isset_bit_vector);
12850
      this.orderId = other.orderId;
12851
      this.jacketNumber = other.jacketNumber;
12852
    }
12853
 
12854
    public addJacketNumber_args deepCopy() {
12855
      return new addJacketNumber_args(this);
12856
    }
12857
 
12858
    @Deprecated
12859
    public addJacketNumber_args clone() {
12860
      return new addJacketNumber_args(this);
12861
    }
12862
 
12863
    public long getOrderId() {
12864
      return this.orderId;
12865
    }
12866
 
12867
    public addJacketNumber_args setOrderId(long orderId) {
12868
      this.orderId = orderId;
12869
      setOrderIdIsSet(true);
12870
      return this;
12871
    }
12872
 
12873
    public void unsetOrderId() {
12874
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12875
    }
12876
 
12877
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12878
    public boolean isSetOrderId() {
12879
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12880
    }
12881
 
12882
    public void setOrderIdIsSet(boolean value) {
12883
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12884
    }
12885
 
12886
    public long getJacketNumber() {
12887
      return this.jacketNumber;
12888
    }
12889
 
12890
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
12891
      this.jacketNumber = jacketNumber;
12892
      setJacketNumberIsSet(true);
12893
      return this;
12894
    }
12895
 
12896
    public void unsetJacketNumber() {
12897
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
12898
    }
12899
 
12900
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
12901
    public boolean isSetJacketNumber() {
12902
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
12903
    }
12904
 
12905
    public void setJacketNumberIsSet(boolean value) {
12906
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
12907
    }
12908
 
12909
    public void setFieldValue(_Fields field, Object value) {
12910
      switch (field) {
12911
      case ORDER_ID:
12912
        if (value == null) {
12913
          unsetOrderId();
12914
        } else {
12915
          setOrderId((Long)value);
12916
        }
12917
        break;
12918
 
12919
      case JACKET_NUMBER:
12920
        if (value == null) {
12921
          unsetJacketNumber();
12922
        } else {
12923
          setJacketNumber((Long)value);
12924
        }
12925
        break;
12926
 
12927
      }
12928
    }
12929
 
12930
    public void setFieldValue(int fieldID, Object value) {
12931
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12932
    }
12933
 
12934
    public Object getFieldValue(_Fields field) {
12935
      switch (field) {
12936
      case ORDER_ID:
12937
        return new Long(getOrderId());
12938
 
12939
      case JACKET_NUMBER:
12940
        return new Long(getJacketNumber());
12941
 
12942
      }
12943
      throw new IllegalStateException();
12944
    }
12945
 
12946
    public Object getFieldValue(int fieldId) {
12947
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12948
    }
12949
 
12950
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12951
    public boolean isSet(_Fields field) {
12952
      switch (field) {
12953
      case ORDER_ID:
12954
        return isSetOrderId();
12955
      case JACKET_NUMBER:
12956
        return isSetJacketNumber();
12957
      }
12958
      throw new IllegalStateException();
12959
    }
12960
 
12961
    public boolean isSet(int fieldID) {
12962
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12963
    }
12964
 
12965
    @Override
12966
    public boolean equals(Object that) {
12967
      if (that == null)
12968
        return false;
12969
      if (that instanceof addJacketNumber_args)
12970
        return this.equals((addJacketNumber_args)that);
12971
      return false;
12972
    }
12973
 
12974
    public boolean equals(addJacketNumber_args that) {
12975
      if (that == null)
12976
        return false;
12977
 
12978
      boolean this_present_orderId = true;
12979
      boolean that_present_orderId = true;
12980
      if (this_present_orderId || that_present_orderId) {
12981
        if (!(this_present_orderId && that_present_orderId))
12982
          return false;
12983
        if (this.orderId != that.orderId)
12984
          return false;
12985
      }
12986
 
12987
      boolean this_present_jacketNumber = true;
12988
      boolean that_present_jacketNumber = true;
12989
      if (this_present_jacketNumber || that_present_jacketNumber) {
12990
        if (!(this_present_jacketNumber && that_present_jacketNumber))
12991
          return false;
12992
        if (this.jacketNumber != that.jacketNumber)
12993
          return false;
12994
      }
12995
 
12996
      return true;
12997
    }
12998
 
12999
    @Override
13000
    public int hashCode() {
13001
      return 0;
13002
    }
13003
 
13004
    public int compareTo(addJacketNumber_args other) {
13005
      if (!getClass().equals(other.getClass())) {
13006
        return getClass().getName().compareTo(other.getClass().getName());
13007
      }
13008
 
13009
      int lastComparison = 0;
13010
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13011
 
13012
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13013
      if (lastComparison != 0) {
13014
        return lastComparison;
13015
      }
13016
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13017
      if (lastComparison != 0) {
13018
        return lastComparison;
13019
      }
13020
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13021
      if (lastComparison != 0) {
13022
        return lastComparison;
13023
      }
13024
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13025
      if (lastComparison != 0) {
13026
        return lastComparison;
13027
      }
13028
      return 0;
13029
    }
13030
 
13031
    public void read(TProtocol iprot) throws TException {
13032
      TField field;
13033
      iprot.readStructBegin();
13034
      while (true)
13035
      {
13036
        field = iprot.readFieldBegin();
13037
        if (field.type == TType.STOP) { 
13038
          break;
13039
        }
13040
        _Fields fieldId = _Fields.findByThriftId(field.id);
13041
        if (fieldId == null) {
13042
          TProtocolUtil.skip(iprot, field.type);
13043
        } else {
13044
          switch (fieldId) {
13045
            case ORDER_ID:
13046
              if (field.type == TType.I64) {
13047
                this.orderId = iprot.readI64();
13048
                setOrderIdIsSet(true);
13049
              } else { 
13050
                TProtocolUtil.skip(iprot, field.type);
13051
              }
13052
              break;
13053
            case JACKET_NUMBER:
13054
              if (field.type == TType.I64) {
13055
                this.jacketNumber = iprot.readI64();
13056
                setJacketNumberIsSet(true);
13057
              } else { 
13058
                TProtocolUtil.skip(iprot, field.type);
13059
              }
13060
              break;
13061
          }
13062
          iprot.readFieldEnd();
13063
        }
13064
      }
13065
      iprot.readStructEnd();
13066
      validate();
13067
    }
13068
 
13069
    public void write(TProtocol oprot) throws TException {
13070
      validate();
13071
 
13072
      oprot.writeStructBegin(STRUCT_DESC);
13073
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13074
      oprot.writeI64(this.orderId);
13075
      oprot.writeFieldEnd();
13076
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13077
      oprot.writeI64(this.jacketNumber);
13078
      oprot.writeFieldEnd();
13079
      oprot.writeFieldStop();
13080
      oprot.writeStructEnd();
13081
    }
13082
 
13083
    @Override
13084
    public String toString() {
13085
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13086
      boolean first = true;
13087
 
13088
      sb.append("orderId:");
13089
      sb.append(this.orderId);
13090
      first = false;
13091
      if (!first) sb.append(", ");
13092
      sb.append("jacketNumber:");
13093
      sb.append(this.jacketNumber);
13094
      first = false;
13095
      sb.append(")");
13096
      return sb.toString();
13097
    }
13098
 
13099
    public void validate() throws TException {
13100
      // check for required fields
13101
    }
13102
 
13103
  }
13104
 
13105
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13106
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13107
 
13108
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13109
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13110
 
13111
    private boolean success;
13112
    private TransactionServiceException ex;
13113
 
13114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13115
    public enum _Fields implements TFieldIdEnum {
13116
      SUCCESS((short)0, "success"),
13117
      EX((short)1, "ex");
13118
 
13119
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13120
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13121
 
13122
      static {
13123
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13124
          byId.put((int)field._thriftId, field);
13125
          byName.put(field.getFieldName(), field);
13126
        }
13127
      }
13128
 
13129
      /**
13130
       * Find the _Fields constant that matches fieldId, or null if its not found.
13131
       */
13132
      public static _Fields findByThriftId(int fieldId) {
13133
        return byId.get(fieldId);
13134
      }
13135
 
13136
      /**
13137
       * Find the _Fields constant that matches fieldId, throwing an exception
13138
       * if it is not found.
13139
       */
13140
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13141
        _Fields fields = findByThriftId(fieldId);
13142
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13143
        return fields;
13144
      }
13145
 
13146
      /**
13147
       * Find the _Fields constant that matches name, or null if its not found.
13148
       */
13149
      public static _Fields findByName(String name) {
13150
        return byName.get(name);
13151
      }
13152
 
13153
      private final short _thriftId;
13154
      private final String _fieldName;
13155
 
13156
      _Fields(short thriftId, String fieldName) {
13157
        _thriftId = thriftId;
13158
        _fieldName = fieldName;
13159
      }
13160
 
13161
      public short getThriftFieldId() {
13162
        return _thriftId;
13163
      }
13164
 
13165
      public String getFieldName() {
13166
        return _fieldName;
13167
      }
13168
    }
13169
 
13170
    // isset id assignments
13171
    private static final int __SUCCESS_ISSET_ID = 0;
13172
    private BitSet __isset_bit_vector = new BitSet(1);
13173
 
13174
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13175
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13176
          new FieldValueMetaData(TType.BOOL)));
13177
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13178
          new FieldValueMetaData(TType.STRUCT)));
13179
    }});
13180
 
13181
    static {
13182
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13183
    }
13184
 
13185
    public addJacketNumber_result() {
13186
    }
13187
 
13188
    public addJacketNumber_result(
13189
      boolean success,
13190
      TransactionServiceException ex)
13191
    {
13192
      this();
13193
      this.success = success;
13194
      setSuccessIsSet(true);
13195
      this.ex = ex;
13196
    }
13197
 
13198
    /**
13199
     * Performs a deep copy on <i>other</i>.
13200
     */
13201
    public addJacketNumber_result(addJacketNumber_result other) {
13202
      __isset_bit_vector.clear();
13203
      __isset_bit_vector.or(other.__isset_bit_vector);
13204
      this.success = other.success;
13205
      if (other.isSetEx()) {
13206
        this.ex = new TransactionServiceException(other.ex);
13207
      }
13208
    }
13209
 
13210
    public addJacketNumber_result deepCopy() {
13211
      return new addJacketNumber_result(this);
13212
    }
13213
 
13214
    @Deprecated
13215
    public addJacketNumber_result clone() {
13216
      return new addJacketNumber_result(this);
13217
    }
13218
 
13219
    public boolean isSuccess() {
13220
      return this.success;
13221
    }
13222
 
13223
    public addJacketNumber_result setSuccess(boolean success) {
13224
      this.success = success;
13225
      setSuccessIsSet(true);
13226
      return this;
13227
    }
13228
 
13229
    public void unsetSuccess() {
13230
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13231
    }
13232
 
13233
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13234
    public boolean isSetSuccess() {
13235
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13236
    }
13237
 
13238
    public void setSuccessIsSet(boolean value) {
13239
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13240
    }
13241
 
13242
    public TransactionServiceException getEx() {
13243
      return this.ex;
13244
    }
13245
 
13246
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13247
      this.ex = ex;
13248
      return this;
13249
    }
13250
 
13251
    public void unsetEx() {
13252
      this.ex = null;
13253
    }
13254
 
13255
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13256
    public boolean isSetEx() {
13257
      return this.ex != null;
13258
    }
13259
 
13260
    public void setExIsSet(boolean value) {
13261
      if (!value) {
13262
        this.ex = null;
13263
      }
13264
    }
13265
 
13266
    public void setFieldValue(_Fields field, Object value) {
13267
      switch (field) {
13268
      case SUCCESS:
13269
        if (value == null) {
13270
          unsetSuccess();
13271
        } else {
13272
          setSuccess((Boolean)value);
13273
        }
13274
        break;
13275
 
13276
      case EX:
13277
        if (value == null) {
13278
          unsetEx();
13279
        } else {
13280
          setEx((TransactionServiceException)value);
13281
        }
13282
        break;
13283
 
13284
      }
13285
    }
13286
 
13287
    public void setFieldValue(int fieldID, Object value) {
13288
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13289
    }
13290
 
13291
    public Object getFieldValue(_Fields field) {
13292
      switch (field) {
13293
      case SUCCESS:
13294
        return new Boolean(isSuccess());
13295
 
13296
      case EX:
13297
        return getEx();
13298
 
13299
      }
13300
      throw new IllegalStateException();
13301
    }
13302
 
13303
    public Object getFieldValue(int fieldId) {
13304
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13305
    }
13306
 
13307
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13308
    public boolean isSet(_Fields field) {
13309
      switch (field) {
13310
      case SUCCESS:
13311
        return isSetSuccess();
13312
      case EX:
13313
        return isSetEx();
13314
      }
13315
      throw new IllegalStateException();
13316
    }
13317
 
13318
    public boolean isSet(int fieldID) {
13319
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13320
    }
13321
 
13322
    @Override
13323
    public boolean equals(Object that) {
13324
      if (that == null)
13325
        return false;
13326
      if (that instanceof addJacketNumber_result)
13327
        return this.equals((addJacketNumber_result)that);
13328
      return false;
13329
    }
13330
 
13331
    public boolean equals(addJacketNumber_result that) {
13332
      if (that == null)
13333
        return false;
13334
 
13335
      boolean this_present_success = true;
13336
      boolean that_present_success = true;
13337
      if (this_present_success || that_present_success) {
13338
        if (!(this_present_success && that_present_success))
13339
          return false;
13340
        if (this.success != that.success)
13341
          return false;
13342
      }
13343
 
13344
      boolean this_present_ex = true && this.isSetEx();
13345
      boolean that_present_ex = true && that.isSetEx();
13346
      if (this_present_ex || that_present_ex) {
13347
        if (!(this_present_ex && that_present_ex))
13348
          return false;
13349
        if (!this.ex.equals(that.ex))
13350
          return false;
13351
      }
13352
 
13353
      return true;
13354
    }
13355
 
13356
    @Override
13357
    public int hashCode() {
13358
      return 0;
13359
    }
13360
 
13361
    public int compareTo(addJacketNumber_result other) {
13362
      if (!getClass().equals(other.getClass())) {
13363
        return getClass().getName().compareTo(other.getClass().getName());
13364
      }
13365
 
13366
      int lastComparison = 0;
13367
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13368
 
13369
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13370
      if (lastComparison != 0) {
13371
        return lastComparison;
13372
      }
13373
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13374
      if (lastComparison != 0) {
13375
        return lastComparison;
13376
      }
13377
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13378
      if (lastComparison != 0) {
13379
        return lastComparison;
13380
      }
13381
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13382
      if (lastComparison != 0) {
13383
        return lastComparison;
13384
      }
13385
      return 0;
13386
    }
13387
 
13388
    public void read(TProtocol iprot) throws TException {
13389
      TField field;
13390
      iprot.readStructBegin();
13391
      while (true)
13392
      {
13393
        field = iprot.readFieldBegin();
13394
        if (field.type == TType.STOP) { 
13395
          break;
13396
        }
13397
        _Fields fieldId = _Fields.findByThriftId(field.id);
13398
        if (fieldId == null) {
13399
          TProtocolUtil.skip(iprot, field.type);
13400
        } else {
13401
          switch (fieldId) {
13402
            case SUCCESS:
13403
              if (field.type == TType.BOOL) {
13404
                this.success = iprot.readBool();
13405
                setSuccessIsSet(true);
13406
              } else { 
13407
                TProtocolUtil.skip(iprot, field.type);
13408
              }
13409
              break;
13410
            case EX:
13411
              if (field.type == TType.STRUCT) {
13412
                this.ex = new TransactionServiceException();
13413
                this.ex.read(iprot);
13414
              } else { 
13415
                TProtocolUtil.skip(iprot, field.type);
13416
              }
13417
              break;
13418
          }
13419
          iprot.readFieldEnd();
13420
        }
13421
      }
13422
      iprot.readStructEnd();
13423
      validate();
13424
    }
13425
 
13426
    public void write(TProtocol oprot) throws TException {
13427
      oprot.writeStructBegin(STRUCT_DESC);
13428
 
13429
      if (this.isSetSuccess()) {
13430
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13431
        oprot.writeBool(this.success);
13432
        oprot.writeFieldEnd();
13433
      } else if (this.isSetEx()) {
13434
        oprot.writeFieldBegin(EX_FIELD_DESC);
13435
        this.ex.write(oprot);
13436
        oprot.writeFieldEnd();
13437
      }
13438
      oprot.writeFieldStop();
13439
      oprot.writeStructEnd();
13440
    }
13441
 
13442
    @Override
13443
    public String toString() {
13444
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13445
      boolean first = true;
13446
 
13447
      sb.append("success:");
13448
      sb.append(this.success);
13449
      first = false;
13450
      if (!first) sb.append(", ");
13451
      sb.append("ex:");
13452
      if (this.ex == null) {
13453
        sb.append("null");
13454
      } else {
13455
        sb.append(this.ex);
13456
      }
13457
      first = false;
13458
      sb.append(")");
13459
      return sb.toString();
13460
    }
13461
 
13462
    public void validate() throws TException {
13463
      // check for required fields
13464
    }
13465
 
13466
  }
13467
 
923 rajveer 13468
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13469
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13470
 
13471
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13472
 
13473
    private long orderId;
13474
 
13475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13476
    public enum _Fields implements TFieldIdEnum {
13477
      ORDER_ID((short)1, "orderId");
13478
 
13479
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13480
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13481
 
13482
      static {
13483
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13484
          byId.put((int)field._thriftId, field);
13485
          byName.put(field.getFieldName(), field);
13486
        }
13487
      }
13488
 
13489
      /**
13490
       * Find the _Fields constant that matches fieldId, or null if its not found.
13491
       */
13492
      public static _Fields findByThriftId(int fieldId) {
13493
        return byId.get(fieldId);
13494
      }
13495
 
13496
      /**
13497
       * Find the _Fields constant that matches fieldId, throwing an exception
13498
       * if it is not found.
13499
       */
13500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13501
        _Fields fields = findByThriftId(fieldId);
13502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13503
        return fields;
13504
      }
13505
 
13506
      /**
13507
       * Find the _Fields constant that matches name, or null if its not found.
13508
       */
13509
      public static _Fields findByName(String name) {
13510
        return byName.get(name);
13511
      }
13512
 
13513
      private final short _thriftId;
13514
      private final String _fieldName;
13515
 
13516
      _Fields(short thriftId, String fieldName) {
13517
        _thriftId = thriftId;
13518
        _fieldName = fieldName;
13519
      }
13520
 
13521
      public short getThriftFieldId() {
13522
        return _thriftId;
13523
      }
13524
 
13525
      public String getFieldName() {
13526
        return _fieldName;
13527
      }
13528
    }
13529
 
13530
    // isset id assignments
13531
    private static final int __ORDERID_ISSET_ID = 0;
13532
    private BitSet __isset_bit_vector = new BitSet(1);
13533
 
13534
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13535
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13536
          new FieldValueMetaData(TType.I64)));
13537
    }});
13538
 
13539
    static {
13540
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13541
    }
13542
 
13543
    public acceptOrder_args() {
13544
    }
13545
 
13546
    public acceptOrder_args(
13547
      long orderId)
13548
    {
13549
      this();
13550
      this.orderId = orderId;
13551
      setOrderIdIsSet(true);
13552
    }
13553
 
13554
    /**
13555
     * Performs a deep copy on <i>other</i>.
13556
     */
13557
    public acceptOrder_args(acceptOrder_args other) {
13558
      __isset_bit_vector.clear();
13559
      __isset_bit_vector.or(other.__isset_bit_vector);
13560
      this.orderId = other.orderId;
13561
    }
13562
 
13563
    public acceptOrder_args deepCopy() {
13564
      return new acceptOrder_args(this);
13565
    }
13566
 
13567
    @Deprecated
13568
    public acceptOrder_args clone() {
13569
      return new acceptOrder_args(this);
13570
    }
13571
 
13572
    public long getOrderId() {
13573
      return this.orderId;
13574
    }
13575
 
13576
    public acceptOrder_args setOrderId(long orderId) {
13577
      this.orderId = orderId;
13578
      setOrderIdIsSet(true);
13579
      return this;
13580
    }
13581
 
13582
    public void unsetOrderId() {
13583
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13584
    }
13585
 
13586
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13587
    public boolean isSetOrderId() {
13588
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13589
    }
13590
 
13591
    public void setOrderIdIsSet(boolean value) {
13592
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13593
    }
13594
 
13595
    public void setFieldValue(_Fields field, Object value) {
13596
      switch (field) {
13597
      case ORDER_ID:
13598
        if (value == null) {
13599
          unsetOrderId();
13600
        } else {
13601
          setOrderId((Long)value);
13602
        }
13603
        break;
13604
 
13605
      }
13606
    }
13607
 
13608
    public void setFieldValue(int fieldID, Object value) {
13609
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13610
    }
13611
 
13612
    public Object getFieldValue(_Fields field) {
13613
      switch (field) {
13614
      case ORDER_ID:
13615
        return new Long(getOrderId());
13616
 
13617
      }
13618
      throw new IllegalStateException();
13619
    }
13620
 
13621
    public Object getFieldValue(int fieldId) {
13622
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13623
    }
13624
 
13625
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13626
    public boolean isSet(_Fields field) {
13627
      switch (field) {
13628
      case ORDER_ID:
13629
        return isSetOrderId();
13630
      }
13631
      throw new IllegalStateException();
13632
    }
13633
 
13634
    public boolean isSet(int fieldID) {
13635
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13636
    }
13637
 
13638
    @Override
13639
    public boolean equals(Object that) {
13640
      if (that == null)
13641
        return false;
13642
      if (that instanceof acceptOrder_args)
13643
        return this.equals((acceptOrder_args)that);
13644
      return false;
13645
    }
13646
 
13647
    public boolean equals(acceptOrder_args that) {
13648
      if (that == null)
13649
        return false;
13650
 
13651
      boolean this_present_orderId = true;
13652
      boolean that_present_orderId = true;
13653
      if (this_present_orderId || that_present_orderId) {
13654
        if (!(this_present_orderId && that_present_orderId))
13655
          return false;
13656
        if (this.orderId != that.orderId)
13657
          return false;
13658
      }
13659
 
13660
      return true;
13661
    }
13662
 
13663
    @Override
13664
    public int hashCode() {
13665
      return 0;
13666
    }
13667
 
13668
    public int compareTo(acceptOrder_args other) {
13669
      if (!getClass().equals(other.getClass())) {
13670
        return getClass().getName().compareTo(other.getClass().getName());
13671
      }
13672
 
13673
      int lastComparison = 0;
13674
      acceptOrder_args typedOther = (acceptOrder_args)other;
13675
 
13676
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13677
      if (lastComparison != 0) {
13678
        return lastComparison;
13679
      }
13680
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13681
      if (lastComparison != 0) {
13682
        return lastComparison;
13683
      }
13684
      return 0;
13685
    }
13686
 
13687
    public void read(TProtocol iprot) throws TException {
13688
      TField field;
13689
      iprot.readStructBegin();
13690
      while (true)
13691
      {
13692
        field = iprot.readFieldBegin();
13693
        if (field.type == TType.STOP) { 
13694
          break;
13695
        }
13696
        _Fields fieldId = _Fields.findByThriftId(field.id);
13697
        if (fieldId == null) {
13698
          TProtocolUtil.skip(iprot, field.type);
13699
        } else {
13700
          switch (fieldId) {
13701
            case ORDER_ID:
13702
              if (field.type == TType.I64) {
13703
                this.orderId = iprot.readI64();
13704
                setOrderIdIsSet(true);
13705
              } else { 
13706
                TProtocolUtil.skip(iprot, field.type);
13707
              }
13708
              break;
13709
          }
13710
          iprot.readFieldEnd();
13711
        }
13712
      }
13713
      iprot.readStructEnd();
13714
      validate();
13715
    }
13716
 
13717
    public void write(TProtocol oprot) throws TException {
13718
      validate();
13719
 
13720
      oprot.writeStructBegin(STRUCT_DESC);
13721
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13722
      oprot.writeI64(this.orderId);
13723
      oprot.writeFieldEnd();
13724
      oprot.writeFieldStop();
13725
      oprot.writeStructEnd();
13726
    }
13727
 
13728
    @Override
13729
    public String toString() {
13730
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
13731
      boolean first = true;
13732
 
13733
      sb.append("orderId:");
13734
      sb.append(this.orderId);
13735
      first = false;
13736
      sb.append(")");
13737
      return sb.toString();
13738
    }
13739
 
13740
    public void validate() throws TException {
13741
      // check for required fields
13742
    }
13743
 
13744
  }
13745
 
13746
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
13747
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
13748
 
13749
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13750
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13751
 
13752
    private boolean success;
13753
    private TransactionServiceException ex;
13754
 
13755
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13756
    public enum _Fields implements TFieldIdEnum {
13757
      SUCCESS((short)0, "success"),
13758
      EX((short)1, "ex");
13759
 
13760
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13761
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13762
 
13763
      static {
13764
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13765
          byId.put((int)field._thriftId, field);
13766
          byName.put(field.getFieldName(), field);
13767
        }
13768
      }
13769
 
13770
      /**
13771
       * Find the _Fields constant that matches fieldId, or null if its not found.
13772
       */
13773
      public static _Fields findByThriftId(int fieldId) {
13774
        return byId.get(fieldId);
13775
      }
13776
 
13777
      /**
13778
       * Find the _Fields constant that matches fieldId, throwing an exception
13779
       * if it is not found.
13780
       */
13781
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13782
        _Fields fields = findByThriftId(fieldId);
13783
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13784
        return fields;
13785
      }
13786
 
13787
      /**
13788
       * Find the _Fields constant that matches name, or null if its not found.
13789
       */
13790
      public static _Fields findByName(String name) {
13791
        return byName.get(name);
13792
      }
13793
 
13794
      private final short _thriftId;
13795
      private final String _fieldName;
13796
 
13797
      _Fields(short thriftId, String fieldName) {
13798
        _thriftId = thriftId;
13799
        _fieldName = fieldName;
13800
      }
13801
 
13802
      public short getThriftFieldId() {
13803
        return _thriftId;
13804
      }
13805
 
13806
      public String getFieldName() {
13807
        return _fieldName;
13808
      }
13809
    }
13810
 
13811
    // isset id assignments
13812
    private static final int __SUCCESS_ISSET_ID = 0;
13813
    private BitSet __isset_bit_vector = new BitSet(1);
13814
 
13815
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13816
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13817
          new FieldValueMetaData(TType.BOOL)));
13818
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13819
          new FieldValueMetaData(TType.STRUCT)));
13820
    }});
13821
 
13822
    static {
13823
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
13824
    }
13825
 
13826
    public acceptOrder_result() {
13827
    }
13828
 
13829
    public acceptOrder_result(
13830
      boolean success,
13831
      TransactionServiceException ex)
13832
    {
13833
      this();
13834
      this.success = success;
13835
      setSuccessIsSet(true);
13836
      this.ex = ex;
13837
    }
13838
 
13839
    /**
13840
     * Performs a deep copy on <i>other</i>.
13841
     */
13842
    public acceptOrder_result(acceptOrder_result other) {
13843
      __isset_bit_vector.clear();
13844
      __isset_bit_vector.or(other.__isset_bit_vector);
13845
      this.success = other.success;
13846
      if (other.isSetEx()) {
13847
        this.ex = new TransactionServiceException(other.ex);
13848
      }
13849
    }
13850
 
13851
    public acceptOrder_result deepCopy() {
13852
      return new acceptOrder_result(this);
13853
    }
13854
 
13855
    @Deprecated
13856
    public acceptOrder_result clone() {
13857
      return new acceptOrder_result(this);
13858
    }
13859
 
13860
    public boolean isSuccess() {
13861
      return this.success;
13862
    }
13863
 
13864
    public acceptOrder_result setSuccess(boolean success) {
13865
      this.success = success;
13866
      setSuccessIsSet(true);
13867
      return this;
13868
    }
13869
 
13870
    public void unsetSuccess() {
13871
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13872
    }
13873
 
13874
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13875
    public boolean isSetSuccess() {
13876
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13877
    }
13878
 
13879
    public void setSuccessIsSet(boolean value) {
13880
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13881
    }
13882
 
13883
    public TransactionServiceException getEx() {
13884
      return this.ex;
13885
    }
13886
 
13887
    public acceptOrder_result setEx(TransactionServiceException ex) {
13888
      this.ex = ex;
13889
      return this;
13890
    }
13891
 
13892
    public void unsetEx() {
13893
      this.ex = null;
13894
    }
13895
 
13896
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13897
    public boolean isSetEx() {
13898
      return this.ex != null;
13899
    }
13900
 
13901
    public void setExIsSet(boolean value) {
13902
      if (!value) {
13903
        this.ex = null;
13904
      }
13905
    }
13906
 
13907
    public void setFieldValue(_Fields field, Object value) {
13908
      switch (field) {
13909
      case SUCCESS:
13910
        if (value == null) {
13911
          unsetSuccess();
13912
        } else {
13913
          setSuccess((Boolean)value);
13914
        }
13915
        break;
13916
 
13917
      case EX:
13918
        if (value == null) {
13919
          unsetEx();
13920
        } else {
13921
          setEx((TransactionServiceException)value);
13922
        }
13923
        break;
13924
 
13925
      }
13926
    }
13927
 
13928
    public void setFieldValue(int fieldID, Object value) {
13929
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13930
    }
13931
 
13932
    public Object getFieldValue(_Fields field) {
13933
      switch (field) {
13934
      case SUCCESS:
13935
        return new Boolean(isSuccess());
13936
 
13937
      case EX:
13938
        return getEx();
13939
 
13940
      }
13941
      throw new IllegalStateException();
13942
    }
13943
 
13944
    public Object getFieldValue(int fieldId) {
13945
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13946
    }
13947
 
13948
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13949
    public boolean isSet(_Fields field) {
13950
      switch (field) {
13951
      case SUCCESS:
13952
        return isSetSuccess();
13953
      case EX:
13954
        return isSetEx();
13955
      }
13956
      throw new IllegalStateException();
13957
    }
13958
 
13959
    public boolean isSet(int fieldID) {
13960
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13961
    }
13962
 
13963
    @Override
13964
    public boolean equals(Object that) {
13965
      if (that == null)
13966
        return false;
13967
      if (that instanceof acceptOrder_result)
13968
        return this.equals((acceptOrder_result)that);
13969
      return false;
13970
    }
13971
 
13972
    public boolean equals(acceptOrder_result that) {
13973
      if (that == null)
13974
        return false;
13975
 
13976
      boolean this_present_success = true;
13977
      boolean that_present_success = true;
13978
      if (this_present_success || that_present_success) {
13979
        if (!(this_present_success && that_present_success))
13980
          return false;
13981
        if (this.success != that.success)
13982
          return false;
13983
      }
13984
 
13985
      boolean this_present_ex = true && this.isSetEx();
13986
      boolean that_present_ex = true && that.isSetEx();
13987
      if (this_present_ex || that_present_ex) {
13988
        if (!(this_present_ex && that_present_ex))
13989
          return false;
13990
        if (!this.ex.equals(that.ex))
13991
          return false;
13992
      }
13993
 
13994
      return true;
13995
    }
13996
 
13997
    @Override
13998
    public int hashCode() {
13999
      return 0;
14000
    }
14001
 
14002
    public int compareTo(acceptOrder_result other) {
14003
      if (!getClass().equals(other.getClass())) {
14004
        return getClass().getName().compareTo(other.getClass().getName());
14005
      }
14006
 
14007
      int lastComparison = 0;
14008
      acceptOrder_result typedOther = (acceptOrder_result)other;
14009
 
14010
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14011
      if (lastComparison != 0) {
14012
        return lastComparison;
14013
      }
14014
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14015
      if (lastComparison != 0) {
14016
        return lastComparison;
14017
      }
14018
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14019
      if (lastComparison != 0) {
14020
        return lastComparison;
14021
      }
14022
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14023
      if (lastComparison != 0) {
14024
        return lastComparison;
14025
      }
14026
      return 0;
14027
    }
14028
 
14029
    public void read(TProtocol iprot) throws TException {
14030
      TField field;
14031
      iprot.readStructBegin();
14032
      while (true)
14033
      {
14034
        field = iprot.readFieldBegin();
14035
        if (field.type == TType.STOP) { 
14036
          break;
14037
        }
14038
        _Fields fieldId = _Fields.findByThriftId(field.id);
14039
        if (fieldId == null) {
14040
          TProtocolUtil.skip(iprot, field.type);
14041
        } else {
14042
          switch (fieldId) {
14043
            case SUCCESS:
14044
              if (field.type == TType.BOOL) {
14045
                this.success = iprot.readBool();
14046
                setSuccessIsSet(true);
14047
              } else { 
14048
                TProtocolUtil.skip(iprot, field.type);
14049
              }
14050
              break;
14051
            case EX:
14052
              if (field.type == TType.STRUCT) {
14053
                this.ex = new TransactionServiceException();
14054
                this.ex.read(iprot);
14055
              } else { 
14056
                TProtocolUtil.skip(iprot, field.type);
14057
              }
14058
              break;
14059
          }
14060
          iprot.readFieldEnd();
14061
        }
14062
      }
14063
      iprot.readStructEnd();
14064
      validate();
14065
    }
14066
 
14067
    public void write(TProtocol oprot) throws TException {
14068
      oprot.writeStructBegin(STRUCT_DESC);
14069
 
14070
      if (this.isSetSuccess()) {
14071
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14072
        oprot.writeBool(this.success);
14073
        oprot.writeFieldEnd();
14074
      } else if (this.isSetEx()) {
14075
        oprot.writeFieldBegin(EX_FIELD_DESC);
14076
        this.ex.write(oprot);
14077
        oprot.writeFieldEnd();
14078
      }
14079
      oprot.writeFieldStop();
14080
      oprot.writeStructEnd();
14081
    }
14082
 
14083
    @Override
14084
    public String toString() {
14085
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14086
      boolean first = true;
14087
 
14088
      sb.append("success:");
14089
      sb.append(this.success);
14090
      first = false;
14091
      if (!first) sb.append(", ");
14092
      sb.append("ex:");
14093
      if (this.ex == null) {
14094
        sb.append("null");
14095
      } else {
14096
        sb.append(this.ex);
14097
      }
14098
      first = false;
14099
      sb.append(")");
14100
      return sb.toString();
14101
    }
14102
 
14103
    public void validate() throws TException {
14104
      // check for required fields
14105
    }
14106
 
14107
  }
14108
 
14109
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14110
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14111
 
14112
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14113
 
14114
    private long orderId;
14115
 
14116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14117
    public enum _Fields implements TFieldIdEnum {
14118
      ORDER_ID((short)1, "orderId");
14119
 
14120
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14121
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14122
 
14123
      static {
14124
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14125
          byId.put((int)field._thriftId, field);
14126
          byName.put(field.getFieldName(), field);
14127
        }
14128
      }
14129
 
14130
      /**
14131
       * Find the _Fields constant that matches fieldId, or null if its not found.
14132
       */
14133
      public static _Fields findByThriftId(int fieldId) {
14134
        return byId.get(fieldId);
14135
      }
14136
 
14137
      /**
14138
       * Find the _Fields constant that matches fieldId, throwing an exception
14139
       * if it is not found.
14140
       */
14141
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14142
        _Fields fields = findByThriftId(fieldId);
14143
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14144
        return fields;
14145
      }
14146
 
14147
      /**
14148
       * Find the _Fields constant that matches name, or null if its not found.
14149
       */
14150
      public static _Fields findByName(String name) {
14151
        return byName.get(name);
14152
      }
14153
 
14154
      private final short _thriftId;
14155
      private final String _fieldName;
14156
 
14157
      _Fields(short thriftId, String fieldName) {
14158
        _thriftId = thriftId;
14159
        _fieldName = fieldName;
14160
      }
14161
 
14162
      public short getThriftFieldId() {
14163
        return _thriftId;
14164
      }
14165
 
14166
      public String getFieldName() {
14167
        return _fieldName;
14168
      }
14169
    }
14170
 
14171
    // isset id assignments
14172
    private static final int __ORDERID_ISSET_ID = 0;
14173
    private BitSet __isset_bit_vector = new BitSet(1);
14174
 
14175
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14176
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14177
          new FieldValueMetaData(TType.I64)));
14178
    }});
14179
 
14180
    static {
14181
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14182
    }
14183
 
14184
    public billOrder_args() {
14185
    }
14186
 
14187
    public billOrder_args(
14188
      long orderId)
14189
    {
14190
      this();
14191
      this.orderId = orderId;
14192
      setOrderIdIsSet(true);
14193
    }
14194
 
14195
    /**
14196
     * Performs a deep copy on <i>other</i>.
14197
     */
14198
    public billOrder_args(billOrder_args other) {
14199
      __isset_bit_vector.clear();
14200
      __isset_bit_vector.or(other.__isset_bit_vector);
14201
      this.orderId = other.orderId;
14202
    }
14203
 
14204
    public billOrder_args deepCopy() {
14205
      return new billOrder_args(this);
14206
    }
14207
 
14208
    @Deprecated
14209
    public billOrder_args clone() {
14210
      return new billOrder_args(this);
14211
    }
14212
 
14213
    public long getOrderId() {
14214
      return this.orderId;
14215
    }
14216
 
14217
    public billOrder_args setOrderId(long orderId) {
14218
      this.orderId = orderId;
14219
      setOrderIdIsSet(true);
14220
      return this;
14221
    }
14222
 
14223
    public void unsetOrderId() {
14224
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14225
    }
14226
 
14227
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14228
    public boolean isSetOrderId() {
14229
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14230
    }
14231
 
14232
    public void setOrderIdIsSet(boolean value) {
14233
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14234
    }
14235
 
14236
    public void setFieldValue(_Fields field, Object value) {
14237
      switch (field) {
14238
      case ORDER_ID:
14239
        if (value == null) {
14240
          unsetOrderId();
14241
        } else {
14242
          setOrderId((Long)value);
14243
        }
14244
        break;
14245
 
14246
      }
14247
    }
14248
 
14249
    public void setFieldValue(int fieldID, Object value) {
14250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14251
    }
14252
 
14253
    public Object getFieldValue(_Fields field) {
14254
      switch (field) {
14255
      case ORDER_ID:
14256
        return new Long(getOrderId());
14257
 
14258
      }
14259
      throw new IllegalStateException();
14260
    }
14261
 
14262
    public Object getFieldValue(int fieldId) {
14263
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14264
    }
14265
 
14266
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14267
    public boolean isSet(_Fields field) {
14268
      switch (field) {
14269
      case ORDER_ID:
14270
        return isSetOrderId();
14271
      }
14272
      throw new IllegalStateException();
14273
    }
14274
 
14275
    public boolean isSet(int fieldID) {
14276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14277
    }
14278
 
14279
    @Override
14280
    public boolean equals(Object that) {
14281
      if (that == null)
14282
        return false;
14283
      if (that instanceof billOrder_args)
14284
        return this.equals((billOrder_args)that);
14285
      return false;
14286
    }
14287
 
14288
    public boolean equals(billOrder_args that) {
14289
      if (that == null)
14290
        return false;
14291
 
14292
      boolean this_present_orderId = true;
14293
      boolean that_present_orderId = true;
14294
      if (this_present_orderId || that_present_orderId) {
14295
        if (!(this_present_orderId && that_present_orderId))
14296
          return false;
14297
        if (this.orderId != that.orderId)
14298
          return false;
14299
      }
14300
 
14301
      return true;
14302
    }
14303
 
14304
    @Override
14305
    public int hashCode() {
14306
      return 0;
14307
    }
14308
 
14309
    public int compareTo(billOrder_args other) {
14310
      if (!getClass().equals(other.getClass())) {
14311
        return getClass().getName().compareTo(other.getClass().getName());
14312
      }
14313
 
14314
      int lastComparison = 0;
14315
      billOrder_args typedOther = (billOrder_args)other;
14316
 
14317
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14318
      if (lastComparison != 0) {
14319
        return lastComparison;
14320
      }
14321
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14322
      if (lastComparison != 0) {
14323
        return lastComparison;
14324
      }
14325
      return 0;
14326
    }
14327
 
14328
    public void read(TProtocol iprot) throws TException {
14329
      TField field;
14330
      iprot.readStructBegin();
14331
      while (true)
14332
      {
14333
        field = iprot.readFieldBegin();
14334
        if (field.type == TType.STOP) { 
14335
          break;
14336
        }
14337
        _Fields fieldId = _Fields.findByThriftId(field.id);
14338
        if (fieldId == null) {
14339
          TProtocolUtil.skip(iprot, field.type);
14340
        } else {
14341
          switch (fieldId) {
14342
            case ORDER_ID:
14343
              if (field.type == TType.I64) {
14344
                this.orderId = iprot.readI64();
14345
                setOrderIdIsSet(true);
14346
              } else { 
14347
                TProtocolUtil.skip(iprot, field.type);
14348
              }
14349
              break;
14350
          }
14351
          iprot.readFieldEnd();
14352
        }
14353
      }
14354
      iprot.readStructEnd();
14355
      validate();
14356
    }
14357
 
14358
    public void write(TProtocol oprot) throws TException {
14359
      validate();
14360
 
14361
      oprot.writeStructBegin(STRUCT_DESC);
14362
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14363
      oprot.writeI64(this.orderId);
14364
      oprot.writeFieldEnd();
14365
      oprot.writeFieldStop();
14366
      oprot.writeStructEnd();
14367
    }
14368
 
14369
    @Override
14370
    public String toString() {
14371
      StringBuilder sb = new StringBuilder("billOrder_args(");
14372
      boolean first = true;
14373
 
14374
      sb.append("orderId:");
14375
      sb.append(this.orderId);
14376
      first = false;
14377
      sb.append(")");
14378
      return sb.toString();
14379
    }
14380
 
14381
    public void validate() throws TException {
14382
      // check for required fields
14383
    }
14384
 
14385
  }
14386
 
14387
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14388
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14389
 
14390
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14391
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14392
 
14393
    private boolean success;
14394
    private TransactionServiceException ex;
14395
 
14396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14397
    public enum _Fields implements TFieldIdEnum {
14398
      SUCCESS((short)0, "success"),
14399
      EX((short)1, "ex");
14400
 
14401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14403
 
14404
      static {
14405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14406
          byId.put((int)field._thriftId, field);
14407
          byName.put(field.getFieldName(), field);
14408
        }
14409
      }
14410
 
14411
      /**
14412
       * Find the _Fields constant that matches fieldId, or null if its not found.
14413
       */
14414
      public static _Fields findByThriftId(int fieldId) {
14415
        return byId.get(fieldId);
14416
      }
14417
 
14418
      /**
14419
       * Find the _Fields constant that matches fieldId, throwing an exception
14420
       * if it is not found.
14421
       */
14422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14423
        _Fields fields = findByThriftId(fieldId);
14424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14425
        return fields;
14426
      }
14427
 
14428
      /**
14429
       * Find the _Fields constant that matches name, or null if its not found.
14430
       */
14431
      public static _Fields findByName(String name) {
14432
        return byName.get(name);
14433
      }
14434
 
14435
      private final short _thriftId;
14436
      private final String _fieldName;
14437
 
14438
      _Fields(short thriftId, String fieldName) {
14439
        _thriftId = thriftId;
14440
        _fieldName = fieldName;
14441
      }
14442
 
14443
      public short getThriftFieldId() {
14444
        return _thriftId;
14445
      }
14446
 
14447
      public String getFieldName() {
14448
        return _fieldName;
14449
      }
14450
    }
14451
 
14452
    // isset id assignments
14453
    private static final int __SUCCESS_ISSET_ID = 0;
14454
    private BitSet __isset_bit_vector = new BitSet(1);
14455
 
14456
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14457
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14458
          new FieldValueMetaData(TType.BOOL)));
14459
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14460
          new FieldValueMetaData(TType.STRUCT)));
14461
    }});
14462
 
14463
    static {
14464
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14465
    }
14466
 
14467
    public billOrder_result() {
14468
    }
14469
 
14470
    public billOrder_result(
14471
      boolean success,
14472
      TransactionServiceException ex)
14473
    {
14474
      this();
14475
      this.success = success;
14476
      setSuccessIsSet(true);
14477
      this.ex = ex;
14478
    }
14479
 
14480
    /**
14481
     * Performs a deep copy on <i>other</i>.
14482
     */
14483
    public billOrder_result(billOrder_result other) {
14484
      __isset_bit_vector.clear();
14485
      __isset_bit_vector.or(other.__isset_bit_vector);
14486
      this.success = other.success;
14487
      if (other.isSetEx()) {
14488
        this.ex = new TransactionServiceException(other.ex);
14489
      }
14490
    }
14491
 
14492
    public billOrder_result deepCopy() {
14493
      return new billOrder_result(this);
14494
    }
14495
 
14496
    @Deprecated
14497
    public billOrder_result clone() {
14498
      return new billOrder_result(this);
14499
    }
14500
 
14501
    public boolean isSuccess() {
14502
      return this.success;
14503
    }
14504
 
14505
    public billOrder_result setSuccess(boolean success) {
14506
      this.success = success;
14507
      setSuccessIsSet(true);
14508
      return this;
14509
    }
14510
 
14511
    public void unsetSuccess() {
14512
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14513
    }
14514
 
14515
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14516
    public boolean isSetSuccess() {
14517
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14518
    }
14519
 
14520
    public void setSuccessIsSet(boolean value) {
14521
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14522
    }
14523
 
14524
    public TransactionServiceException getEx() {
14525
      return this.ex;
14526
    }
14527
 
14528
    public billOrder_result setEx(TransactionServiceException ex) {
14529
      this.ex = ex;
14530
      return this;
14531
    }
14532
 
14533
    public void unsetEx() {
14534
      this.ex = null;
14535
    }
14536
 
14537
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14538
    public boolean isSetEx() {
14539
      return this.ex != null;
14540
    }
14541
 
14542
    public void setExIsSet(boolean value) {
14543
      if (!value) {
14544
        this.ex = null;
14545
      }
14546
    }
14547
 
14548
    public void setFieldValue(_Fields field, Object value) {
14549
      switch (field) {
14550
      case SUCCESS:
14551
        if (value == null) {
14552
          unsetSuccess();
14553
        } else {
14554
          setSuccess((Boolean)value);
14555
        }
14556
        break;
14557
 
14558
      case EX:
14559
        if (value == null) {
14560
          unsetEx();
14561
        } else {
14562
          setEx((TransactionServiceException)value);
14563
        }
14564
        break;
14565
 
14566
      }
14567
    }
14568
 
14569
    public void setFieldValue(int fieldID, Object value) {
14570
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14571
    }
14572
 
14573
    public Object getFieldValue(_Fields field) {
14574
      switch (field) {
14575
      case SUCCESS:
14576
        return new Boolean(isSuccess());
14577
 
14578
      case EX:
14579
        return getEx();
14580
 
14581
      }
14582
      throw new IllegalStateException();
14583
    }
14584
 
14585
    public Object getFieldValue(int fieldId) {
14586
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14587
    }
14588
 
14589
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14590
    public boolean isSet(_Fields field) {
14591
      switch (field) {
14592
      case SUCCESS:
14593
        return isSetSuccess();
14594
      case EX:
14595
        return isSetEx();
14596
      }
14597
      throw new IllegalStateException();
14598
    }
14599
 
14600
    public boolean isSet(int fieldID) {
14601
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14602
    }
14603
 
14604
    @Override
14605
    public boolean equals(Object that) {
14606
      if (that == null)
14607
        return false;
14608
      if (that instanceof billOrder_result)
14609
        return this.equals((billOrder_result)that);
14610
      return false;
14611
    }
14612
 
14613
    public boolean equals(billOrder_result that) {
14614
      if (that == null)
14615
        return false;
14616
 
14617
      boolean this_present_success = true;
14618
      boolean that_present_success = true;
14619
      if (this_present_success || that_present_success) {
14620
        if (!(this_present_success && that_present_success))
14621
          return false;
14622
        if (this.success != that.success)
14623
          return false;
14624
      }
14625
 
14626
      boolean this_present_ex = true && this.isSetEx();
14627
      boolean that_present_ex = true && that.isSetEx();
14628
      if (this_present_ex || that_present_ex) {
14629
        if (!(this_present_ex && that_present_ex))
14630
          return false;
14631
        if (!this.ex.equals(that.ex))
14632
          return false;
14633
      }
14634
 
14635
      return true;
14636
    }
14637
 
14638
    @Override
14639
    public int hashCode() {
14640
      return 0;
14641
    }
14642
 
14643
    public int compareTo(billOrder_result other) {
14644
      if (!getClass().equals(other.getClass())) {
14645
        return getClass().getName().compareTo(other.getClass().getName());
14646
      }
14647
 
14648
      int lastComparison = 0;
14649
      billOrder_result typedOther = (billOrder_result)other;
14650
 
14651
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14652
      if (lastComparison != 0) {
14653
        return lastComparison;
14654
      }
14655
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14656
      if (lastComparison != 0) {
14657
        return lastComparison;
14658
      }
14659
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14660
      if (lastComparison != 0) {
14661
        return lastComparison;
14662
      }
14663
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14664
      if (lastComparison != 0) {
14665
        return lastComparison;
14666
      }
14667
      return 0;
14668
    }
14669
 
14670
    public void read(TProtocol iprot) throws TException {
14671
      TField field;
14672
      iprot.readStructBegin();
14673
      while (true)
14674
      {
14675
        field = iprot.readFieldBegin();
14676
        if (field.type == TType.STOP) { 
14677
          break;
14678
        }
14679
        _Fields fieldId = _Fields.findByThriftId(field.id);
14680
        if (fieldId == null) {
14681
          TProtocolUtil.skip(iprot, field.type);
14682
        } else {
14683
          switch (fieldId) {
14684
            case SUCCESS:
14685
              if (field.type == TType.BOOL) {
14686
                this.success = iprot.readBool();
14687
                setSuccessIsSet(true);
14688
              } else { 
14689
                TProtocolUtil.skip(iprot, field.type);
14690
              }
14691
              break;
14692
            case EX:
14693
              if (field.type == TType.STRUCT) {
14694
                this.ex = new TransactionServiceException();
14695
                this.ex.read(iprot);
14696
              } else { 
14697
                TProtocolUtil.skip(iprot, field.type);
14698
              }
14699
              break;
14700
          }
14701
          iprot.readFieldEnd();
14702
        }
14703
      }
14704
      iprot.readStructEnd();
14705
      validate();
14706
    }
14707
 
14708
    public void write(TProtocol oprot) throws TException {
14709
      oprot.writeStructBegin(STRUCT_DESC);
14710
 
14711
      if (this.isSetSuccess()) {
14712
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14713
        oprot.writeBool(this.success);
14714
        oprot.writeFieldEnd();
14715
      } else if (this.isSetEx()) {
14716
        oprot.writeFieldBegin(EX_FIELD_DESC);
14717
        this.ex.write(oprot);
14718
        oprot.writeFieldEnd();
14719
      }
14720
      oprot.writeFieldStop();
14721
      oprot.writeStructEnd();
14722
    }
14723
 
14724
    @Override
14725
    public String toString() {
14726
      StringBuilder sb = new StringBuilder("billOrder_result(");
14727
      boolean first = true;
14728
 
14729
      sb.append("success:");
14730
      sb.append(this.success);
14731
      first = false;
14732
      if (!first) sb.append(", ");
14733
      sb.append("ex:");
14734
      if (this.ex == null) {
14735
        sb.append("null");
14736
      } else {
14737
        sb.append(this.ex);
14738
      }
14739
      first = false;
14740
      sb.append(")");
14741
      return sb.toString();
14742
    }
14743
 
14744
    public void validate() throws TException {
14745
      // check for required fields
14746
    }
14747
 
14748
  }
14749
 
483 rajveer 14750
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
14751
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 14752
 
14753
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
14754
 
14755
    private long transactionId;
14756
 
14757
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14758
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14759
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 14760
 
14761
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14763
 
14764
      static {
14765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14766
          byId.put((int)field._thriftId, field);
14767
          byName.put(field.getFieldName(), field);
14768
        }
14769
      }
14770
 
14771
      /**
14772
       * Find the _Fields constant that matches fieldId, or null if its not found.
14773
       */
14774
      public static _Fields findByThriftId(int fieldId) {
14775
        return byId.get(fieldId);
14776
      }
14777
 
14778
      /**
14779
       * Find the _Fields constant that matches fieldId, throwing an exception
14780
       * if it is not found.
14781
       */
14782
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14783
        _Fields fields = findByThriftId(fieldId);
14784
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14785
        return fields;
14786
      }
14787
 
14788
      /**
14789
       * Find the _Fields constant that matches name, or null if its not found.
14790
       */
14791
      public static _Fields findByName(String name) {
14792
        return byName.get(name);
14793
      }
14794
 
14795
      private final short _thriftId;
14796
      private final String _fieldName;
14797
 
14798
      _Fields(short thriftId, String fieldName) {
14799
        _thriftId = thriftId;
14800
        _fieldName = fieldName;
14801
      }
14802
 
14803
      public short getThriftFieldId() {
14804
        return _thriftId;
14805
      }
14806
 
14807
      public String getFieldName() {
14808
        return _fieldName;
14809
      }
14810
    }
14811
 
14812
    // isset id assignments
14813
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 14814
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14815
 
14816
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14817
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14818
          new FieldValueMetaData(TType.I64)));
14819
    }});
14820
 
14821
    static {
483 rajveer 14822
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 14823
    }
14824
 
483 rajveer 14825
    public getOrdersForTransaction_args() {
68 ashish 14826
    }
14827
 
483 rajveer 14828
    public getOrdersForTransaction_args(
14829
      long transactionId)
68 ashish 14830
    {
14831
      this();
14832
      this.transactionId = transactionId;
14833
      setTransactionIdIsSet(true);
14834
    }
14835
 
14836
    /**
14837
     * Performs a deep copy on <i>other</i>.
14838
     */
483 rajveer 14839
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 14840
      __isset_bit_vector.clear();
14841
      __isset_bit_vector.or(other.__isset_bit_vector);
14842
      this.transactionId = other.transactionId;
14843
    }
14844
 
483 rajveer 14845
    public getOrdersForTransaction_args deepCopy() {
14846
      return new getOrdersForTransaction_args(this);
68 ashish 14847
    }
14848
 
14849
    @Deprecated
483 rajveer 14850
    public getOrdersForTransaction_args clone() {
14851
      return new getOrdersForTransaction_args(this);
68 ashish 14852
    }
14853
 
14854
    public long getTransactionId() {
14855
      return this.transactionId;
14856
    }
14857
 
483 rajveer 14858
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 14859
      this.transactionId = transactionId;
14860
      setTransactionIdIsSet(true);
14861
      return this;
14862
    }
14863
 
14864
    public void unsetTransactionId() {
14865
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
14866
    }
14867
 
14868
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
14869
    public boolean isSetTransactionId() {
14870
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
14871
    }
14872
 
14873
    public void setTransactionIdIsSet(boolean value) {
14874
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
14875
    }
14876
 
14877
    public void setFieldValue(_Fields field, Object value) {
14878
      switch (field) {
14879
      case TRANSACTION_ID:
14880
        if (value == null) {
14881
          unsetTransactionId();
14882
        } else {
14883
          setTransactionId((Long)value);
14884
        }
14885
        break;
14886
 
14887
      }
14888
    }
14889
 
14890
    public void setFieldValue(int fieldID, Object value) {
14891
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14892
    }
14893
 
14894
    public Object getFieldValue(_Fields field) {
14895
      switch (field) {
14896
      case TRANSACTION_ID:
14897
        return new Long(getTransactionId());
14898
 
14899
      }
14900
      throw new IllegalStateException();
14901
    }
14902
 
14903
    public Object getFieldValue(int fieldId) {
14904
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14905
    }
14906
 
14907
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14908
    public boolean isSet(_Fields field) {
14909
      switch (field) {
14910
      case TRANSACTION_ID:
14911
        return isSetTransactionId();
14912
      }
14913
      throw new IllegalStateException();
14914
    }
14915
 
14916
    public boolean isSet(int fieldID) {
14917
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14918
    }
14919
 
14920
    @Override
14921
    public boolean equals(Object that) {
14922
      if (that == null)
14923
        return false;
483 rajveer 14924
      if (that instanceof getOrdersForTransaction_args)
14925
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 14926
      return false;
14927
    }
14928
 
483 rajveer 14929
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 14930
      if (that == null)
14931
        return false;
14932
 
14933
      boolean this_present_transactionId = true;
14934
      boolean that_present_transactionId = true;
14935
      if (this_present_transactionId || that_present_transactionId) {
14936
        if (!(this_present_transactionId && that_present_transactionId))
14937
          return false;
14938
        if (this.transactionId != that.transactionId)
14939
          return false;
14940
      }
14941
 
14942
      return true;
14943
    }
14944
 
14945
    @Override
14946
    public int hashCode() {
14947
      return 0;
14948
    }
14949
 
483 rajveer 14950
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 14951
      if (!getClass().equals(other.getClass())) {
14952
        return getClass().getName().compareTo(other.getClass().getName());
14953
      }
14954
 
14955
      int lastComparison = 0;
483 rajveer 14956
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 14957
 
14958
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
14959
      if (lastComparison != 0) {
14960
        return lastComparison;
14961
      }
14962
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
14963
      if (lastComparison != 0) {
14964
        return lastComparison;
14965
      }
14966
      return 0;
14967
    }
14968
 
14969
    public void read(TProtocol iprot) throws TException {
14970
      TField field;
14971
      iprot.readStructBegin();
14972
      while (true)
14973
      {
14974
        field = iprot.readFieldBegin();
14975
        if (field.type == TType.STOP) { 
14976
          break;
14977
        }
14978
        _Fields fieldId = _Fields.findByThriftId(field.id);
14979
        if (fieldId == null) {
14980
          TProtocolUtil.skip(iprot, field.type);
14981
        } else {
14982
          switch (fieldId) {
14983
            case TRANSACTION_ID:
14984
              if (field.type == TType.I64) {
14985
                this.transactionId = iprot.readI64();
14986
                setTransactionIdIsSet(true);
14987
              } else { 
14988
                TProtocolUtil.skip(iprot, field.type);
14989
              }
14990
              break;
14991
          }
14992
          iprot.readFieldEnd();
14993
        }
14994
      }
14995
      iprot.readStructEnd();
14996
      validate();
14997
    }
14998
 
14999
    public void write(TProtocol oprot) throws TException {
15000
      validate();
15001
 
15002
      oprot.writeStructBegin(STRUCT_DESC);
15003
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15004
      oprot.writeI64(this.transactionId);
15005
      oprot.writeFieldEnd();
15006
      oprot.writeFieldStop();
15007
      oprot.writeStructEnd();
15008
    }
15009
 
15010
    @Override
15011
    public String toString() {
483 rajveer 15012
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15013
      boolean first = true;
15014
 
15015
      sb.append("transactionId:");
15016
      sb.append(this.transactionId);
15017
      first = false;
15018
      sb.append(")");
15019
      return sb.toString();
15020
    }
15021
 
15022
    public void validate() throws TException {
15023
      // check for required fields
15024
    }
15025
 
15026
  }
15027
 
483 rajveer 15028
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15029
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15030
 
483 rajveer 15031
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15032
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15033
 
483 rajveer 15034
    private List<Order> success;
68 ashish 15035
    private TransactionServiceException ex;
15036
 
15037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15038
    public enum _Fields implements TFieldIdEnum {
15039
      SUCCESS((short)0, "success"),
15040
      EX((short)1, "ex");
15041
 
15042
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15043
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15044
 
15045
      static {
15046
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15047
          byId.put((int)field._thriftId, field);
15048
          byName.put(field.getFieldName(), field);
15049
        }
15050
      }
15051
 
15052
      /**
15053
       * Find the _Fields constant that matches fieldId, or null if its not found.
15054
       */
15055
      public static _Fields findByThriftId(int fieldId) {
15056
        return byId.get(fieldId);
15057
      }
15058
 
15059
      /**
15060
       * Find the _Fields constant that matches fieldId, throwing an exception
15061
       * if it is not found.
15062
       */
15063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15064
        _Fields fields = findByThriftId(fieldId);
15065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15066
        return fields;
15067
      }
15068
 
15069
      /**
15070
       * Find the _Fields constant that matches name, or null if its not found.
15071
       */
15072
      public static _Fields findByName(String name) {
15073
        return byName.get(name);
15074
      }
15075
 
15076
      private final short _thriftId;
15077
      private final String _fieldName;
15078
 
15079
      _Fields(short thriftId, String fieldName) {
15080
        _thriftId = thriftId;
15081
        _fieldName = fieldName;
15082
      }
15083
 
15084
      public short getThriftFieldId() {
15085
        return _thriftId;
15086
      }
15087
 
15088
      public String getFieldName() {
15089
        return _fieldName;
15090
      }
15091
    }
15092
 
15093
    // isset id assignments
15094
 
15095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15096
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15097
          new ListMetaData(TType.LIST, 
15098
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15099
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15100
          new FieldValueMetaData(TType.STRUCT)));
15101
    }});
15102
 
15103
    static {
483 rajveer 15104
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15105
    }
15106
 
483 rajveer 15107
    public getOrdersForTransaction_result() {
68 ashish 15108
    }
15109
 
483 rajveer 15110
    public getOrdersForTransaction_result(
15111
      List<Order> success,
68 ashish 15112
      TransactionServiceException ex)
15113
    {
15114
      this();
15115
      this.success = success;
15116
      this.ex = ex;
15117
    }
15118
 
15119
    /**
15120
     * Performs a deep copy on <i>other</i>.
15121
     */
483 rajveer 15122
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15123
      if (other.isSetSuccess()) {
15124
        List<Order> __this__success = new ArrayList<Order>();
15125
        for (Order other_element : other.success) {
15126
          __this__success.add(new Order(other_element));
15127
        }
15128
        this.success = __this__success;
15129
      }
68 ashish 15130
      if (other.isSetEx()) {
15131
        this.ex = new TransactionServiceException(other.ex);
15132
      }
15133
    }
15134
 
483 rajveer 15135
    public getOrdersForTransaction_result deepCopy() {
15136
      return new getOrdersForTransaction_result(this);
68 ashish 15137
    }
15138
 
15139
    @Deprecated
483 rajveer 15140
    public getOrdersForTransaction_result clone() {
15141
      return new getOrdersForTransaction_result(this);
68 ashish 15142
    }
15143
 
483 rajveer 15144
    public int getSuccessSize() {
15145
      return (this.success == null) ? 0 : this.success.size();
15146
    }
15147
 
15148
    public java.util.Iterator<Order> getSuccessIterator() {
15149
      return (this.success == null) ? null : this.success.iterator();
15150
    }
15151
 
15152
    public void addToSuccess(Order elem) {
15153
      if (this.success == null) {
15154
        this.success = new ArrayList<Order>();
15155
      }
15156
      this.success.add(elem);
15157
    }
15158
 
15159
    public List<Order> getSuccess() {
68 ashish 15160
      return this.success;
15161
    }
15162
 
483 rajveer 15163
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15164
      this.success = success;
15165
      return this;
15166
    }
15167
 
15168
    public void unsetSuccess() {
483 rajveer 15169
      this.success = null;
68 ashish 15170
    }
15171
 
15172
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15173
    public boolean isSetSuccess() {
483 rajveer 15174
      return this.success != null;
68 ashish 15175
    }
15176
 
15177
    public void setSuccessIsSet(boolean value) {
483 rajveer 15178
      if (!value) {
15179
        this.success = null;
15180
      }
68 ashish 15181
    }
15182
 
15183
    public TransactionServiceException getEx() {
15184
      return this.ex;
15185
    }
15186
 
483 rajveer 15187
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15188
      this.ex = ex;
15189
      return this;
15190
    }
15191
 
15192
    public void unsetEx() {
15193
      this.ex = null;
15194
    }
15195
 
15196
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15197
    public boolean isSetEx() {
15198
      return this.ex != null;
15199
    }
15200
 
15201
    public void setExIsSet(boolean value) {
15202
      if (!value) {
15203
        this.ex = null;
15204
      }
15205
    }
15206
 
15207
    public void setFieldValue(_Fields field, Object value) {
15208
      switch (field) {
15209
      case SUCCESS:
15210
        if (value == null) {
15211
          unsetSuccess();
15212
        } else {
483 rajveer 15213
          setSuccess((List<Order>)value);
68 ashish 15214
        }
15215
        break;
15216
 
15217
      case EX:
15218
        if (value == null) {
15219
          unsetEx();
15220
        } else {
15221
          setEx((TransactionServiceException)value);
15222
        }
15223
        break;
15224
 
15225
      }
15226
    }
15227
 
15228
    public void setFieldValue(int fieldID, Object value) {
15229
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15230
    }
15231
 
15232
    public Object getFieldValue(_Fields field) {
15233
      switch (field) {
15234
      case SUCCESS:
483 rajveer 15235
        return getSuccess();
68 ashish 15236
 
15237
      case EX:
15238
        return getEx();
15239
 
15240
      }
15241
      throw new IllegalStateException();
15242
    }
15243
 
15244
    public Object getFieldValue(int fieldId) {
15245
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15246
    }
15247
 
15248
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15249
    public boolean isSet(_Fields field) {
15250
      switch (field) {
15251
      case SUCCESS:
15252
        return isSetSuccess();
15253
      case EX:
15254
        return isSetEx();
15255
      }
15256
      throw new IllegalStateException();
15257
    }
15258
 
15259
    public boolean isSet(int fieldID) {
15260
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15261
    }
15262
 
15263
    @Override
15264
    public boolean equals(Object that) {
15265
      if (that == null)
15266
        return false;
483 rajveer 15267
      if (that instanceof getOrdersForTransaction_result)
15268
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15269
      return false;
15270
    }
15271
 
483 rajveer 15272
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15273
      if (that == null)
15274
        return false;
15275
 
483 rajveer 15276
      boolean this_present_success = true && this.isSetSuccess();
15277
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15278
      if (this_present_success || that_present_success) {
15279
        if (!(this_present_success && that_present_success))
15280
          return false;
483 rajveer 15281
        if (!this.success.equals(that.success))
68 ashish 15282
          return false;
15283
      }
15284
 
15285
      boolean this_present_ex = true && this.isSetEx();
15286
      boolean that_present_ex = true && that.isSetEx();
15287
      if (this_present_ex || that_present_ex) {
15288
        if (!(this_present_ex && that_present_ex))
15289
          return false;
15290
        if (!this.ex.equals(that.ex))
15291
          return false;
15292
      }
15293
 
15294
      return true;
15295
    }
15296
 
15297
    @Override
15298
    public int hashCode() {
15299
      return 0;
15300
    }
15301
 
483 rajveer 15302
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15303
      if (!getClass().equals(other.getClass())) {
15304
        return getClass().getName().compareTo(other.getClass().getName());
15305
      }
15306
 
15307
      int lastComparison = 0;
483 rajveer 15308
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15309
 
15310
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15311
      if (lastComparison != 0) {
15312
        return lastComparison;
15313
      }
15314
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15315
      if (lastComparison != 0) {
15316
        return lastComparison;
15317
      }
15318
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15319
      if (lastComparison != 0) {
15320
        return lastComparison;
15321
      }
15322
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15323
      if (lastComparison != 0) {
15324
        return lastComparison;
15325
      }
15326
      return 0;
15327
    }
15328
 
15329
    public void read(TProtocol iprot) throws TException {
15330
      TField field;
15331
      iprot.readStructBegin();
15332
      while (true)
15333
      {
15334
        field = iprot.readFieldBegin();
15335
        if (field.type == TType.STOP) { 
15336
          break;
15337
        }
15338
        _Fields fieldId = _Fields.findByThriftId(field.id);
15339
        if (fieldId == null) {
15340
          TProtocolUtil.skip(iprot, field.type);
15341
        } else {
15342
          switch (fieldId) {
15343
            case SUCCESS:
483 rajveer 15344
              if (field.type == TType.LIST) {
15345
                {
1382 varun.gupt 15346
                  TList _list32 = iprot.readListBegin();
15347
                  this.success = new ArrayList<Order>(_list32.size);
15348
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15349
                  {
1382 varun.gupt 15350
                    Order _elem34;
15351
                    _elem34 = new Order();
15352
                    _elem34.read(iprot);
15353
                    this.success.add(_elem34);
483 rajveer 15354
                  }
15355
                  iprot.readListEnd();
15356
                }
68 ashish 15357
              } else { 
15358
                TProtocolUtil.skip(iprot, field.type);
15359
              }
15360
              break;
15361
            case EX:
15362
              if (field.type == TType.STRUCT) {
15363
                this.ex = new TransactionServiceException();
15364
                this.ex.read(iprot);
15365
              } else { 
15366
                TProtocolUtil.skip(iprot, field.type);
15367
              }
15368
              break;
15369
          }
15370
          iprot.readFieldEnd();
15371
        }
15372
      }
15373
      iprot.readStructEnd();
15374
      validate();
15375
    }
15376
 
15377
    public void write(TProtocol oprot) throws TException {
15378
      oprot.writeStructBegin(STRUCT_DESC);
15379
 
15380
      if (this.isSetSuccess()) {
15381
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15382
        {
15383
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15384
          for (Order _iter35 : this.success)
483 rajveer 15385
          {
1382 varun.gupt 15386
            _iter35.write(oprot);
483 rajveer 15387
          }
15388
          oprot.writeListEnd();
15389
        }
68 ashish 15390
        oprot.writeFieldEnd();
15391
      } else if (this.isSetEx()) {
15392
        oprot.writeFieldBegin(EX_FIELD_DESC);
15393
        this.ex.write(oprot);
15394
        oprot.writeFieldEnd();
15395
      }
15396
      oprot.writeFieldStop();
15397
      oprot.writeStructEnd();
15398
    }
15399
 
15400
    @Override
15401
    public String toString() {
483 rajveer 15402
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15403
      boolean first = true;
15404
 
15405
      sb.append("success:");
483 rajveer 15406
      if (this.success == null) {
15407
        sb.append("null");
15408
      } else {
15409
        sb.append(this.success);
15410
      }
68 ashish 15411
      first = false;
15412
      if (!first) sb.append(", ");
15413
      sb.append("ex:");
15414
      if (this.ex == null) {
15415
        sb.append("null");
15416
      } else {
15417
        sb.append(this.ex);
15418
      }
15419
      first = false;
15420
      sb.append(")");
15421
      return sb.toString();
15422
    }
15423
 
15424
    public void validate() throws TException {
15425
      // check for required fields
15426
    }
15427
 
15428
  }
15429
 
483 rajveer 15430
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15431
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15432
 
483 rajveer 15433
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15434
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15435
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15436
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15437
 
483 rajveer 15438
    private long customerId;
15439
    private long from_date;
15440
    private long to_date;
15441
    private OrderStatus status;
68 ashish 15442
 
15443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15444
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15445
      CUSTOMER_ID((short)1, "customerId"),
15446
      FROM_DATE((short)2, "from_date"),
15447
      TO_DATE((short)3, "to_date"),
15448
      /**
15449
       * 
15450
       * @see OrderStatus
15451
       */
15452
      STATUS((short)4, "status");
68 ashish 15453
 
15454
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15455
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15456
 
15457
      static {
15458
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15459
          byId.put((int)field._thriftId, field);
15460
          byName.put(field.getFieldName(), field);
15461
        }
15462
      }
15463
 
15464
      /**
15465
       * Find the _Fields constant that matches fieldId, or null if its not found.
15466
       */
15467
      public static _Fields findByThriftId(int fieldId) {
15468
        return byId.get(fieldId);
15469
      }
15470
 
15471
      /**
15472
       * Find the _Fields constant that matches fieldId, throwing an exception
15473
       * if it is not found.
15474
       */
15475
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15476
        _Fields fields = findByThriftId(fieldId);
15477
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15478
        return fields;
15479
      }
15480
 
15481
      /**
15482
       * Find the _Fields constant that matches name, or null if its not found.
15483
       */
15484
      public static _Fields findByName(String name) {
15485
        return byName.get(name);
15486
      }
15487
 
15488
      private final short _thriftId;
15489
      private final String _fieldName;
15490
 
15491
      _Fields(short thriftId, String fieldName) {
15492
        _thriftId = thriftId;
15493
        _fieldName = fieldName;
15494
      }
15495
 
15496
      public short getThriftFieldId() {
15497
        return _thriftId;
15498
      }
15499
 
15500
      public String getFieldName() {
15501
        return _fieldName;
15502
      }
15503
    }
15504
 
15505
    // isset id assignments
483 rajveer 15506
    private static final int __CUSTOMERID_ISSET_ID = 0;
15507
    private static final int __FROM_DATE_ISSET_ID = 1;
15508
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15509
    private BitSet __isset_bit_vector = new BitSet(3);
15510
 
15511
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15512
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15513
          new FieldValueMetaData(TType.I64)));
483 rajveer 15514
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15515
          new FieldValueMetaData(TType.I64)));
483 rajveer 15516
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15517
          new FieldValueMetaData(TType.I64)));
483 rajveer 15518
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15519
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15520
    }});
15521
 
15522
    static {
483 rajveer 15523
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15524
    }
15525
 
483 rajveer 15526
    public getOrdersForCustomer_args() {
68 ashish 15527
    }
15528
 
483 rajveer 15529
    public getOrdersForCustomer_args(
15530
      long customerId,
15531
      long from_date,
15532
      long to_date,
15533
      OrderStatus status)
68 ashish 15534
    {
15535
      this();
483 rajveer 15536
      this.customerId = customerId;
15537
      setCustomerIdIsSet(true);
15538
      this.from_date = from_date;
15539
      setFrom_dateIsSet(true);
15540
      this.to_date = to_date;
15541
      setTo_dateIsSet(true);
15542
      this.status = status;
68 ashish 15543
    }
15544
 
15545
    /**
15546
     * Performs a deep copy on <i>other</i>.
15547
     */
483 rajveer 15548
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15549
      __isset_bit_vector.clear();
15550
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15551
      this.customerId = other.customerId;
15552
      this.from_date = other.from_date;
15553
      this.to_date = other.to_date;
15554
      if (other.isSetStatus()) {
15555
        this.status = other.status;
15556
      }
68 ashish 15557
    }
15558
 
483 rajveer 15559
    public getOrdersForCustomer_args deepCopy() {
15560
      return new getOrdersForCustomer_args(this);
68 ashish 15561
    }
15562
 
15563
    @Deprecated
483 rajveer 15564
    public getOrdersForCustomer_args clone() {
15565
      return new getOrdersForCustomer_args(this);
68 ashish 15566
    }
15567
 
483 rajveer 15568
    public long getCustomerId() {
15569
      return this.customerId;
68 ashish 15570
    }
15571
 
483 rajveer 15572
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15573
      this.customerId = customerId;
15574
      setCustomerIdIsSet(true);
68 ashish 15575
      return this;
15576
    }
15577
 
483 rajveer 15578
    public void unsetCustomerId() {
15579
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15580
    }
15581
 
483 rajveer 15582
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15583
    public boolean isSetCustomerId() {
15584
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15585
    }
15586
 
483 rajveer 15587
    public void setCustomerIdIsSet(boolean value) {
15588
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15589
    }
15590
 
483 rajveer 15591
    public long getFrom_date() {
15592
      return this.from_date;
68 ashish 15593
    }
15594
 
483 rajveer 15595
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15596
      this.from_date = from_date;
15597
      setFrom_dateIsSet(true);
68 ashish 15598
      return this;
15599
    }
15600
 
483 rajveer 15601
    public void unsetFrom_date() {
15602
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15603
    }
15604
 
483 rajveer 15605
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15606
    public boolean isSetFrom_date() {
15607
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15608
    }
15609
 
483 rajveer 15610
    public void setFrom_dateIsSet(boolean value) {
15611
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15612
    }
15613
 
483 rajveer 15614
    public long getTo_date() {
15615
      return this.to_date;
68 ashish 15616
    }
15617
 
483 rajveer 15618
    public getOrdersForCustomer_args setTo_date(long to_date) {
15619
      this.to_date = to_date;
15620
      setTo_dateIsSet(true);
68 ashish 15621
      return this;
15622
    }
15623
 
483 rajveer 15624
    public void unsetTo_date() {
15625
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 15626
    }
15627
 
483 rajveer 15628
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
15629
    public boolean isSetTo_date() {
15630
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 15631
    }
15632
 
483 rajveer 15633
    public void setTo_dateIsSet(boolean value) {
15634
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 15635
    }
15636
 
483 rajveer 15637
    /**
15638
     * 
15639
     * @see OrderStatus
15640
     */
15641
    public OrderStatus getStatus() {
15642
      return this.status;
15643
    }
15644
 
15645
    /**
15646
     * 
15647
     * @see OrderStatus
15648
     */
15649
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
15650
      this.status = status;
15651
      return this;
15652
    }
15653
 
15654
    public void unsetStatus() {
15655
      this.status = null;
15656
    }
15657
 
15658
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15659
    public boolean isSetStatus() {
15660
      return this.status != null;
15661
    }
15662
 
15663
    public void setStatusIsSet(boolean value) {
15664
      if (!value) {
15665
        this.status = null;
15666
      }
15667
    }
15668
 
68 ashish 15669
    public void setFieldValue(_Fields field, Object value) {
15670
      switch (field) {
483 rajveer 15671
      case CUSTOMER_ID:
68 ashish 15672
        if (value == null) {
483 rajveer 15673
          unsetCustomerId();
68 ashish 15674
        } else {
483 rajveer 15675
          setCustomerId((Long)value);
68 ashish 15676
        }
15677
        break;
15678
 
483 rajveer 15679
      case FROM_DATE:
68 ashish 15680
        if (value == null) {
483 rajveer 15681
          unsetFrom_date();
68 ashish 15682
        } else {
483 rajveer 15683
          setFrom_date((Long)value);
68 ashish 15684
        }
15685
        break;
15686
 
483 rajveer 15687
      case TO_DATE:
68 ashish 15688
        if (value == null) {
483 rajveer 15689
          unsetTo_date();
68 ashish 15690
        } else {
483 rajveer 15691
          setTo_date((Long)value);
68 ashish 15692
        }
15693
        break;
15694
 
483 rajveer 15695
      case STATUS:
15696
        if (value == null) {
15697
          unsetStatus();
15698
        } else {
15699
          setStatus((OrderStatus)value);
15700
        }
15701
        break;
15702
 
68 ashish 15703
      }
15704
    }
15705
 
15706
    public void setFieldValue(int fieldID, Object value) {
15707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15708
    }
15709
 
15710
    public Object getFieldValue(_Fields field) {
15711
      switch (field) {
483 rajveer 15712
      case CUSTOMER_ID:
15713
        return new Long(getCustomerId());
68 ashish 15714
 
483 rajveer 15715
      case FROM_DATE:
15716
        return new Long(getFrom_date());
68 ashish 15717
 
483 rajveer 15718
      case TO_DATE:
15719
        return new Long(getTo_date());
68 ashish 15720
 
483 rajveer 15721
      case STATUS:
15722
        return getStatus();
15723
 
68 ashish 15724
      }
15725
      throw new IllegalStateException();
15726
    }
15727
 
15728
    public Object getFieldValue(int fieldId) {
15729
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15730
    }
15731
 
15732
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15733
    public boolean isSet(_Fields field) {
15734
      switch (field) {
483 rajveer 15735
      case CUSTOMER_ID:
15736
        return isSetCustomerId();
15737
      case FROM_DATE:
15738
        return isSetFrom_date();
15739
      case TO_DATE:
15740
        return isSetTo_date();
15741
      case STATUS:
15742
        return isSetStatus();
68 ashish 15743
      }
15744
      throw new IllegalStateException();
15745
    }
15746
 
15747
    public boolean isSet(int fieldID) {
15748
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15749
    }
15750
 
15751
    @Override
15752
    public boolean equals(Object that) {
15753
      if (that == null)
15754
        return false;
483 rajveer 15755
      if (that instanceof getOrdersForCustomer_args)
15756
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 15757
      return false;
15758
    }
15759
 
483 rajveer 15760
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 15761
      if (that == null)
15762
        return false;
15763
 
483 rajveer 15764
      boolean this_present_customerId = true;
15765
      boolean that_present_customerId = true;
15766
      if (this_present_customerId || that_present_customerId) {
15767
        if (!(this_present_customerId && that_present_customerId))
68 ashish 15768
          return false;
483 rajveer 15769
        if (this.customerId != that.customerId)
68 ashish 15770
          return false;
15771
      }
15772
 
483 rajveer 15773
      boolean this_present_from_date = true;
15774
      boolean that_present_from_date = true;
15775
      if (this_present_from_date || that_present_from_date) {
15776
        if (!(this_present_from_date && that_present_from_date))
68 ashish 15777
          return false;
483 rajveer 15778
        if (this.from_date != that.from_date)
68 ashish 15779
          return false;
15780
      }
15781
 
483 rajveer 15782
      boolean this_present_to_date = true;
15783
      boolean that_present_to_date = true;
15784
      if (this_present_to_date || that_present_to_date) {
15785
        if (!(this_present_to_date && that_present_to_date))
68 ashish 15786
          return false;
483 rajveer 15787
        if (this.to_date != that.to_date)
68 ashish 15788
          return false;
15789
      }
15790
 
483 rajveer 15791
      boolean this_present_status = true && this.isSetStatus();
15792
      boolean that_present_status = true && that.isSetStatus();
15793
      if (this_present_status || that_present_status) {
15794
        if (!(this_present_status && that_present_status))
15795
          return false;
15796
        if (!this.status.equals(that.status))
15797
          return false;
15798
      }
15799
 
68 ashish 15800
      return true;
15801
    }
15802
 
15803
    @Override
15804
    public int hashCode() {
15805
      return 0;
15806
    }
15807
 
483 rajveer 15808
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 15809
      if (!getClass().equals(other.getClass())) {
15810
        return getClass().getName().compareTo(other.getClass().getName());
15811
      }
15812
 
15813
      int lastComparison = 0;
483 rajveer 15814
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 15815
 
483 rajveer 15816
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 15817
      if (lastComparison != 0) {
15818
        return lastComparison;
15819
      }
483 rajveer 15820
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 15821
      if (lastComparison != 0) {
15822
        return lastComparison;
15823
      }
483 rajveer 15824
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 15825
      if (lastComparison != 0) {
15826
        return lastComparison;
15827
      }
483 rajveer 15828
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 15829
      if (lastComparison != 0) {
15830
        return lastComparison;
15831
      }
483 rajveer 15832
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 15833
      if (lastComparison != 0) {
15834
        return lastComparison;
15835
      }
483 rajveer 15836
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 15837
      if (lastComparison != 0) {
15838
        return lastComparison;
15839
      }
483 rajveer 15840
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
15841
      if (lastComparison != 0) {
15842
        return lastComparison;
15843
      }
15844
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
15845
      if (lastComparison != 0) {
15846
        return lastComparison;
15847
      }
68 ashish 15848
      return 0;
15849
    }
15850
 
15851
    public void read(TProtocol iprot) throws TException {
15852
      TField field;
15853
      iprot.readStructBegin();
15854
      while (true)
15855
      {
15856
        field = iprot.readFieldBegin();
15857
        if (field.type == TType.STOP) { 
15858
          break;
15859
        }
15860
        _Fields fieldId = _Fields.findByThriftId(field.id);
15861
        if (fieldId == null) {
15862
          TProtocolUtil.skip(iprot, field.type);
15863
        } else {
15864
          switch (fieldId) {
483 rajveer 15865
            case CUSTOMER_ID:
68 ashish 15866
              if (field.type == TType.I64) {
483 rajveer 15867
                this.customerId = iprot.readI64();
15868
                setCustomerIdIsSet(true);
68 ashish 15869
              } else { 
15870
                TProtocolUtil.skip(iprot, field.type);
15871
              }
15872
              break;
483 rajveer 15873
            case FROM_DATE:
68 ashish 15874
              if (field.type == TType.I64) {
483 rajveer 15875
                this.from_date = iprot.readI64();
15876
                setFrom_dateIsSet(true);
68 ashish 15877
              } else { 
15878
                TProtocolUtil.skip(iprot, field.type);
15879
              }
15880
              break;
483 rajveer 15881
            case TO_DATE:
68 ashish 15882
              if (field.type == TType.I64) {
483 rajveer 15883
                this.to_date = iprot.readI64();
15884
                setTo_dateIsSet(true);
68 ashish 15885
              } else { 
15886
                TProtocolUtil.skip(iprot, field.type);
15887
              }
15888
              break;
483 rajveer 15889
            case STATUS:
15890
              if (field.type == TType.I32) {
15891
                this.status = OrderStatus.findByValue(iprot.readI32());
15892
              } else { 
15893
                TProtocolUtil.skip(iprot, field.type);
15894
              }
15895
              break;
68 ashish 15896
          }
15897
          iprot.readFieldEnd();
15898
        }
15899
      }
15900
      iprot.readStructEnd();
15901
      validate();
15902
    }
15903
 
15904
    public void write(TProtocol oprot) throws TException {
15905
      validate();
15906
 
15907
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15908
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15909
      oprot.writeI64(this.customerId);
68 ashish 15910
      oprot.writeFieldEnd();
483 rajveer 15911
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
15912
      oprot.writeI64(this.from_date);
68 ashish 15913
      oprot.writeFieldEnd();
483 rajveer 15914
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
15915
      oprot.writeI64(this.to_date);
68 ashish 15916
      oprot.writeFieldEnd();
483 rajveer 15917
      if (this.status != null) {
15918
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
15919
        oprot.writeI32(this.status.getValue());
15920
        oprot.writeFieldEnd();
15921
      }
68 ashish 15922
      oprot.writeFieldStop();
15923
      oprot.writeStructEnd();
15924
    }
15925
 
15926
    @Override
15927
    public String toString() {
483 rajveer 15928
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 15929
      boolean first = true;
15930
 
483 rajveer 15931
      sb.append("customerId:");
15932
      sb.append(this.customerId);
68 ashish 15933
      first = false;
15934
      if (!first) sb.append(", ");
483 rajveer 15935
      sb.append("from_date:");
15936
      sb.append(this.from_date);
68 ashish 15937
      first = false;
15938
      if (!first) sb.append(", ");
483 rajveer 15939
      sb.append("to_date:");
15940
      sb.append(this.to_date);
68 ashish 15941
      first = false;
483 rajveer 15942
      if (!first) sb.append(", ");
15943
      sb.append("status:");
15944
      if (this.status == null) {
15945
        sb.append("null");
15946
      } else {
15947
        String status_name = status.name();
15948
        if (status_name != null) {
15949
          sb.append(status_name);
15950
          sb.append(" (");
15951
        }
15952
        sb.append(this.status);
15953
        if (status_name != null) {
15954
          sb.append(")");
15955
        }
15956
      }
15957
      first = false;
68 ashish 15958
      sb.append(")");
15959
      return sb.toString();
15960
    }
15961
 
15962
    public void validate() throws TException {
15963
      // check for required fields
15964
    }
15965
 
15966
  }
15967
 
483 rajveer 15968
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
15969
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 15970
 
483 rajveer 15971
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15972
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15973
 
483 rajveer 15974
    private List<Order> success;
68 ashish 15975
    private TransactionServiceException ex;
15976
 
15977
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15978
    public enum _Fields implements TFieldIdEnum {
15979
      SUCCESS((short)0, "success"),
15980
      EX((short)1, "ex");
15981
 
15982
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15983
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15984
 
15985
      static {
15986
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15987
          byId.put((int)field._thriftId, field);
15988
          byName.put(field.getFieldName(), field);
15989
        }
15990
      }
15991
 
15992
      /**
15993
       * Find the _Fields constant that matches fieldId, or null if its not found.
15994
       */
15995
      public static _Fields findByThriftId(int fieldId) {
15996
        return byId.get(fieldId);
15997
      }
15998
 
15999
      /**
16000
       * Find the _Fields constant that matches fieldId, throwing an exception
16001
       * if it is not found.
16002
       */
16003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16004
        _Fields fields = findByThriftId(fieldId);
16005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16006
        return fields;
16007
      }
16008
 
16009
      /**
16010
       * Find the _Fields constant that matches name, or null if its not found.
16011
       */
16012
      public static _Fields findByName(String name) {
16013
        return byName.get(name);
16014
      }
16015
 
16016
      private final short _thriftId;
16017
      private final String _fieldName;
16018
 
16019
      _Fields(short thriftId, String fieldName) {
16020
        _thriftId = thriftId;
16021
        _fieldName = fieldName;
16022
      }
16023
 
16024
      public short getThriftFieldId() {
16025
        return _thriftId;
16026
      }
16027
 
16028
      public String getFieldName() {
16029
        return _fieldName;
16030
      }
16031
    }
16032
 
16033
    // isset id assignments
16034
 
16035
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16036
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16037
          new ListMetaData(TType.LIST, 
16038
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16039
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16040
          new FieldValueMetaData(TType.STRUCT)));
16041
    }});
16042
 
16043
    static {
483 rajveer 16044
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16045
    }
16046
 
483 rajveer 16047
    public getOrdersForCustomer_result() {
68 ashish 16048
    }
16049
 
483 rajveer 16050
    public getOrdersForCustomer_result(
16051
      List<Order> success,
68 ashish 16052
      TransactionServiceException ex)
16053
    {
16054
      this();
16055
      this.success = success;
16056
      this.ex = ex;
16057
    }
16058
 
16059
    /**
16060
     * Performs a deep copy on <i>other</i>.
16061
     */
483 rajveer 16062
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16063
      if (other.isSetSuccess()) {
16064
        List<Order> __this__success = new ArrayList<Order>();
16065
        for (Order other_element : other.success) {
16066
          __this__success.add(new Order(other_element));
16067
        }
16068
        this.success = __this__success;
16069
      }
68 ashish 16070
      if (other.isSetEx()) {
16071
        this.ex = new TransactionServiceException(other.ex);
16072
      }
16073
    }
16074
 
483 rajveer 16075
    public getOrdersForCustomer_result deepCopy() {
16076
      return new getOrdersForCustomer_result(this);
68 ashish 16077
    }
16078
 
16079
    @Deprecated
483 rajveer 16080
    public getOrdersForCustomer_result clone() {
16081
      return new getOrdersForCustomer_result(this);
68 ashish 16082
    }
16083
 
483 rajveer 16084
    public int getSuccessSize() {
16085
      return (this.success == null) ? 0 : this.success.size();
16086
    }
16087
 
16088
    public java.util.Iterator<Order> getSuccessIterator() {
16089
      return (this.success == null) ? null : this.success.iterator();
16090
    }
16091
 
16092
    public void addToSuccess(Order elem) {
16093
      if (this.success == null) {
16094
        this.success = new ArrayList<Order>();
16095
      }
16096
      this.success.add(elem);
16097
    }
16098
 
16099
    public List<Order> getSuccess() {
68 ashish 16100
      return this.success;
16101
    }
16102
 
483 rajveer 16103
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16104
      this.success = success;
16105
      return this;
16106
    }
16107
 
16108
    public void unsetSuccess() {
483 rajveer 16109
      this.success = null;
68 ashish 16110
    }
16111
 
16112
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16113
    public boolean isSetSuccess() {
483 rajveer 16114
      return this.success != null;
68 ashish 16115
    }
16116
 
16117
    public void setSuccessIsSet(boolean value) {
483 rajveer 16118
      if (!value) {
16119
        this.success = null;
16120
      }
68 ashish 16121
    }
16122
 
16123
    public TransactionServiceException getEx() {
16124
      return this.ex;
16125
    }
16126
 
483 rajveer 16127
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16128
      this.ex = ex;
16129
      return this;
16130
    }
16131
 
16132
    public void unsetEx() {
16133
      this.ex = null;
16134
    }
16135
 
16136
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16137
    public boolean isSetEx() {
16138
      return this.ex != null;
16139
    }
16140
 
16141
    public void setExIsSet(boolean value) {
16142
      if (!value) {
16143
        this.ex = null;
16144
      }
16145
    }
16146
 
16147
    public void setFieldValue(_Fields field, Object value) {
16148
      switch (field) {
16149
      case SUCCESS:
16150
        if (value == null) {
16151
          unsetSuccess();
16152
        } else {
483 rajveer 16153
          setSuccess((List<Order>)value);
68 ashish 16154
        }
16155
        break;
16156
 
16157
      case EX:
16158
        if (value == null) {
16159
          unsetEx();
16160
        } else {
16161
          setEx((TransactionServiceException)value);
16162
        }
16163
        break;
16164
 
16165
      }
16166
    }
16167
 
16168
    public void setFieldValue(int fieldID, Object value) {
16169
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16170
    }
16171
 
16172
    public Object getFieldValue(_Fields field) {
16173
      switch (field) {
16174
      case SUCCESS:
483 rajveer 16175
        return getSuccess();
68 ashish 16176
 
16177
      case EX:
16178
        return getEx();
16179
 
16180
      }
16181
      throw new IllegalStateException();
16182
    }
16183
 
16184
    public Object getFieldValue(int fieldId) {
16185
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16186
    }
16187
 
16188
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16189
    public boolean isSet(_Fields field) {
16190
      switch (field) {
16191
      case SUCCESS:
16192
        return isSetSuccess();
16193
      case EX:
16194
        return isSetEx();
16195
      }
16196
      throw new IllegalStateException();
16197
    }
16198
 
16199
    public boolean isSet(int fieldID) {
16200
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16201
    }
16202
 
16203
    @Override
16204
    public boolean equals(Object that) {
16205
      if (that == null)
16206
        return false;
483 rajveer 16207
      if (that instanceof getOrdersForCustomer_result)
16208
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16209
      return false;
16210
    }
16211
 
483 rajveer 16212
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16213
      if (that == null)
16214
        return false;
16215
 
483 rajveer 16216
      boolean this_present_success = true && this.isSetSuccess();
16217
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16218
      if (this_present_success || that_present_success) {
16219
        if (!(this_present_success && that_present_success))
16220
          return false;
483 rajveer 16221
        if (!this.success.equals(that.success))
68 ashish 16222
          return false;
16223
      }
16224
 
16225
      boolean this_present_ex = true && this.isSetEx();
16226
      boolean that_present_ex = true && that.isSetEx();
16227
      if (this_present_ex || that_present_ex) {
16228
        if (!(this_present_ex && that_present_ex))
16229
          return false;
16230
        if (!this.ex.equals(that.ex))
16231
          return false;
16232
      }
16233
 
16234
      return true;
16235
    }
16236
 
16237
    @Override
16238
    public int hashCode() {
16239
      return 0;
16240
    }
16241
 
483 rajveer 16242
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16243
      if (!getClass().equals(other.getClass())) {
16244
        return getClass().getName().compareTo(other.getClass().getName());
16245
      }
16246
 
16247
      int lastComparison = 0;
483 rajveer 16248
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16249
 
16250
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16251
      if (lastComparison != 0) {
16252
        return lastComparison;
16253
      }
16254
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16255
      if (lastComparison != 0) {
16256
        return lastComparison;
16257
      }
16258
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16259
      if (lastComparison != 0) {
16260
        return lastComparison;
16261
      }
16262
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16263
      if (lastComparison != 0) {
16264
        return lastComparison;
16265
      }
16266
      return 0;
16267
    }
16268
 
16269
    public void read(TProtocol iprot) throws TException {
16270
      TField field;
16271
      iprot.readStructBegin();
16272
      while (true)
16273
      {
16274
        field = iprot.readFieldBegin();
16275
        if (field.type == TType.STOP) { 
16276
          break;
16277
        }
16278
        _Fields fieldId = _Fields.findByThriftId(field.id);
16279
        if (fieldId == null) {
16280
          TProtocolUtil.skip(iprot, field.type);
16281
        } else {
16282
          switch (fieldId) {
16283
            case SUCCESS:
483 rajveer 16284
              if (field.type == TType.LIST) {
16285
                {
1382 varun.gupt 16286
                  TList _list36 = iprot.readListBegin();
16287
                  this.success = new ArrayList<Order>(_list36.size);
16288
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16289
                  {
1382 varun.gupt 16290
                    Order _elem38;
16291
                    _elem38 = new Order();
16292
                    _elem38.read(iprot);
16293
                    this.success.add(_elem38);
483 rajveer 16294
                  }
16295
                  iprot.readListEnd();
16296
                }
68 ashish 16297
              } else { 
16298
                TProtocolUtil.skip(iprot, field.type);
16299
              }
16300
              break;
16301
            case EX:
16302
              if (field.type == TType.STRUCT) {
16303
                this.ex = new TransactionServiceException();
16304
                this.ex.read(iprot);
16305
              } else { 
16306
                TProtocolUtil.skip(iprot, field.type);
16307
              }
16308
              break;
16309
          }
16310
          iprot.readFieldEnd();
16311
        }
16312
      }
16313
      iprot.readStructEnd();
16314
      validate();
16315
    }
16316
 
16317
    public void write(TProtocol oprot) throws TException {
16318
      oprot.writeStructBegin(STRUCT_DESC);
16319
 
16320
      if (this.isSetSuccess()) {
16321
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16322
        {
16323
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16324
          for (Order _iter39 : this.success)
483 rajveer 16325
          {
1382 varun.gupt 16326
            _iter39.write(oprot);
483 rajveer 16327
          }
16328
          oprot.writeListEnd();
16329
        }
68 ashish 16330
        oprot.writeFieldEnd();
16331
      } else if (this.isSetEx()) {
16332
        oprot.writeFieldBegin(EX_FIELD_DESC);
16333
        this.ex.write(oprot);
16334
        oprot.writeFieldEnd();
16335
      }
16336
      oprot.writeFieldStop();
16337
      oprot.writeStructEnd();
16338
    }
16339
 
16340
    @Override
16341
    public String toString() {
483 rajveer 16342
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16343
      boolean first = true;
16344
 
16345
      sb.append("success:");
483 rajveer 16346
      if (this.success == null) {
16347
        sb.append("null");
16348
      } else {
16349
        sb.append(this.success);
16350
      }
68 ashish 16351
      first = false;
16352
      if (!first) sb.append(", ");
16353
      sb.append("ex:");
16354
      if (this.ex == null) {
16355
        sb.append("null");
16356
      } else {
16357
        sb.append(this.ex);
16358
      }
16359
      first = false;
16360
      sb.append(")");
16361
      return sb.toString();
16362
    }
16363
 
16364
    public void validate() throws TException {
16365
      // check for required fields
16366
    }
16367
 
16368
  }
16369
 
483 rajveer 16370
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16371
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16372
 
483 rajveer 16373
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16374
 
483 rajveer 16375
    private Order order;
68 ashish 16376
 
16377
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16378
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16379
      ORDER((short)1, "order");
68 ashish 16380
 
16381
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16382
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16383
 
16384
      static {
16385
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16386
          byId.put((int)field._thriftId, field);
16387
          byName.put(field.getFieldName(), field);
16388
        }
16389
      }
16390
 
16391
      /**
16392
       * Find the _Fields constant that matches fieldId, or null if its not found.
16393
       */
16394
      public static _Fields findByThriftId(int fieldId) {
16395
        return byId.get(fieldId);
16396
      }
16397
 
16398
      /**
16399
       * Find the _Fields constant that matches fieldId, throwing an exception
16400
       * if it is not found.
16401
       */
16402
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16403
        _Fields fields = findByThriftId(fieldId);
16404
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16405
        return fields;
16406
      }
16407
 
16408
      /**
16409
       * Find the _Fields constant that matches name, or null if its not found.
16410
       */
16411
      public static _Fields findByName(String name) {
16412
        return byName.get(name);
16413
      }
16414
 
16415
      private final short _thriftId;
16416
      private final String _fieldName;
16417
 
16418
      _Fields(short thriftId, String fieldName) {
16419
        _thriftId = thriftId;
16420
        _fieldName = fieldName;
16421
      }
16422
 
16423
      public short getThriftFieldId() {
16424
        return _thriftId;
16425
      }
16426
 
16427
      public String getFieldName() {
16428
        return _fieldName;
16429
      }
16430
    }
16431
 
16432
    // isset id assignments
16433
 
16434
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16435
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16436
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16437
    }});
16438
 
16439
    static {
483 rajveer 16440
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16441
    }
16442
 
483 rajveer 16443
    public createOrder_args() {
68 ashish 16444
    }
16445
 
483 rajveer 16446
    public createOrder_args(
16447
      Order order)
68 ashish 16448
    {
16449
      this();
483 rajveer 16450
      this.order = order;
68 ashish 16451
    }
16452
 
16453
    /**
16454
     * Performs a deep copy on <i>other</i>.
16455
     */
483 rajveer 16456
    public createOrder_args(createOrder_args other) {
16457
      if (other.isSetOrder()) {
16458
        this.order = new Order(other.order);
16459
      }
68 ashish 16460
    }
16461
 
483 rajveer 16462
    public createOrder_args deepCopy() {
16463
      return new createOrder_args(this);
68 ashish 16464
    }
16465
 
16466
    @Deprecated
483 rajveer 16467
    public createOrder_args clone() {
16468
      return new createOrder_args(this);
68 ashish 16469
    }
16470
 
483 rajveer 16471
    public Order getOrder() {
16472
      return this.order;
68 ashish 16473
    }
16474
 
483 rajveer 16475
    public createOrder_args setOrder(Order order) {
16476
      this.order = order;
68 ashish 16477
      return this;
16478
    }
16479
 
483 rajveer 16480
    public void unsetOrder() {
16481
      this.order = null;
68 ashish 16482
    }
16483
 
483 rajveer 16484
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16485
    public boolean isSetOrder() {
16486
      return this.order != null;
68 ashish 16487
    }
16488
 
483 rajveer 16489
    public void setOrderIsSet(boolean value) {
16490
      if (!value) {
16491
        this.order = null;
16492
      }
68 ashish 16493
    }
16494
 
16495
    public void setFieldValue(_Fields field, Object value) {
16496
      switch (field) {
483 rajveer 16497
      case ORDER:
68 ashish 16498
        if (value == null) {
483 rajveer 16499
          unsetOrder();
68 ashish 16500
        } else {
483 rajveer 16501
          setOrder((Order)value);
68 ashish 16502
        }
16503
        break;
16504
 
16505
      }
16506
    }
16507
 
16508
    public void setFieldValue(int fieldID, Object value) {
16509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16510
    }
16511
 
16512
    public Object getFieldValue(_Fields field) {
16513
      switch (field) {
483 rajveer 16514
      case ORDER:
16515
        return getOrder();
68 ashish 16516
 
16517
      }
16518
      throw new IllegalStateException();
16519
    }
16520
 
16521
    public Object getFieldValue(int fieldId) {
16522
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16523
    }
16524
 
16525
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16526
    public boolean isSet(_Fields field) {
16527
      switch (field) {
483 rajveer 16528
      case ORDER:
16529
        return isSetOrder();
68 ashish 16530
      }
16531
      throw new IllegalStateException();
16532
    }
16533
 
16534
    public boolean isSet(int fieldID) {
16535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16536
    }
16537
 
16538
    @Override
16539
    public boolean equals(Object that) {
16540
      if (that == null)
16541
        return false;
483 rajveer 16542
      if (that instanceof createOrder_args)
16543
        return this.equals((createOrder_args)that);
68 ashish 16544
      return false;
16545
    }
16546
 
483 rajveer 16547
    public boolean equals(createOrder_args that) {
68 ashish 16548
      if (that == null)
16549
        return false;
16550
 
483 rajveer 16551
      boolean this_present_order = true && this.isSetOrder();
16552
      boolean that_present_order = true && that.isSetOrder();
16553
      if (this_present_order || that_present_order) {
16554
        if (!(this_present_order && that_present_order))
68 ashish 16555
          return false;
483 rajveer 16556
        if (!this.order.equals(that.order))
68 ashish 16557
          return false;
16558
      }
16559
 
16560
      return true;
16561
    }
16562
 
16563
    @Override
16564
    public int hashCode() {
16565
      return 0;
16566
    }
16567
 
483 rajveer 16568
    public int compareTo(createOrder_args other) {
68 ashish 16569
      if (!getClass().equals(other.getClass())) {
16570
        return getClass().getName().compareTo(other.getClass().getName());
16571
      }
16572
 
16573
      int lastComparison = 0;
483 rajveer 16574
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16575
 
483 rajveer 16576
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16577
      if (lastComparison != 0) {
16578
        return lastComparison;
16579
      }
483 rajveer 16580
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16581
      if (lastComparison != 0) {
16582
        return lastComparison;
16583
      }
16584
      return 0;
16585
    }
16586
 
16587
    public void read(TProtocol iprot) throws TException {
16588
      TField field;
16589
      iprot.readStructBegin();
16590
      while (true)
16591
      {
16592
        field = iprot.readFieldBegin();
16593
        if (field.type == TType.STOP) { 
16594
          break;
16595
        }
16596
        _Fields fieldId = _Fields.findByThriftId(field.id);
16597
        if (fieldId == null) {
16598
          TProtocolUtil.skip(iprot, field.type);
16599
        } else {
16600
          switch (fieldId) {
483 rajveer 16601
            case ORDER:
16602
              if (field.type == TType.STRUCT) {
16603
                this.order = new Order();
16604
                this.order.read(iprot);
68 ashish 16605
              } else { 
16606
                TProtocolUtil.skip(iprot, field.type);
16607
              }
16608
              break;
16609
          }
16610
          iprot.readFieldEnd();
16611
        }
16612
      }
16613
      iprot.readStructEnd();
16614
      validate();
16615
    }
16616
 
16617
    public void write(TProtocol oprot) throws TException {
16618
      validate();
16619
 
16620
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16621
      if (this.order != null) {
16622
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
16623
        this.order.write(oprot);
16624
        oprot.writeFieldEnd();
16625
      }
68 ashish 16626
      oprot.writeFieldStop();
16627
      oprot.writeStructEnd();
16628
    }
16629
 
16630
    @Override
16631
    public String toString() {
483 rajveer 16632
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 16633
      boolean first = true;
16634
 
483 rajveer 16635
      sb.append("order:");
16636
      if (this.order == null) {
16637
        sb.append("null");
16638
      } else {
16639
        sb.append(this.order);
16640
      }
68 ashish 16641
      first = false;
16642
      sb.append(")");
16643
      return sb.toString();
16644
    }
16645
 
16646
    public void validate() throws TException {
16647
      // check for required fields
16648
    }
16649
 
16650
  }
16651
 
483 rajveer 16652
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
16653
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 16654
 
483 rajveer 16655
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 16656
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16657
 
483 rajveer 16658
    private long success;
68 ashish 16659
    private TransactionServiceException ex;
16660
 
16661
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16662
    public enum _Fields implements TFieldIdEnum {
16663
      SUCCESS((short)0, "success"),
16664
      EX((short)1, "ex");
16665
 
16666
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16667
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16668
 
16669
      static {
16670
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16671
          byId.put((int)field._thriftId, field);
16672
          byName.put(field.getFieldName(), field);
16673
        }
16674
      }
16675
 
16676
      /**
16677
       * Find the _Fields constant that matches fieldId, or null if its not found.
16678
       */
16679
      public static _Fields findByThriftId(int fieldId) {
16680
        return byId.get(fieldId);
16681
      }
16682
 
16683
      /**
16684
       * Find the _Fields constant that matches fieldId, throwing an exception
16685
       * if it is not found.
16686
       */
16687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16688
        _Fields fields = findByThriftId(fieldId);
16689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16690
        return fields;
16691
      }
16692
 
16693
      /**
16694
       * Find the _Fields constant that matches name, or null if its not found.
16695
       */
16696
      public static _Fields findByName(String name) {
16697
        return byName.get(name);
16698
      }
16699
 
16700
      private final short _thriftId;
16701
      private final String _fieldName;
16702
 
16703
      _Fields(short thriftId, String fieldName) {
16704
        _thriftId = thriftId;
16705
        _fieldName = fieldName;
16706
      }
16707
 
16708
      public short getThriftFieldId() {
16709
        return _thriftId;
16710
      }
16711
 
16712
      public String getFieldName() {
16713
        return _fieldName;
16714
      }
16715
    }
16716
 
16717
    // isset id assignments
16718
    private static final int __SUCCESS_ISSET_ID = 0;
16719
    private BitSet __isset_bit_vector = new BitSet(1);
16720
 
16721
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16722
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16723
          new FieldValueMetaData(TType.I64)));
68 ashish 16724
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16725
          new FieldValueMetaData(TType.STRUCT)));
16726
    }});
16727
 
16728
    static {
483 rajveer 16729
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 16730
    }
16731
 
483 rajveer 16732
    public createOrder_result() {
68 ashish 16733
    }
16734
 
483 rajveer 16735
    public createOrder_result(
16736
      long success,
68 ashish 16737
      TransactionServiceException ex)
16738
    {
16739
      this();
16740
      this.success = success;
16741
      setSuccessIsSet(true);
16742
      this.ex = ex;
16743
    }
16744
 
16745
    /**
16746
     * Performs a deep copy on <i>other</i>.
16747
     */
483 rajveer 16748
    public createOrder_result(createOrder_result other) {
68 ashish 16749
      __isset_bit_vector.clear();
16750
      __isset_bit_vector.or(other.__isset_bit_vector);
16751
      this.success = other.success;
16752
      if (other.isSetEx()) {
16753
        this.ex = new TransactionServiceException(other.ex);
16754
      }
16755
    }
16756
 
483 rajveer 16757
    public createOrder_result deepCopy() {
16758
      return new createOrder_result(this);
68 ashish 16759
    }
16760
 
16761
    @Deprecated
483 rajveer 16762
    public createOrder_result clone() {
16763
      return new createOrder_result(this);
68 ashish 16764
    }
16765
 
483 rajveer 16766
    public long getSuccess() {
68 ashish 16767
      return this.success;
16768
    }
16769
 
483 rajveer 16770
    public createOrder_result setSuccess(long success) {
68 ashish 16771
      this.success = success;
16772
      setSuccessIsSet(true);
16773
      return this;
16774
    }
16775
 
16776
    public void unsetSuccess() {
16777
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16778
    }
16779
 
16780
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16781
    public boolean isSetSuccess() {
16782
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16783
    }
16784
 
16785
    public void setSuccessIsSet(boolean value) {
16786
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16787
    }
16788
 
16789
    public TransactionServiceException getEx() {
16790
      return this.ex;
16791
    }
16792
 
483 rajveer 16793
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 16794
      this.ex = ex;
16795
      return this;
16796
    }
16797
 
16798
    public void unsetEx() {
16799
      this.ex = null;
16800
    }
16801
 
16802
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16803
    public boolean isSetEx() {
16804
      return this.ex != null;
16805
    }
16806
 
16807
    public void setExIsSet(boolean value) {
16808
      if (!value) {
16809
        this.ex = null;
16810
      }
16811
    }
16812
 
16813
    public void setFieldValue(_Fields field, Object value) {
16814
      switch (field) {
16815
      case SUCCESS:
16816
        if (value == null) {
16817
          unsetSuccess();
16818
        } else {
483 rajveer 16819
          setSuccess((Long)value);
68 ashish 16820
        }
16821
        break;
16822
 
16823
      case EX:
16824
        if (value == null) {
16825
          unsetEx();
16826
        } else {
16827
          setEx((TransactionServiceException)value);
16828
        }
16829
        break;
16830
 
16831
      }
16832
    }
16833
 
16834
    public void setFieldValue(int fieldID, Object value) {
16835
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16836
    }
16837
 
16838
    public Object getFieldValue(_Fields field) {
16839
      switch (field) {
16840
      case SUCCESS:
483 rajveer 16841
        return new Long(getSuccess());
68 ashish 16842
 
16843
      case EX:
16844
        return getEx();
16845
 
16846
      }
16847
      throw new IllegalStateException();
16848
    }
16849
 
16850
    public Object getFieldValue(int fieldId) {
16851
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16852
    }
16853
 
16854
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16855
    public boolean isSet(_Fields field) {
16856
      switch (field) {
16857
      case SUCCESS:
16858
        return isSetSuccess();
16859
      case EX:
16860
        return isSetEx();
16861
      }
16862
      throw new IllegalStateException();
16863
    }
16864
 
16865
    public boolean isSet(int fieldID) {
16866
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16867
    }
16868
 
16869
    @Override
16870
    public boolean equals(Object that) {
16871
      if (that == null)
16872
        return false;
483 rajveer 16873
      if (that instanceof createOrder_result)
16874
        return this.equals((createOrder_result)that);
68 ashish 16875
      return false;
16876
    }
16877
 
483 rajveer 16878
    public boolean equals(createOrder_result that) {
68 ashish 16879
      if (that == null)
16880
        return false;
16881
 
16882
      boolean this_present_success = true;
16883
      boolean that_present_success = true;
16884
      if (this_present_success || that_present_success) {
16885
        if (!(this_present_success && that_present_success))
16886
          return false;
16887
        if (this.success != that.success)
16888
          return false;
16889
      }
16890
 
16891
      boolean this_present_ex = true && this.isSetEx();
16892
      boolean that_present_ex = true && that.isSetEx();
16893
      if (this_present_ex || that_present_ex) {
16894
        if (!(this_present_ex && that_present_ex))
16895
          return false;
16896
        if (!this.ex.equals(that.ex))
16897
          return false;
16898
      }
16899
 
16900
      return true;
16901
    }
16902
 
16903
    @Override
16904
    public int hashCode() {
16905
      return 0;
16906
    }
16907
 
483 rajveer 16908
    public int compareTo(createOrder_result other) {
68 ashish 16909
      if (!getClass().equals(other.getClass())) {
16910
        return getClass().getName().compareTo(other.getClass().getName());
16911
      }
16912
 
16913
      int lastComparison = 0;
483 rajveer 16914
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 16915
 
16916
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16917
      if (lastComparison != 0) {
16918
        return lastComparison;
16919
      }
16920
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16921
      if (lastComparison != 0) {
16922
        return lastComparison;
16923
      }
16924
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16925
      if (lastComparison != 0) {
16926
        return lastComparison;
16927
      }
16928
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16929
      if (lastComparison != 0) {
16930
        return lastComparison;
16931
      }
16932
      return 0;
16933
    }
16934
 
16935
    public void read(TProtocol iprot) throws TException {
16936
      TField field;
16937
      iprot.readStructBegin();
16938
      while (true)
16939
      {
16940
        field = iprot.readFieldBegin();
16941
        if (field.type == TType.STOP) { 
16942
          break;
16943
        }
16944
        _Fields fieldId = _Fields.findByThriftId(field.id);
16945
        if (fieldId == null) {
16946
          TProtocolUtil.skip(iprot, field.type);
16947
        } else {
16948
          switch (fieldId) {
16949
            case SUCCESS:
483 rajveer 16950
              if (field.type == TType.I64) {
16951
                this.success = iprot.readI64();
68 ashish 16952
                setSuccessIsSet(true);
16953
              } else { 
16954
                TProtocolUtil.skip(iprot, field.type);
16955
              }
16956
              break;
16957
            case EX:
16958
              if (field.type == TType.STRUCT) {
16959
                this.ex = new TransactionServiceException();
16960
                this.ex.read(iprot);
16961
              } else { 
16962
                TProtocolUtil.skip(iprot, field.type);
16963
              }
16964
              break;
16965
          }
16966
          iprot.readFieldEnd();
16967
        }
16968
      }
16969
      iprot.readStructEnd();
16970
      validate();
16971
    }
16972
 
16973
    public void write(TProtocol oprot) throws TException {
16974
      oprot.writeStructBegin(STRUCT_DESC);
16975
 
16976
      if (this.isSetSuccess()) {
16977
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16978
        oprot.writeI64(this.success);
68 ashish 16979
        oprot.writeFieldEnd();
16980
      } else if (this.isSetEx()) {
16981
        oprot.writeFieldBegin(EX_FIELD_DESC);
16982
        this.ex.write(oprot);
16983
        oprot.writeFieldEnd();
16984
      }
16985
      oprot.writeFieldStop();
16986
      oprot.writeStructEnd();
16987
    }
16988
 
16989
    @Override
16990
    public String toString() {
483 rajveer 16991
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 16992
      boolean first = true;
16993
 
16994
      sb.append("success:");
16995
      sb.append(this.success);
16996
      first = false;
16997
      if (!first) sb.append(", ");
16998
      sb.append("ex:");
16999
      if (this.ex == null) {
17000
        sb.append("null");
17001
      } else {
17002
        sb.append(this.ex);
17003
      }
17004
      first = false;
17005
      sb.append(")");
17006
      return sb.toString();
17007
    }
17008
 
17009
    public void validate() throws TException {
17010
      // check for required fields
17011
    }
17012
 
17013
  }
17014
 
483 rajveer 17015
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17016
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17017
 
483 rajveer 17018
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17019
 
483 rajveer 17020
    private long id;
68 ashish 17021
 
17022
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17023
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17024
      ID((short)1, "id");
68 ashish 17025
 
17026
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17028
 
17029
      static {
17030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17031
          byId.put((int)field._thriftId, field);
17032
          byName.put(field.getFieldName(), field);
17033
        }
17034
      }
17035
 
17036
      /**
17037
       * Find the _Fields constant that matches fieldId, or null if its not found.
17038
       */
17039
      public static _Fields findByThriftId(int fieldId) {
17040
        return byId.get(fieldId);
17041
      }
17042
 
17043
      /**
17044
       * Find the _Fields constant that matches fieldId, throwing an exception
17045
       * if it is not found.
17046
       */
17047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17048
        _Fields fields = findByThriftId(fieldId);
17049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17050
        return fields;
17051
      }
17052
 
17053
      /**
17054
       * Find the _Fields constant that matches name, or null if its not found.
17055
       */
17056
      public static _Fields findByName(String name) {
17057
        return byName.get(name);
17058
      }
17059
 
17060
      private final short _thriftId;
17061
      private final String _fieldName;
17062
 
17063
      _Fields(short thriftId, String fieldName) {
17064
        _thriftId = thriftId;
17065
        _fieldName = fieldName;
17066
      }
17067
 
17068
      public short getThriftFieldId() {
17069
        return _thriftId;
17070
      }
17071
 
17072
      public String getFieldName() {
17073
        return _fieldName;
17074
      }
17075
    }
17076
 
17077
    // isset id assignments
483 rajveer 17078
    private static final int __ID_ISSET_ID = 0;
17079
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17080
 
17081
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17082
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17083
          new FieldValueMetaData(TType.I64)));
17084
    }});
17085
 
17086
    static {
483 rajveer 17087
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17088
    }
17089
 
483 rajveer 17090
    public getOrder_args() {
68 ashish 17091
    }
17092
 
483 rajveer 17093
    public getOrder_args(
17094
      long id)
68 ashish 17095
    {
17096
      this();
483 rajveer 17097
      this.id = id;
17098
      setIdIsSet(true);
68 ashish 17099
    }
17100
 
17101
    /**
17102
     * Performs a deep copy on <i>other</i>.
17103
     */
483 rajveer 17104
    public getOrder_args(getOrder_args other) {
68 ashish 17105
      __isset_bit_vector.clear();
17106
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17107
      this.id = other.id;
68 ashish 17108
    }
17109
 
483 rajveer 17110
    public getOrder_args deepCopy() {
17111
      return new getOrder_args(this);
68 ashish 17112
    }
17113
 
17114
    @Deprecated
483 rajveer 17115
    public getOrder_args clone() {
17116
      return new getOrder_args(this);
68 ashish 17117
    }
17118
 
483 rajveer 17119
    public long getId() {
17120
      return this.id;
68 ashish 17121
    }
17122
 
483 rajveer 17123
    public getOrder_args setId(long id) {
17124
      this.id = id;
17125
      setIdIsSet(true);
68 ashish 17126
      return this;
17127
    }
17128
 
483 rajveer 17129
    public void unsetId() {
17130
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17131
    }
17132
 
483 rajveer 17133
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17134
    public boolean isSetId() {
17135
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17136
    }
17137
 
483 rajveer 17138
    public void setIdIsSet(boolean value) {
17139
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17140
    }
17141
 
17142
    public void setFieldValue(_Fields field, Object value) {
17143
      switch (field) {
483 rajveer 17144
      case ID:
68 ashish 17145
        if (value == null) {
483 rajveer 17146
          unsetId();
68 ashish 17147
        } else {
483 rajveer 17148
          setId((Long)value);
68 ashish 17149
        }
17150
        break;
17151
 
17152
      }
17153
    }
17154
 
17155
    public void setFieldValue(int fieldID, Object value) {
17156
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17157
    }
17158
 
17159
    public Object getFieldValue(_Fields field) {
17160
      switch (field) {
483 rajveer 17161
      case ID:
17162
        return new Long(getId());
68 ashish 17163
 
17164
      }
17165
      throw new IllegalStateException();
17166
    }
17167
 
17168
    public Object getFieldValue(int fieldId) {
17169
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17170
    }
17171
 
17172
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17173
    public boolean isSet(_Fields field) {
17174
      switch (field) {
483 rajveer 17175
      case ID:
17176
        return isSetId();
68 ashish 17177
      }
17178
      throw new IllegalStateException();
17179
    }
17180
 
17181
    public boolean isSet(int fieldID) {
17182
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17183
    }
17184
 
17185
    @Override
17186
    public boolean equals(Object that) {
17187
      if (that == null)
17188
        return false;
483 rajveer 17189
      if (that instanceof getOrder_args)
17190
        return this.equals((getOrder_args)that);
68 ashish 17191
      return false;
17192
    }
17193
 
483 rajveer 17194
    public boolean equals(getOrder_args that) {
68 ashish 17195
      if (that == null)
17196
        return false;
17197
 
483 rajveer 17198
      boolean this_present_id = true;
17199
      boolean that_present_id = true;
17200
      if (this_present_id || that_present_id) {
17201
        if (!(this_present_id && that_present_id))
68 ashish 17202
          return false;
483 rajveer 17203
        if (this.id != that.id)
68 ashish 17204
          return false;
17205
      }
17206
 
17207
      return true;
17208
    }
17209
 
17210
    @Override
17211
    public int hashCode() {
17212
      return 0;
17213
    }
17214
 
483 rajveer 17215
    public int compareTo(getOrder_args other) {
68 ashish 17216
      if (!getClass().equals(other.getClass())) {
17217
        return getClass().getName().compareTo(other.getClass().getName());
17218
      }
17219
 
17220
      int lastComparison = 0;
483 rajveer 17221
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17222
 
483 rajveer 17223
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17224
      if (lastComparison != 0) {
17225
        return lastComparison;
17226
      }
483 rajveer 17227
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17228
      if (lastComparison != 0) {
17229
        return lastComparison;
17230
      }
17231
      return 0;
17232
    }
17233
 
17234
    public void read(TProtocol iprot) throws TException {
17235
      TField field;
17236
      iprot.readStructBegin();
17237
      while (true)
17238
      {
17239
        field = iprot.readFieldBegin();
17240
        if (field.type == TType.STOP) { 
17241
          break;
17242
        }
17243
        _Fields fieldId = _Fields.findByThriftId(field.id);
17244
        if (fieldId == null) {
17245
          TProtocolUtil.skip(iprot, field.type);
17246
        } else {
17247
          switch (fieldId) {
483 rajveer 17248
            case ID:
68 ashish 17249
              if (field.type == TType.I64) {
483 rajveer 17250
                this.id = iprot.readI64();
17251
                setIdIsSet(true);
68 ashish 17252
              } else { 
17253
                TProtocolUtil.skip(iprot, field.type);
17254
              }
17255
              break;
17256
          }
17257
          iprot.readFieldEnd();
17258
        }
17259
      }
17260
      iprot.readStructEnd();
17261
      validate();
17262
    }
17263
 
17264
    public void write(TProtocol oprot) throws TException {
17265
      validate();
17266
 
17267
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17268
      oprot.writeFieldBegin(ID_FIELD_DESC);
17269
      oprot.writeI64(this.id);
68 ashish 17270
      oprot.writeFieldEnd();
17271
      oprot.writeFieldStop();
17272
      oprot.writeStructEnd();
17273
    }
17274
 
17275
    @Override
17276
    public String toString() {
483 rajveer 17277
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17278
      boolean first = true;
17279
 
483 rajveer 17280
      sb.append("id:");
17281
      sb.append(this.id);
68 ashish 17282
      first = false;
17283
      sb.append(")");
17284
      return sb.toString();
17285
    }
17286
 
17287
    public void validate() throws TException {
17288
      // check for required fields
17289
    }
17290
 
17291
  }
17292
 
483 rajveer 17293
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17294
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17295
 
483 rajveer 17296
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17297
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17298
 
483 rajveer 17299
    private Order success;
68 ashish 17300
    private TransactionServiceException ex;
17301
 
17302
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17303
    public enum _Fields implements TFieldIdEnum {
17304
      SUCCESS((short)0, "success"),
17305
      EX((short)1, "ex");
17306
 
17307
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17308
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17309
 
17310
      static {
17311
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17312
          byId.put((int)field._thriftId, field);
17313
          byName.put(field.getFieldName(), field);
17314
        }
17315
      }
17316
 
17317
      /**
17318
       * Find the _Fields constant that matches fieldId, or null if its not found.
17319
       */
17320
      public static _Fields findByThriftId(int fieldId) {
17321
        return byId.get(fieldId);
17322
      }
17323
 
17324
      /**
17325
       * Find the _Fields constant that matches fieldId, throwing an exception
17326
       * if it is not found.
17327
       */
17328
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17329
        _Fields fields = findByThriftId(fieldId);
17330
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17331
        return fields;
17332
      }
17333
 
17334
      /**
17335
       * Find the _Fields constant that matches name, or null if its not found.
17336
       */
17337
      public static _Fields findByName(String name) {
17338
        return byName.get(name);
17339
      }
17340
 
17341
      private final short _thriftId;
17342
      private final String _fieldName;
17343
 
17344
      _Fields(short thriftId, String fieldName) {
17345
        _thriftId = thriftId;
17346
        _fieldName = fieldName;
17347
      }
17348
 
17349
      public short getThriftFieldId() {
17350
        return _thriftId;
17351
      }
17352
 
17353
      public String getFieldName() {
17354
        return _fieldName;
17355
      }
17356
    }
17357
 
17358
    // isset id assignments
17359
 
17360
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17361
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17362
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17363
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17364
          new FieldValueMetaData(TType.STRUCT)));
17365
    }});
17366
 
17367
    static {
483 rajveer 17368
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17369
    }
17370
 
483 rajveer 17371
    public getOrder_result() {
68 ashish 17372
    }
17373
 
483 rajveer 17374
    public getOrder_result(
17375
      Order success,
68 ashish 17376
      TransactionServiceException ex)
17377
    {
17378
      this();
17379
      this.success = success;
17380
      this.ex = ex;
17381
    }
17382
 
17383
    /**
17384
     * Performs a deep copy on <i>other</i>.
17385
     */
483 rajveer 17386
    public getOrder_result(getOrder_result other) {
17387
      if (other.isSetSuccess()) {
17388
        this.success = new Order(other.success);
17389
      }
68 ashish 17390
      if (other.isSetEx()) {
17391
        this.ex = new TransactionServiceException(other.ex);
17392
      }
17393
    }
17394
 
483 rajveer 17395
    public getOrder_result deepCopy() {
17396
      return new getOrder_result(this);
68 ashish 17397
    }
17398
 
17399
    @Deprecated
483 rajveer 17400
    public getOrder_result clone() {
17401
      return new getOrder_result(this);
68 ashish 17402
    }
17403
 
483 rajveer 17404
    public Order getSuccess() {
68 ashish 17405
      return this.success;
17406
    }
17407
 
483 rajveer 17408
    public getOrder_result setSuccess(Order success) {
68 ashish 17409
      this.success = success;
17410
      return this;
17411
    }
17412
 
17413
    public void unsetSuccess() {
483 rajveer 17414
      this.success = null;
68 ashish 17415
    }
17416
 
17417
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17418
    public boolean isSetSuccess() {
483 rajveer 17419
      return this.success != null;
68 ashish 17420
    }
17421
 
17422
    public void setSuccessIsSet(boolean value) {
483 rajveer 17423
      if (!value) {
17424
        this.success = null;
17425
      }
68 ashish 17426
    }
17427
 
17428
    public TransactionServiceException getEx() {
17429
      return this.ex;
17430
    }
17431
 
483 rajveer 17432
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17433
      this.ex = ex;
17434
      return this;
17435
    }
17436
 
17437
    public void unsetEx() {
17438
      this.ex = null;
17439
    }
17440
 
17441
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17442
    public boolean isSetEx() {
17443
      return this.ex != null;
17444
    }
17445
 
17446
    public void setExIsSet(boolean value) {
17447
      if (!value) {
17448
        this.ex = null;
17449
      }
17450
    }
17451
 
17452
    public void setFieldValue(_Fields field, Object value) {
17453
      switch (field) {
17454
      case SUCCESS:
17455
        if (value == null) {
17456
          unsetSuccess();
17457
        } else {
483 rajveer 17458
          setSuccess((Order)value);
68 ashish 17459
        }
17460
        break;
17461
 
17462
      case EX:
17463
        if (value == null) {
17464
          unsetEx();
17465
        } else {
17466
          setEx((TransactionServiceException)value);
17467
        }
17468
        break;
17469
 
17470
      }
17471
    }
17472
 
17473
    public void setFieldValue(int fieldID, Object value) {
17474
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17475
    }
17476
 
17477
    public Object getFieldValue(_Fields field) {
17478
      switch (field) {
17479
      case SUCCESS:
483 rajveer 17480
        return getSuccess();
68 ashish 17481
 
17482
      case EX:
17483
        return getEx();
17484
 
17485
      }
17486
      throw new IllegalStateException();
17487
    }
17488
 
17489
    public Object getFieldValue(int fieldId) {
17490
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17491
    }
17492
 
17493
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17494
    public boolean isSet(_Fields field) {
17495
      switch (field) {
17496
      case SUCCESS:
17497
        return isSetSuccess();
17498
      case EX:
17499
        return isSetEx();
17500
      }
17501
      throw new IllegalStateException();
17502
    }
17503
 
17504
    public boolean isSet(int fieldID) {
17505
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17506
    }
17507
 
17508
    @Override
17509
    public boolean equals(Object that) {
17510
      if (that == null)
17511
        return false;
483 rajveer 17512
      if (that instanceof getOrder_result)
17513
        return this.equals((getOrder_result)that);
68 ashish 17514
      return false;
17515
    }
17516
 
483 rajveer 17517
    public boolean equals(getOrder_result that) {
68 ashish 17518
      if (that == null)
17519
        return false;
17520
 
483 rajveer 17521
      boolean this_present_success = true && this.isSetSuccess();
17522
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17523
      if (this_present_success || that_present_success) {
17524
        if (!(this_present_success && that_present_success))
17525
          return false;
483 rajveer 17526
        if (!this.success.equals(that.success))
68 ashish 17527
          return false;
17528
      }
17529
 
17530
      boolean this_present_ex = true && this.isSetEx();
17531
      boolean that_present_ex = true && that.isSetEx();
17532
      if (this_present_ex || that_present_ex) {
17533
        if (!(this_present_ex && that_present_ex))
17534
          return false;
17535
        if (!this.ex.equals(that.ex))
17536
          return false;
17537
      }
17538
 
17539
      return true;
17540
    }
17541
 
17542
    @Override
17543
    public int hashCode() {
17544
      return 0;
17545
    }
17546
 
483 rajveer 17547
    public int compareTo(getOrder_result other) {
68 ashish 17548
      if (!getClass().equals(other.getClass())) {
17549
        return getClass().getName().compareTo(other.getClass().getName());
17550
      }
17551
 
17552
      int lastComparison = 0;
483 rajveer 17553
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17554
 
17555
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17556
      if (lastComparison != 0) {
17557
        return lastComparison;
17558
      }
17559
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17560
      if (lastComparison != 0) {
17561
        return lastComparison;
17562
      }
17563
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17564
      if (lastComparison != 0) {
17565
        return lastComparison;
17566
      }
17567
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17568
      if (lastComparison != 0) {
17569
        return lastComparison;
17570
      }
17571
      return 0;
17572
    }
17573
 
17574
    public void read(TProtocol iprot) throws TException {
17575
      TField field;
17576
      iprot.readStructBegin();
17577
      while (true)
17578
      {
17579
        field = iprot.readFieldBegin();
17580
        if (field.type == TType.STOP) { 
17581
          break;
17582
        }
17583
        _Fields fieldId = _Fields.findByThriftId(field.id);
17584
        if (fieldId == null) {
17585
          TProtocolUtil.skip(iprot, field.type);
17586
        } else {
17587
          switch (fieldId) {
17588
            case SUCCESS:
483 rajveer 17589
              if (field.type == TType.STRUCT) {
17590
                this.success = new Order();
17591
                this.success.read(iprot);
68 ashish 17592
              } else { 
17593
                TProtocolUtil.skip(iprot, field.type);
17594
              }
17595
              break;
17596
            case EX:
17597
              if (field.type == TType.STRUCT) {
17598
                this.ex = new TransactionServiceException();
17599
                this.ex.read(iprot);
17600
              } else { 
17601
                TProtocolUtil.skip(iprot, field.type);
17602
              }
17603
              break;
17604
          }
17605
          iprot.readFieldEnd();
17606
        }
17607
      }
17608
      iprot.readStructEnd();
17609
      validate();
17610
    }
17611
 
17612
    public void write(TProtocol oprot) throws TException {
17613
      oprot.writeStructBegin(STRUCT_DESC);
17614
 
17615
      if (this.isSetSuccess()) {
17616
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17617
        this.success.write(oprot);
68 ashish 17618
        oprot.writeFieldEnd();
17619
      } else if (this.isSetEx()) {
17620
        oprot.writeFieldBegin(EX_FIELD_DESC);
17621
        this.ex.write(oprot);
17622
        oprot.writeFieldEnd();
17623
      }
17624
      oprot.writeFieldStop();
17625
      oprot.writeStructEnd();
17626
    }
17627
 
17628
    @Override
17629
    public String toString() {
483 rajveer 17630
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 17631
      boolean first = true;
17632
 
17633
      sb.append("success:");
483 rajveer 17634
      if (this.success == null) {
17635
        sb.append("null");
17636
      } else {
17637
        sb.append(this.success);
17638
      }
68 ashish 17639
      first = false;
17640
      if (!first) sb.append(", ");
17641
      sb.append("ex:");
17642
      if (this.ex == null) {
17643
        sb.append("null");
17644
      } else {
17645
        sb.append(this.ex);
17646
      }
17647
      first = false;
17648
      sb.append(")");
17649
      return sb.toString();
17650
    }
17651
 
17652
    public void validate() throws TException {
17653
      // check for required fields
17654
    }
17655
 
17656
  }
17657
 
483 rajveer 17658
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
17659
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 17660
 
483 rajveer 17661
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 17662
 
483 rajveer 17663
    private long orderId;
68 ashish 17664
 
17665
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17666
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17667
      ORDER_ID((short)1, "orderId");
68 ashish 17668
 
17669
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17670
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17671
 
17672
      static {
17673
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17674
          byId.put((int)field._thriftId, field);
17675
          byName.put(field.getFieldName(), field);
17676
        }
17677
      }
17678
 
17679
      /**
17680
       * Find the _Fields constant that matches fieldId, or null if its not found.
17681
       */
17682
      public static _Fields findByThriftId(int fieldId) {
17683
        return byId.get(fieldId);
17684
      }
17685
 
17686
      /**
17687
       * Find the _Fields constant that matches fieldId, throwing an exception
17688
       * if it is not found.
17689
       */
17690
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17691
        _Fields fields = findByThriftId(fieldId);
17692
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17693
        return fields;
17694
      }
17695
 
17696
      /**
17697
       * Find the _Fields constant that matches name, or null if its not found.
17698
       */
17699
      public static _Fields findByName(String name) {
17700
        return byName.get(name);
17701
      }
17702
 
17703
      private final short _thriftId;
17704
      private final String _fieldName;
17705
 
17706
      _Fields(short thriftId, String fieldName) {
17707
        _thriftId = thriftId;
17708
        _fieldName = fieldName;
17709
      }
17710
 
17711
      public short getThriftFieldId() {
17712
        return _thriftId;
17713
      }
17714
 
17715
      public String getFieldName() {
17716
        return _fieldName;
17717
      }
17718
    }
17719
 
17720
    // isset id assignments
483 rajveer 17721
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 17722
    private BitSet __isset_bit_vector = new BitSet(1);
17723
 
17724
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17725
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 17726
          new FieldValueMetaData(TType.I64)));
17727
    }});
17728
 
17729
    static {
483 rajveer 17730
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 17731
    }
17732
 
483 rajveer 17733
    public getLineItemsForOrder_args() {
68 ashish 17734
    }
17735
 
483 rajveer 17736
    public getLineItemsForOrder_args(
17737
      long orderId)
68 ashish 17738
    {
17739
      this();
483 rajveer 17740
      this.orderId = orderId;
17741
      setOrderIdIsSet(true);
68 ashish 17742
    }
17743
 
17744
    /**
17745
     * Performs a deep copy on <i>other</i>.
17746
     */
483 rajveer 17747
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 17748
      __isset_bit_vector.clear();
17749
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17750
      this.orderId = other.orderId;
68 ashish 17751
    }
17752
 
483 rajveer 17753
    public getLineItemsForOrder_args deepCopy() {
17754
      return new getLineItemsForOrder_args(this);
68 ashish 17755
    }
17756
 
17757
    @Deprecated
483 rajveer 17758
    public getLineItemsForOrder_args clone() {
17759
      return new getLineItemsForOrder_args(this);
68 ashish 17760
    }
17761
 
483 rajveer 17762
    public long getOrderId() {
17763
      return this.orderId;
68 ashish 17764
    }
17765
 
483 rajveer 17766
    public getLineItemsForOrder_args setOrderId(long orderId) {
17767
      this.orderId = orderId;
17768
      setOrderIdIsSet(true);
68 ashish 17769
      return this;
17770
    }
17771
 
483 rajveer 17772
    public void unsetOrderId() {
17773
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 17774
    }
17775
 
483 rajveer 17776
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17777
    public boolean isSetOrderId() {
17778
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 17779
    }
17780
 
483 rajveer 17781
    public void setOrderIdIsSet(boolean value) {
17782
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 17783
    }
17784
 
17785
    public void setFieldValue(_Fields field, Object value) {
17786
      switch (field) {
483 rajveer 17787
      case ORDER_ID:
68 ashish 17788
        if (value == null) {
483 rajveer 17789
          unsetOrderId();
68 ashish 17790
        } else {
483 rajveer 17791
          setOrderId((Long)value);
68 ashish 17792
        }
17793
        break;
17794
 
17795
      }
17796
    }
17797
 
17798
    public void setFieldValue(int fieldID, Object value) {
17799
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17800
    }
17801
 
17802
    public Object getFieldValue(_Fields field) {
17803
      switch (field) {
483 rajveer 17804
      case ORDER_ID:
17805
        return new Long(getOrderId());
68 ashish 17806
 
17807
      }
17808
      throw new IllegalStateException();
17809
    }
17810
 
17811
    public Object getFieldValue(int fieldId) {
17812
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17813
    }
17814
 
17815
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17816
    public boolean isSet(_Fields field) {
17817
      switch (field) {
483 rajveer 17818
      case ORDER_ID:
17819
        return isSetOrderId();
68 ashish 17820
      }
17821
      throw new IllegalStateException();
17822
    }
17823
 
17824
    public boolean isSet(int fieldID) {
17825
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17826
    }
17827
 
17828
    @Override
17829
    public boolean equals(Object that) {
17830
      if (that == null)
17831
        return false;
483 rajveer 17832
      if (that instanceof getLineItemsForOrder_args)
17833
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 17834
      return false;
17835
    }
17836
 
483 rajveer 17837
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 17838
      if (that == null)
17839
        return false;
17840
 
483 rajveer 17841
      boolean this_present_orderId = true;
17842
      boolean that_present_orderId = true;
17843
      if (this_present_orderId || that_present_orderId) {
17844
        if (!(this_present_orderId && that_present_orderId))
68 ashish 17845
          return false;
483 rajveer 17846
        if (this.orderId != that.orderId)
68 ashish 17847
          return false;
17848
      }
17849
 
17850
      return true;
17851
    }
17852
 
17853
    @Override
17854
    public int hashCode() {
17855
      return 0;
17856
    }
17857
 
483 rajveer 17858
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 17859
      if (!getClass().equals(other.getClass())) {
17860
        return getClass().getName().compareTo(other.getClass().getName());
17861
      }
17862
 
17863
      int lastComparison = 0;
483 rajveer 17864
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 17865
 
483 rajveer 17866
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 17867
      if (lastComparison != 0) {
17868
        return lastComparison;
17869
      }
483 rajveer 17870
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 17871
      if (lastComparison != 0) {
17872
        return lastComparison;
17873
      }
17874
      return 0;
17875
    }
17876
 
17877
    public void read(TProtocol iprot) throws TException {
17878
      TField field;
17879
      iprot.readStructBegin();
17880
      while (true)
17881
      {
17882
        field = iprot.readFieldBegin();
17883
        if (field.type == TType.STOP) { 
17884
          break;
17885
        }
17886
        _Fields fieldId = _Fields.findByThriftId(field.id);
17887
        if (fieldId == null) {
17888
          TProtocolUtil.skip(iprot, field.type);
17889
        } else {
17890
          switch (fieldId) {
483 rajveer 17891
            case ORDER_ID:
68 ashish 17892
              if (field.type == TType.I64) {
483 rajveer 17893
                this.orderId = iprot.readI64();
17894
                setOrderIdIsSet(true);
68 ashish 17895
              } else { 
17896
                TProtocolUtil.skip(iprot, field.type);
17897
              }
17898
              break;
17899
          }
17900
          iprot.readFieldEnd();
17901
        }
17902
      }
17903
      iprot.readStructEnd();
17904
      validate();
17905
    }
17906
 
17907
    public void write(TProtocol oprot) throws TException {
17908
      validate();
17909
 
17910
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17911
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17912
      oprot.writeI64(this.orderId);
68 ashish 17913
      oprot.writeFieldEnd();
17914
      oprot.writeFieldStop();
17915
      oprot.writeStructEnd();
17916
    }
17917
 
17918
    @Override
17919
    public String toString() {
483 rajveer 17920
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 17921
      boolean first = true;
17922
 
483 rajveer 17923
      sb.append("orderId:");
17924
      sb.append(this.orderId);
68 ashish 17925
      first = false;
17926
      sb.append(")");
17927
      return sb.toString();
17928
    }
17929
 
17930
    public void validate() throws TException {
17931
      // check for required fields
17932
    }
17933
 
17934
  }
17935
 
483 rajveer 17936
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
17937
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 17938
 
483 rajveer 17939
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 17940
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17941
 
483 rajveer 17942
    private List<LineItem> success;
68 ashish 17943
    private TransactionServiceException ex;
17944
 
17945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17946
    public enum _Fields implements TFieldIdEnum {
17947
      SUCCESS((short)0, "success"),
17948
      EX((short)1, "ex");
17949
 
17950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17952
 
17953
      static {
17954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17955
          byId.put((int)field._thriftId, field);
17956
          byName.put(field.getFieldName(), field);
17957
        }
17958
      }
17959
 
17960
      /**
17961
       * Find the _Fields constant that matches fieldId, or null if its not found.
17962
       */
17963
      public static _Fields findByThriftId(int fieldId) {
17964
        return byId.get(fieldId);
17965
      }
17966
 
17967
      /**
17968
       * Find the _Fields constant that matches fieldId, throwing an exception
17969
       * if it is not found.
17970
       */
17971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17972
        _Fields fields = findByThriftId(fieldId);
17973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17974
        return fields;
17975
      }
17976
 
17977
      /**
17978
       * Find the _Fields constant that matches name, or null if its not found.
17979
       */
17980
      public static _Fields findByName(String name) {
17981
        return byName.get(name);
17982
      }
17983
 
17984
      private final short _thriftId;
17985
      private final String _fieldName;
17986
 
17987
      _Fields(short thriftId, String fieldName) {
17988
        _thriftId = thriftId;
17989
        _fieldName = fieldName;
17990
      }
17991
 
17992
      public short getThriftFieldId() {
17993
        return _thriftId;
17994
      }
17995
 
17996
      public String getFieldName() {
17997
        return _fieldName;
17998
      }
17999
    }
18000
 
18001
    // isset id assignments
18002
 
18003
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18004
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18005
          new ListMetaData(TType.LIST, 
18006
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18007
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18008
          new FieldValueMetaData(TType.STRUCT)));
18009
    }});
18010
 
18011
    static {
483 rajveer 18012
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18013
    }
18014
 
483 rajveer 18015
    public getLineItemsForOrder_result() {
68 ashish 18016
    }
18017
 
483 rajveer 18018
    public getLineItemsForOrder_result(
18019
      List<LineItem> success,
68 ashish 18020
      TransactionServiceException ex)
18021
    {
18022
      this();
18023
      this.success = success;
18024
      this.ex = ex;
18025
    }
18026
 
18027
    /**
18028
     * Performs a deep copy on <i>other</i>.
18029
     */
483 rajveer 18030
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18031
      if (other.isSetSuccess()) {
18032
        List<LineItem> __this__success = new ArrayList<LineItem>();
18033
        for (LineItem other_element : other.success) {
18034
          __this__success.add(new LineItem(other_element));
18035
        }
18036
        this.success = __this__success;
18037
      }
68 ashish 18038
      if (other.isSetEx()) {
18039
        this.ex = new TransactionServiceException(other.ex);
18040
      }
18041
    }
18042
 
483 rajveer 18043
    public getLineItemsForOrder_result deepCopy() {
18044
      return new getLineItemsForOrder_result(this);
68 ashish 18045
    }
18046
 
18047
    @Deprecated
483 rajveer 18048
    public getLineItemsForOrder_result clone() {
18049
      return new getLineItemsForOrder_result(this);
68 ashish 18050
    }
18051
 
483 rajveer 18052
    public int getSuccessSize() {
18053
      return (this.success == null) ? 0 : this.success.size();
18054
    }
18055
 
18056
    public java.util.Iterator<LineItem> getSuccessIterator() {
18057
      return (this.success == null) ? null : this.success.iterator();
18058
    }
18059
 
18060
    public void addToSuccess(LineItem elem) {
18061
      if (this.success == null) {
18062
        this.success = new ArrayList<LineItem>();
18063
      }
18064
      this.success.add(elem);
18065
    }
18066
 
18067
    public List<LineItem> getSuccess() {
68 ashish 18068
      return this.success;
18069
    }
18070
 
483 rajveer 18071
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18072
      this.success = success;
18073
      return this;
18074
    }
18075
 
18076
    public void unsetSuccess() {
483 rajveer 18077
      this.success = null;
68 ashish 18078
    }
18079
 
18080
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18081
    public boolean isSetSuccess() {
483 rajveer 18082
      return this.success != null;
68 ashish 18083
    }
18084
 
18085
    public void setSuccessIsSet(boolean value) {
483 rajveer 18086
      if (!value) {
18087
        this.success = null;
18088
      }
68 ashish 18089
    }
18090
 
18091
    public TransactionServiceException getEx() {
18092
      return this.ex;
18093
    }
18094
 
483 rajveer 18095
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18096
      this.ex = ex;
18097
      return this;
18098
    }
18099
 
18100
    public void unsetEx() {
18101
      this.ex = null;
18102
    }
18103
 
18104
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18105
    public boolean isSetEx() {
18106
      return this.ex != null;
18107
    }
18108
 
18109
    public void setExIsSet(boolean value) {
18110
      if (!value) {
18111
        this.ex = null;
18112
      }
18113
    }
18114
 
18115
    public void setFieldValue(_Fields field, Object value) {
18116
      switch (field) {
18117
      case SUCCESS:
18118
        if (value == null) {
18119
          unsetSuccess();
18120
        } else {
483 rajveer 18121
          setSuccess((List<LineItem>)value);
68 ashish 18122
        }
18123
        break;
18124
 
18125
      case EX:
18126
        if (value == null) {
18127
          unsetEx();
18128
        } else {
18129
          setEx((TransactionServiceException)value);
18130
        }
18131
        break;
18132
 
18133
      }
18134
    }
18135
 
18136
    public void setFieldValue(int fieldID, Object value) {
18137
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18138
    }
18139
 
18140
    public Object getFieldValue(_Fields field) {
18141
      switch (field) {
18142
      case SUCCESS:
483 rajveer 18143
        return getSuccess();
68 ashish 18144
 
18145
      case EX:
18146
        return getEx();
18147
 
18148
      }
18149
      throw new IllegalStateException();
18150
    }
18151
 
18152
    public Object getFieldValue(int fieldId) {
18153
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18154
    }
18155
 
18156
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18157
    public boolean isSet(_Fields field) {
18158
      switch (field) {
18159
      case SUCCESS:
18160
        return isSetSuccess();
18161
      case EX:
18162
        return isSetEx();
18163
      }
18164
      throw new IllegalStateException();
18165
    }
18166
 
18167
    public boolean isSet(int fieldID) {
18168
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18169
    }
18170
 
18171
    @Override
18172
    public boolean equals(Object that) {
18173
      if (that == null)
18174
        return false;
483 rajveer 18175
      if (that instanceof getLineItemsForOrder_result)
18176
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18177
      return false;
18178
    }
18179
 
483 rajveer 18180
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18181
      if (that == null)
18182
        return false;
18183
 
483 rajveer 18184
      boolean this_present_success = true && this.isSetSuccess();
18185
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18186
      if (this_present_success || that_present_success) {
18187
        if (!(this_present_success && that_present_success))
18188
          return false;
483 rajveer 18189
        if (!this.success.equals(that.success))
68 ashish 18190
          return false;
18191
      }
18192
 
18193
      boolean this_present_ex = true && this.isSetEx();
18194
      boolean that_present_ex = true && that.isSetEx();
18195
      if (this_present_ex || that_present_ex) {
18196
        if (!(this_present_ex && that_present_ex))
18197
          return false;
18198
        if (!this.ex.equals(that.ex))
18199
          return false;
18200
      }
18201
 
18202
      return true;
18203
    }
18204
 
18205
    @Override
18206
    public int hashCode() {
18207
      return 0;
18208
    }
18209
 
483 rajveer 18210
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18211
      if (!getClass().equals(other.getClass())) {
18212
        return getClass().getName().compareTo(other.getClass().getName());
18213
      }
18214
 
18215
      int lastComparison = 0;
483 rajveer 18216
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18217
 
18218
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18219
      if (lastComparison != 0) {
18220
        return lastComparison;
18221
      }
18222
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18223
      if (lastComparison != 0) {
18224
        return lastComparison;
18225
      }
18226
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18227
      if (lastComparison != 0) {
18228
        return lastComparison;
18229
      }
18230
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18231
      if (lastComparison != 0) {
18232
        return lastComparison;
18233
      }
18234
      return 0;
18235
    }
18236
 
18237
    public void read(TProtocol iprot) throws TException {
18238
      TField field;
18239
      iprot.readStructBegin();
18240
      while (true)
18241
      {
18242
        field = iprot.readFieldBegin();
18243
        if (field.type == TType.STOP) { 
18244
          break;
18245
        }
18246
        _Fields fieldId = _Fields.findByThriftId(field.id);
18247
        if (fieldId == null) {
18248
          TProtocolUtil.skip(iprot, field.type);
18249
        } else {
18250
          switch (fieldId) {
18251
            case SUCCESS:
483 rajveer 18252
              if (field.type == TType.LIST) {
18253
                {
1382 varun.gupt 18254
                  TList _list40 = iprot.readListBegin();
18255
                  this.success = new ArrayList<LineItem>(_list40.size);
18256
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18257
                  {
1382 varun.gupt 18258
                    LineItem _elem42;
18259
                    _elem42 = new LineItem();
18260
                    _elem42.read(iprot);
18261
                    this.success.add(_elem42);
483 rajveer 18262
                  }
18263
                  iprot.readListEnd();
18264
                }
68 ashish 18265
              } else { 
18266
                TProtocolUtil.skip(iprot, field.type);
18267
              }
18268
              break;
18269
            case EX:
18270
              if (field.type == TType.STRUCT) {
18271
                this.ex = new TransactionServiceException();
18272
                this.ex.read(iprot);
18273
              } else { 
18274
                TProtocolUtil.skip(iprot, field.type);
18275
              }
18276
              break;
18277
          }
18278
          iprot.readFieldEnd();
18279
        }
18280
      }
18281
      iprot.readStructEnd();
18282
      validate();
18283
    }
18284
 
18285
    public void write(TProtocol oprot) throws TException {
18286
      oprot.writeStructBegin(STRUCT_DESC);
18287
 
18288
      if (this.isSetSuccess()) {
18289
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18290
        {
18291
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18292
          for (LineItem _iter43 : this.success)
483 rajveer 18293
          {
1382 varun.gupt 18294
            _iter43.write(oprot);
483 rajveer 18295
          }
18296
          oprot.writeListEnd();
18297
        }
68 ashish 18298
        oprot.writeFieldEnd();
18299
      } else if (this.isSetEx()) {
18300
        oprot.writeFieldBegin(EX_FIELD_DESC);
18301
        this.ex.write(oprot);
18302
        oprot.writeFieldEnd();
18303
      }
18304
      oprot.writeFieldStop();
18305
      oprot.writeStructEnd();
18306
    }
18307
 
18308
    @Override
18309
    public String toString() {
483 rajveer 18310
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18311
      boolean first = true;
18312
 
18313
      sb.append("success:");
483 rajveer 18314
      if (this.success == null) {
18315
        sb.append("null");
18316
      } else {
18317
        sb.append(this.success);
18318
      }
68 ashish 18319
      first = false;
18320
      if (!first) sb.append(", ");
18321
      sb.append("ex:");
18322
      if (this.ex == null) {
18323
        sb.append("null");
18324
      } else {
18325
        sb.append(this.ex);
18326
      }
18327
      first = false;
18328
      sb.append(")");
18329
      return sb.toString();
18330
    }
18331
 
18332
    public void validate() throws TException {
18333
      // check for required fields
18334
    }
18335
 
18336
  }
18337
 
1221 chandransh 18338
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
18339
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
18340
 
18341
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
18342
 
18343
    private long warehouseId;
18344
 
18345
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18346
    public enum _Fields implements TFieldIdEnum {
18347
      WAREHOUSE_ID((short)1, "warehouseId");
18348
 
18349
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18350
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18351
 
18352
      static {
18353
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18354
          byId.put((int)field._thriftId, field);
18355
          byName.put(field.getFieldName(), field);
18356
        }
18357
      }
18358
 
18359
      /**
18360
       * Find the _Fields constant that matches fieldId, or null if its not found.
18361
       */
18362
      public static _Fields findByThriftId(int fieldId) {
18363
        return byId.get(fieldId);
18364
      }
18365
 
18366
      /**
18367
       * Find the _Fields constant that matches fieldId, throwing an exception
18368
       * if it is not found.
18369
       */
18370
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18371
        _Fields fields = findByThriftId(fieldId);
18372
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18373
        return fields;
18374
      }
18375
 
18376
      /**
18377
       * Find the _Fields constant that matches name, or null if its not found.
18378
       */
18379
      public static _Fields findByName(String name) {
18380
        return byName.get(name);
18381
      }
18382
 
18383
      private final short _thriftId;
18384
      private final String _fieldName;
18385
 
18386
      _Fields(short thriftId, String fieldName) {
18387
        _thriftId = thriftId;
18388
        _fieldName = fieldName;
18389
      }
18390
 
18391
      public short getThriftFieldId() {
18392
        return _thriftId;
18393
      }
18394
 
18395
      public String getFieldName() {
18396
        return _fieldName;
18397
      }
18398
    }
18399
 
18400
    // isset id assignments
18401
    private static final int __WAREHOUSEID_ISSET_ID = 0;
18402
    private BitSet __isset_bit_vector = new BitSet(1);
18403
 
18404
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18405
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
18406
          new FieldValueMetaData(TType.I64)));
18407
    }});
18408
 
18409
    static {
18410
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
18411
    }
18412
 
18413
    public batchOrders_args() {
18414
    }
18415
 
18416
    public batchOrders_args(
18417
      long warehouseId)
18418
    {
18419
      this();
18420
      this.warehouseId = warehouseId;
18421
      setWarehouseIdIsSet(true);
18422
    }
18423
 
18424
    /**
18425
     * Performs a deep copy on <i>other</i>.
18426
     */
18427
    public batchOrders_args(batchOrders_args other) {
18428
      __isset_bit_vector.clear();
18429
      __isset_bit_vector.or(other.__isset_bit_vector);
18430
      this.warehouseId = other.warehouseId;
18431
    }
18432
 
18433
    public batchOrders_args deepCopy() {
18434
      return new batchOrders_args(this);
18435
    }
18436
 
18437
    @Deprecated
18438
    public batchOrders_args clone() {
18439
      return new batchOrders_args(this);
18440
    }
18441
 
18442
    public long getWarehouseId() {
18443
      return this.warehouseId;
18444
    }
18445
 
18446
    public batchOrders_args setWarehouseId(long warehouseId) {
18447
      this.warehouseId = warehouseId;
18448
      setWarehouseIdIsSet(true);
18449
      return this;
18450
    }
18451
 
18452
    public void unsetWarehouseId() {
18453
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
18454
    }
18455
 
18456
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
18457
    public boolean isSetWarehouseId() {
18458
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
18459
    }
18460
 
18461
    public void setWarehouseIdIsSet(boolean value) {
18462
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
18463
    }
18464
 
18465
    public void setFieldValue(_Fields field, Object value) {
18466
      switch (field) {
18467
      case WAREHOUSE_ID:
18468
        if (value == null) {
18469
          unsetWarehouseId();
18470
        } else {
18471
          setWarehouseId((Long)value);
18472
        }
18473
        break;
18474
 
18475
      }
18476
    }
18477
 
18478
    public void setFieldValue(int fieldID, Object value) {
18479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18480
    }
18481
 
18482
    public Object getFieldValue(_Fields field) {
18483
      switch (field) {
18484
      case WAREHOUSE_ID:
18485
        return new Long(getWarehouseId());
18486
 
18487
      }
18488
      throw new IllegalStateException();
18489
    }
18490
 
18491
    public Object getFieldValue(int fieldId) {
18492
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18493
    }
18494
 
18495
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18496
    public boolean isSet(_Fields field) {
18497
      switch (field) {
18498
      case WAREHOUSE_ID:
18499
        return isSetWarehouseId();
18500
      }
18501
      throw new IllegalStateException();
18502
    }
18503
 
18504
    public boolean isSet(int fieldID) {
18505
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18506
    }
18507
 
18508
    @Override
18509
    public boolean equals(Object that) {
18510
      if (that == null)
18511
        return false;
18512
      if (that instanceof batchOrders_args)
18513
        return this.equals((batchOrders_args)that);
18514
      return false;
18515
    }
18516
 
18517
    public boolean equals(batchOrders_args that) {
18518
      if (that == null)
18519
        return false;
18520
 
18521
      boolean this_present_warehouseId = true;
18522
      boolean that_present_warehouseId = true;
18523
      if (this_present_warehouseId || that_present_warehouseId) {
18524
        if (!(this_present_warehouseId && that_present_warehouseId))
18525
          return false;
18526
        if (this.warehouseId != that.warehouseId)
18527
          return false;
18528
      }
18529
 
18530
      return true;
18531
    }
18532
 
18533
    @Override
18534
    public int hashCode() {
18535
      return 0;
18536
    }
18537
 
18538
    public int compareTo(batchOrders_args other) {
18539
      if (!getClass().equals(other.getClass())) {
18540
        return getClass().getName().compareTo(other.getClass().getName());
18541
      }
18542
 
18543
      int lastComparison = 0;
18544
      batchOrders_args typedOther = (batchOrders_args)other;
18545
 
18546
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
18547
      if (lastComparison != 0) {
18548
        return lastComparison;
18549
      }
18550
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
18551
      if (lastComparison != 0) {
18552
        return lastComparison;
18553
      }
18554
      return 0;
18555
    }
18556
 
18557
    public void read(TProtocol iprot) throws TException {
18558
      TField field;
18559
      iprot.readStructBegin();
18560
      while (true)
18561
      {
18562
        field = iprot.readFieldBegin();
18563
        if (field.type == TType.STOP) { 
18564
          break;
18565
        }
18566
        _Fields fieldId = _Fields.findByThriftId(field.id);
18567
        if (fieldId == null) {
18568
          TProtocolUtil.skip(iprot, field.type);
18569
        } else {
18570
          switch (fieldId) {
18571
            case WAREHOUSE_ID:
18572
              if (field.type == TType.I64) {
18573
                this.warehouseId = iprot.readI64();
18574
                setWarehouseIdIsSet(true);
18575
              } else { 
18576
                TProtocolUtil.skip(iprot, field.type);
18577
              }
18578
              break;
18579
          }
18580
          iprot.readFieldEnd();
18581
        }
18582
      }
18583
      iprot.readStructEnd();
18584
      validate();
18585
    }
18586
 
18587
    public void write(TProtocol oprot) throws TException {
18588
      validate();
18589
 
18590
      oprot.writeStructBegin(STRUCT_DESC);
18591
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
18592
      oprot.writeI64(this.warehouseId);
18593
      oprot.writeFieldEnd();
18594
      oprot.writeFieldStop();
18595
      oprot.writeStructEnd();
18596
    }
18597
 
18598
    @Override
18599
    public String toString() {
18600
      StringBuilder sb = new StringBuilder("batchOrders_args(");
18601
      boolean first = true;
18602
 
18603
      sb.append("warehouseId:");
18604
      sb.append(this.warehouseId);
18605
      first = false;
18606
      sb.append(")");
18607
      return sb.toString();
18608
    }
18609
 
18610
    public void validate() throws TException {
18611
      // check for required fields
18612
    }
18613
 
18614
  }
18615
 
18616
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
18617
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
18618
 
18619
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18620
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18621
 
18622
    private List<Order> success;
18623
    private TransactionServiceException ex;
18624
 
18625
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18626
    public enum _Fields implements TFieldIdEnum {
18627
      SUCCESS((short)0, "success"),
18628
      EX((short)1, "ex");
18629
 
18630
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18631
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18632
 
18633
      static {
18634
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18635
          byId.put((int)field._thriftId, field);
18636
          byName.put(field.getFieldName(), field);
18637
        }
18638
      }
18639
 
18640
      /**
18641
       * Find the _Fields constant that matches fieldId, or null if its not found.
18642
       */
18643
      public static _Fields findByThriftId(int fieldId) {
18644
        return byId.get(fieldId);
18645
      }
18646
 
18647
      /**
18648
       * Find the _Fields constant that matches fieldId, throwing an exception
18649
       * if it is not found.
18650
       */
18651
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18652
        _Fields fields = findByThriftId(fieldId);
18653
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18654
        return fields;
18655
      }
18656
 
18657
      /**
18658
       * Find the _Fields constant that matches name, or null if its not found.
18659
       */
18660
      public static _Fields findByName(String name) {
18661
        return byName.get(name);
18662
      }
18663
 
18664
      private final short _thriftId;
18665
      private final String _fieldName;
18666
 
18667
      _Fields(short thriftId, String fieldName) {
18668
        _thriftId = thriftId;
18669
        _fieldName = fieldName;
18670
      }
18671
 
18672
      public short getThriftFieldId() {
18673
        return _thriftId;
18674
      }
18675
 
18676
      public String getFieldName() {
18677
        return _fieldName;
18678
      }
18679
    }
18680
 
18681
    // isset id assignments
18682
 
18683
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18684
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18685
          new ListMetaData(TType.LIST, 
18686
              new StructMetaData(TType.STRUCT, Order.class))));
18687
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18688
          new FieldValueMetaData(TType.STRUCT)));
18689
    }});
18690
 
18691
    static {
18692
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
18693
    }
18694
 
18695
    public batchOrders_result() {
18696
    }
18697
 
18698
    public batchOrders_result(
18699
      List<Order> success,
18700
      TransactionServiceException ex)
18701
    {
18702
      this();
18703
      this.success = success;
18704
      this.ex = ex;
18705
    }
18706
 
18707
    /**
18708
     * Performs a deep copy on <i>other</i>.
18709
     */
18710
    public batchOrders_result(batchOrders_result other) {
18711
      if (other.isSetSuccess()) {
18712
        List<Order> __this__success = new ArrayList<Order>();
18713
        for (Order other_element : other.success) {
18714
          __this__success.add(new Order(other_element));
18715
        }
18716
        this.success = __this__success;
18717
      }
18718
      if (other.isSetEx()) {
18719
        this.ex = new TransactionServiceException(other.ex);
18720
      }
18721
    }
18722
 
18723
    public batchOrders_result deepCopy() {
18724
      return new batchOrders_result(this);
18725
    }
18726
 
18727
    @Deprecated
18728
    public batchOrders_result clone() {
18729
      return new batchOrders_result(this);
18730
    }
18731
 
18732
    public int getSuccessSize() {
18733
      return (this.success == null) ? 0 : this.success.size();
18734
    }
18735
 
18736
    public java.util.Iterator<Order> getSuccessIterator() {
18737
      return (this.success == null) ? null : this.success.iterator();
18738
    }
18739
 
18740
    public void addToSuccess(Order elem) {
18741
      if (this.success == null) {
18742
        this.success = new ArrayList<Order>();
18743
      }
18744
      this.success.add(elem);
18745
    }
18746
 
18747
    public List<Order> getSuccess() {
18748
      return this.success;
18749
    }
18750
 
18751
    public batchOrders_result setSuccess(List<Order> success) {
18752
      this.success = success;
18753
      return this;
18754
    }
18755
 
18756
    public void unsetSuccess() {
18757
      this.success = null;
18758
    }
18759
 
18760
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18761
    public boolean isSetSuccess() {
18762
      return this.success != null;
18763
    }
18764
 
18765
    public void setSuccessIsSet(boolean value) {
18766
      if (!value) {
18767
        this.success = null;
18768
      }
18769
    }
18770
 
18771
    public TransactionServiceException getEx() {
18772
      return this.ex;
18773
    }
18774
 
18775
    public batchOrders_result setEx(TransactionServiceException ex) {
18776
      this.ex = ex;
18777
      return this;
18778
    }
18779
 
18780
    public void unsetEx() {
18781
      this.ex = null;
18782
    }
18783
 
18784
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18785
    public boolean isSetEx() {
18786
      return this.ex != null;
18787
    }
18788
 
18789
    public void setExIsSet(boolean value) {
18790
      if (!value) {
18791
        this.ex = null;
18792
      }
18793
    }
18794
 
18795
    public void setFieldValue(_Fields field, Object value) {
18796
      switch (field) {
18797
      case SUCCESS:
18798
        if (value == null) {
18799
          unsetSuccess();
18800
        } else {
18801
          setSuccess((List<Order>)value);
18802
        }
18803
        break;
18804
 
18805
      case EX:
18806
        if (value == null) {
18807
          unsetEx();
18808
        } else {
18809
          setEx((TransactionServiceException)value);
18810
        }
18811
        break;
18812
 
18813
      }
18814
    }
18815
 
18816
    public void setFieldValue(int fieldID, Object value) {
18817
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18818
    }
18819
 
18820
    public Object getFieldValue(_Fields field) {
18821
      switch (field) {
18822
      case SUCCESS:
18823
        return getSuccess();
18824
 
18825
      case EX:
18826
        return getEx();
18827
 
18828
      }
18829
      throw new IllegalStateException();
18830
    }
18831
 
18832
    public Object getFieldValue(int fieldId) {
18833
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18834
    }
18835
 
18836
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18837
    public boolean isSet(_Fields field) {
18838
      switch (field) {
18839
      case SUCCESS:
18840
        return isSetSuccess();
18841
      case EX:
18842
        return isSetEx();
18843
      }
18844
      throw new IllegalStateException();
18845
    }
18846
 
18847
    public boolean isSet(int fieldID) {
18848
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18849
    }
18850
 
18851
    @Override
18852
    public boolean equals(Object that) {
18853
      if (that == null)
18854
        return false;
18855
      if (that instanceof batchOrders_result)
18856
        return this.equals((batchOrders_result)that);
18857
      return false;
18858
    }
18859
 
18860
    public boolean equals(batchOrders_result that) {
18861
      if (that == null)
18862
        return false;
18863
 
18864
      boolean this_present_success = true && this.isSetSuccess();
18865
      boolean that_present_success = true && that.isSetSuccess();
18866
      if (this_present_success || that_present_success) {
18867
        if (!(this_present_success && that_present_success))
18868
          return false;
18869
        if (!this.success.equals(that.success))
18870
          return false;
18871
      }
18872
 
18873
      boolean this_present_ex = true && this.isSetEx();
18874
      boolean that_present_ex = true && that.isSetEx();
18875
      if (this_present_ex || that_present_ex) {
18876
        if (!(this_present_ex && that_present_ex))
18877
          return false;
18878
        if (!this.ex.equals(that.ex))
18879
          return false;
18880
      }
18881
 
18882
      return true;
18883
    }
18884
 
18885
    @Override
18886
    public int hashCode() {
18887
      return 0;
18888
    }
18889
 
18890
    public int compareTo(batchOrders_result other) {
18891
      if (!getClass().equals(other.getClass())) {
18892
        return getClass().getName().compareTo(other.getClass().getName());
18893
      }
18894
 
18895
      int lastComparison = 0;
18896
      batchOrders_result typedOther = (batchOrders_result)other;
18897
 
18898
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18899
      if (lastComparison != 0) {
18900
        return lastComparison;
18901
      }
18902
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18903
      if (lastComparison != 0) {
18904
        return lastComparison;
18905
      }
18906
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18907
      if (lastComparison != 0) {
18908
        return lastComparison;
18909
      }
18910
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18911
      if (lastComparison != 0) {
18912
        return lastComparison;
18913
      }
18914
      return 0;
18915
    }
18916
 
18917
    public void read(TProtocol iprot) throws TException {
18918
      TField field;
18919
      iprot.readStructBegin();
18920
      while (true)
18921
      {
18922
        field = iprot.readFieldBegin();
18923
        if (field.type == TType.STOP) { 
18924
          break;
18925
        }
18926
        _Fields fieldId = _Fields.findByThriftId(field.id);
18927
        if (fieldId == null) {
18928
          TProtocolUtil.skip(iprot, field.type);
18929
        } else {
18930
          switch (fieldId) {
18931
            case SUCCESS:
18932
              if (field.type == TType.LIST) {
18933
                {
1382 varun.gupt 18934
                  TList _list44 = iprot.readListBegin();
18935
                  this.success = new ArrayList<Order>(_list44.size);
18936
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 18937
                  {
1382 varun.gupt 18938
                    Order _elem46;
18939
                    _elem46 = new Order();
18940
                    _elem46.read(iprot);
18941
                    this.success.add(_elem46);
1221 chandransh 18942
                  }
18943
                  iprot.readListEnd();
18944
                }
18945
              } else { 
18946
                TProtocolUtil.skip(iprot, field.type);
18947
              }
18948
              break;
18949
            case EX:
18950
              if (field.type == TType.STRUCT) {
18951
                this.ex = new TransactionServiceException();
18952
                this.ex.read(iprot);
18953
              } else { 
18954
                TProtocolUtil.skip(iprot, field.type);
18955
              }
18956
              break;
18957
          }
18958
          iprot.readFieldEnd();
18959
        }
18960
      }
18961
      iprot.readStructEnd();
18962
      validate();
18963
    }
18964
 
18965
    public void write(TProtocol oprot) throws TException {
18966
      oprot.writeStructBegin(STRUCT_DESC);
18967
 
18968
      if (this.isSetSuccess()) {
18969
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18970
        {
18971
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18972
          for (Order _iter47 : this.success)
1221 chandransh 18973
          {
1382 varun.gupt 18974
            _iter47.write(oprot);
1221 chandransh 18975
          }
18976
          oprot.writeListEnd();
18977
        }
18978
        oprot.writeFieldEnd();
18979
      } else if (this.isSetEx()) {
18980
        oprot.writeFieldBegin(EX_FIELD_DESC);
18981
        this.ex.write(oprot);
18982
        oprot.writeFieldEnd();
18983
      }
18984
      oprot.writeFieldStop();
18985
      oprot.writeStructEnd();
18986
    }
18987
 
18988
    @Override
18989
    public String toString() {
18990
      StringBuilder sb = new StringBuilder("batchOrders_result(");
18991
      boolean first = true;
18992
 
18993
      sb.append("success:");
18994
      if (this.success == null) {
18995
        sb.append("null");
18996
      } else {
18997
        sb.append(this.success);
18998
      }
18999
      first = false;
19000
      if (!first) sb.append(", ");
19001
      sb.append("ex:");
19002
      if (this.ex == null) {
19003
        sb.append("null");
19004
      } else {
19005
        sb.append(this.ex);
19006
      }
19007
      first = false;
19008
      sb.append(")");
19009
      return sb.toString();
19010
    }
19011
 
19012
    public void validate() throws TException {
19013
      // check for required fields
19014
    }
19015
 
19016
  }
19017
 
1209 chandransh 19018
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
19019
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
19020
 
19021
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19022
 
19023
    private long orderId;
19024
 
19025
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19026
    public enum _Fields implements TFieldIdEnum {
19027
      ORDER_ID((short)1, "orderId");
19028
 
19029
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19030
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19031
 
19032
      static {
19033
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19034
          byId.put((int)field._thriftId, field);
19035
          byName.put(field.getFieldName(), field);
19036
        }
19037
      }
19038
 
19039
      /**
19040
       * Find the _Fields constant that matches fieldId, or null if its not found.
19041
       */
19042
      public static _Fields findByThriftId(int fieldId) {
19043
        return byId.get(fieldId);
19044
      }
19045
 
19046
      /**
19047
       * Find the _Fields constant that matches fieldId, throwing an exception
19048
       * if it is not found.
19049
       */
19050
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19051
        _Fields fields = findByThriftId(fieldId);
19052
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19053
        return fields;
19054
      }
19055
 
19056
      /**
19057
       * Find the _Fields constant that matches name, or null if its not found.
19058
       */
19059
      public static _Fields findByName(String name) {
19060
        return byName.get(name);
19061
      }
19062
 
19063
      private final short _thriftId;
19064
      private final String _fieldName;
19065
 
19066
      _Fields(short thriftId, String fieldName) {
19067
        _thriftId = thriftId;
19068
        _fieldName = fieldName;
19069
      }
19070
 
19071
      public short getThriftFieldId() {
19072
        return _thriftId;
19073
      }
19074
 
19075
      public String getFieldName() {
19076
        return _fieldName;
19077
      }
19078
    }
19079
 
19080
    // isset id assignments
19081
    private static final int __ORDERID_ISSET_ID = 0;
19082
    private BitSet __isset_bit_vector = new BitSet(1);
19083
 
19084
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19085
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19086
          new FieldValueMetaData(TType.I64)));
19087
    }});
19088
 
19089
    static {
19090
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
19091
    }
19092
 
19093
    public markOrderAsOutOfStock_args() {
19094
    }
19095
 
19096
    public markOrderAsOutOfStock_args(
19097
      long orderId)
19098
    {
19099
      this();
19100
      this.orderId = orderId;
19101
      setOrderIdIsSet(true);
19102
    }
19103
 
19104
    /**
19105
     * Performs a deep copy on <i>other</i>.
19106
     */
19107
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
19108
      __isset_bit_vector.clear();
19109
      __isset_bit_vector.or(other.__isset_bit_vector);
19110
      this.orderId = other.orderId;
19111
    }
19112
 
19113
    public markOrderAsOutOfStock_args deepCopy() {
19114
      return new markOrderAsOutOfStock_args(this);
19115
    }
19116
 
19117
    @Deprecated
19118
    public markOrderAsOutOfStock_args clone() {
19119
      return new markOrderAsOutOfStock_args(this);
19120
    }
19121
 
19122
    public long getOrderId() {
19123
      return this.orderId;
19124
    }
19125
 
19126
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
19127
      this.orderId = orderId;
19128
      setOrderIdIsSet(true);
19129
      return this;
19130
    }
19131
 
19132
    public void unsetOrderId() {
19133
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19134
    }
19135
 
19136
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19137
    public boolean isSetOrderId() {
19138
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19139
    }
19140
 
19141
    public void setOrderIdIsSet(boolean value) {
19142
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19143
    }
19144
 
19145
    public void setFieldValue(_Fields field, Object value) {
19146
      switch (field) {
19147
      case ORDER_ID:
19148
        if (value == null) {
19149
          unsetOrderId();
19150
        } else {
19151
          setOrderId((Long)value);
19152
        }
19153
        break;
19154
 
19155
      }
19156
    }
19157
 
19158
    public void setFieldValue(int fieldID, Object value) {
19159
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19160
    }
19161
 
19162
    public Object getFieldValue(_Fields field) {
19163
      switch (field) {
19164
      case ORDER_ID:
19165
        return new Long(getOrderId());
19166
 
19167
      }
19168
      throw new IllegalStateException();
19169
    }
19170
 
19171
    public Object getFieldValue(int fieldId) {
19172
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19173
    }
19174
 
19175
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19176
    public boolean isSet(_Fields field) {
19177
      switch (field) {
19178
      case ORDER_ID:
19179
        return isSetOrderId();
19180
      }
19181
      throw new IllegalStateException();
19182
    }
19183
 
19184
    public boolean isSet(int fieldID) {
19185
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19186
    }
19187
 
19188
    @Override
19189
    public boolean equals(Object that) {
19190
      if (that == null)
19191
        return false;
19192
      if (that instanceof markOrderAsOutOfStock_args)
19193
        return this.equals((markOrderAsOutOfStock_args)that);
19194
      return false;
19195
    }
19196
 
19197
    public boolean equals(markOrderAsOutOfStock_args that) {
19198
      if (that == null)
19199
        return false;
19200
 
19201
      boolean this_present_orderId = true;
19202
      boolean that_present_orderId = true;
19203
      if (this_present_orderId || that_present_orderId) {
19204
        if (!(this_present_orderId && that_present_orderId))
19205
          return false;
19206
        if (this.orderId != that.orderId)
19207
          return false;
19208
      }
19209
 
19210
      return true;
19211
    }
19212
 
19213
    @Override
19214
    public int hashCode() {
19215
      return 0;
19216
    }
19217
 
19218
    public int compareTo(markOrderAsOutOfStock_args other) {
19219
      if (!getClass().equals(other.getClass())) {
19220
        return getClass().getName().compareTo(other.getClass().getName());
19221
      }
19222
 
19223
      int lastComparison = 0;
19224
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
19225
 
19226
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19227
      if (lastComparison != 0) {
19228
        return lastComparison;
19229
      }
19230
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19231
      if (lastComparison != 0) {
19232
        return lastComparison;
19233
      }
19234
      return 0;
19235
    }
19236
 
19237
    public void read(TProtocol iprot) throws TException {
19238
      TField field;
19239
      iprot.readStructBegin();
19240
      while (true)
19241
      {
19242
        field = iprot.readFieldBegin();
19243
        if (field.type == TType.STOP) { 
19244
          break;
19245
        }
19246
        _Fields fieldId = _Fields.findByThriftId(field.id);
19247
        if (fieldId == null) {
19248
          TProtocolUtil.skip(iprot, field.type);
19249
        } else {
19250
          switch (fieldId) {
19251
            case ORDER_ID:
19252
              if (field.type == TType.I64) {
19253
                this.orderId = iprot.readI64();
19254
                setOrderIdIsSet(true);
19255
              } else { 
19256
                TProtocolUtil.skip(iprot, field.type);
19257
              }
19258
              break;
19259
          }
19260
          iprot.readFieldEnd();
19261
        }
19262
      }
19263
      iprot.readStructEnd();
19264
      validate();
19265
    }
19266
 
19267
    public void write(TProtocol oprot) throws TException {
19268
      validate();
19269
 
19270
      oprot.writeStructBegin(STRUCT_DESC);
19271
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19272
      oprot.writeI64(this.orderId);
19273
      oprot.writeFieldEnd();
19274
      oprot.writeFieldStop();
19275
      oprot.writeStructEnd();
19276
    }
19277
 
19278
    @Override
19279
    public String toString() {
19280
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
19281
      boolean first = true;
19282
 
19283
      sb.append("orderId:");
19284
      sb.append(this.orderId);
19285
      first = false;
19286
      sb.append(")");
19287
      return sb.toString();
19288
    }
19289
 
19290
    public void validate() throws TException {
19291
      // check for required fields
19292
    }
19293
 
19294
  }
19295
 
19296
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
19297
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
19298
 
19299
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
19300
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19301
 
19302
    private boolean success;
19303
    private TransactionServiceException ex;
19304
 
19305
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19306
    public enum _Fields implements TFieldIdEnum {
19307
      SUCCESS((short)0, "success"),
19308
      EX((short)1, "ex");
19309
 
19310
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19311
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19312
 
19313
      static {
19314
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19315
          byId.put((int)field._thriftId, field);
19316
          byName.put(field.getFieldName(), field);
19317
        }
19318
      }
19319
 
19320
      /**
19321
       * Find the _Fields constant that matches fieldId, or null if its not found.
19322
       */
19323
      public static _Fields findByThriftId(int fieldId) {
19324
        return byId.get(fieldId);
19325
      }
19326
 
19327
      /**
19328
       * Find the _Fields constant that matches fieldId, throwing an exception
19329
       * if it is not found.
19330
       */
19331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19332
        _Fields fields = findByThriftId(fieldId);
19333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19334
        return fields;
19335
      }
19336
 
19337
      /**
19338
       * Find the _Fields constant that matches name, or null if its not found.
19339
       */
19340
      public static _Fields findByName(String name) {
19341
        return byName.get(name);
19342
      }
19343
 
19344
      private final short _thriftId;
19345
      private final String _fieldName;
19346
 
19347
      _Fields(short thriftId, String fieldName) {
19348
        _thriftId = thriftId;
19349
        _fieldName = fieldName;
19350
      }
19351
 
19352
      public short getThriftFieldId() {
19353
        return _thriftId;
19354
      }
19355
 
19356
      public String getFieldName() {
19357
        return _fieldName;
19358
      }
19359
    }
19360
 
19361
    // isset id assignments
19362
    private static final int __SUCCESS_ISSET_ID = 0;
19363
    private BitSet __isset_bit_vector = new BitSet(1);
19364
 
19365
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19366
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19367
          new FieldValueMetaData(TType.BOOL)));
19368
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19369
          new FieldValueMetaData(TType.STRUCT)));
19370
    }});
19371
 
19372
    static {
19373
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
19374
    }
19375
 
19376
    public markOrderAsOutOfStock_result() {
19377
    }
19378
 
19379
    public markOrderAsOutOfStock_result(
19380
      boolean success,
19381
      TransactionServiceException ex)
19382
    {
19383
      this();
19384
      this.success = success;
19385
      setSuccessIsSet(true);
19386
      this.ex = ex;
19387
    }
19388
 
19389
    /**
19390
     * Performs a deep copy on <i>other</i>.
19391
     */
19392
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
19393
      __isset_bit_vector.clear();
19394
      __isset_bit_vector.or(other.__isset_bit_vector);
19395
      this.success = other.success;
19396
      if (other.isSetEx()) {
19397
        this.ex = new TransactionServiceException(other.ex);
19398
      }
19399
    }
19400
 
19401
    public markOrderAsOutOfStock_result deepCopy() {
19402
      return new markOrderAsOutOfStock_result(this);
19403
    }
19404
 
19405
    @Deprecated
19406
    public markOrderAsOutOfStock_result clone() {
19407
      return new markOrderAsOutOfStock_result(this);
19408
    }
19409
 
19410
    public boolean isSuccess() {
19411
      return this.success;
19412
    }
19413
 
19414
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
19415
      this.success = success;
19416
      setSuccessIsSet(true);
19417
      return this;
19418
    }
19419
 
19420
    public void unsetSuccess() {
19421
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
19422
    }
19423
 
19424
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19425
    public boolean isSetSuccess() {
19426
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
19427
    }
19428
 
19429
    public void setSuccessIsSet(boolean value) {
19430
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
19431
    }
19432
 
19433
    public TransactionServiceException getEx() {
19434
      return this.ex;
19435
    }
19436
 
19437
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
19438
      this.ex = ex;
19439
      return this;
19440
    }
19441
 
19442
    public void unsetEx() {
19443
      this.ex = null;
19444
    }
19445
 
19446
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19447
    public boolean isSetEx() {
19448
      return this.ex != null;
19449
    }
19450
 
19451
    public void setExIsSet(boolean value) {
19452
      if (!value) {
19453
        this.ex = null;
19454
      }
19455
    }
19456
 
19457
    public void setFieldValue(_Fields field, Object value) {
19458
      switch (field) {
19459
      case SUCCESS:
19460
        if (value == null) {
19461
          unsetSuccess();
19462
        } else {
19463
          setSuccess((Boolean)value);
19464
        }
19465
        break;
19466
 
19467
      case EX:
19468
        if (value == null) {
19469
          unsetEx();
19470
        } else {
19471
          setEx((TransactionServiceException)value);
19472
        }
19473
        break;
19474
 
19475
      }
19476
    }
19477
 
19478
    public void setFieldValue(int fieldID, Object value) {
19479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19480
    }
19481
 
19482
    public Object getFieldValue(_Fields field) {
19483
      switch (field) {
19484
      case SUCCESS:
19485
        return new Boolean(isSuccess());
19486
 
19487
      case EX:
19488
        return getEx();
19489
 
19490
      }
19491
      throw new IllegalStateException();
19492
    }
19493
 
19494
    public Object getFieldValue(int fieldId) {
19495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19496
    }
19497
 
19498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19499
    public boolean isSet(_Fields field) {
19500
      switch (field) {
19501
      case SUCCESS:
19502
        return isSetSuccess();
19503
      case EX:
19504
        return isSetEx();
19505
      }
19506
      throw new IllegalStateException();
19507
    }
19508
 
19509
    public boolean isSet(int fieldID) {
19510
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19511
    }
19512
 
19513
    @Override
19514
    public boolean equals(Object that) {
19515
      if (that == null)
19516
        return false;
19517
      if (that instanceof markOrderAsOutOfStock_result)
19518
        return this.equals((markOrderAsOutOfStock_result)that);
19519
      return false;
19520
    }
19521
 
19522
    public boolean equals(markOrderAsOutOfStock_result that) {
19523
      if (that == null)
19524
        return false;
19525
 
19526
      boolean this_present_success = true;
19527
      boolean that_present_success = true;
19528
      if (this_present_success || that_present_success) {
19529
        if (!(this_present_success && that_present_success))
19530
          return false;
19531
        if (this.success != that.success)
19532
          return false;
19533
      }
19534
 
19535
      boolean this_present_ex = true && this.isSetEx();
19536
      boolean that_present_ex = true && that.isSetEx();
19537
      if (this_present_ex || that_present_ex) {
19538
        if (!(this_present_ex && that_present_ex))
19539
          return false;
19540
        if (!this.ex.equals(that.ex))
19541
          return false;
19542
      }
19543
 
19544
      return true;
19545
    }
19546
 
19547
    @Override
19548
    public int hashCode() {
19549
      return 0;
19550
    }
19551
 
19552
    public int compareTo(markOrderAsOutOfStock_result other) {
19553
      if (!getClass().equals(other.getClass())) {
19554
        return getClass().getName().compareTo(other.getClass().getName());
19555
      }
19556
 
19557
      int lastComparison = 0;
19558
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
19559
 
19560
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19561
      if (lastComparison != 0) {
19562
        return lastComparison;
19563
      }
19564
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19565
      if (lastComparison != 0) {
19566
        return lastComparison;
19567
      }
19568
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19569
      if (lastComparison != 0) {
19570
        return lastComparison;
19571
      }
19572
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19573
      if (lastComparison != 0) {
19574
        return lastComparison;
19575
      }
19576
      return 0;
19577
    }
19578
 
19579
    public void read(TProtocol iprot) throws TException {
19580
      TField field;
19581
      iprot.readStructBegin();
19582
      while (true)
19583
      {
19584
        field = iprot.readFieldBegin();
19585
        if (field.type == TType.STOP) { 
19586
          break;
19587
        }
19588
        _Fields fieldId = _Fields.findByThriftId(field.id);
19589
        if (fieldId == null) {
19590
          TProtocolUtil.skip(iprot, field.type);
19591
        } else {
19592
          switch (fieldId) {
19593
            case SUCCESS:
19594
              if (field.type == TType.BOOL) {
19595
                this.success = iprot.readBool();
19596
                setSuccessIsSet(true);
19597
              } else { 
19598
                TProtocolUtil.skip(iprot, field.type);
19599
              }
19600
              break;
19601
            case EX:
19602
              if (field.type == TType.STRUCT) {
19603
                this.ex = new TransactionServiceException();
19604
                this.ex.read(iprot);
19605
              } else { 
19606
                TProtocolUtil.skip(iprot, field.type);
19607
              }
19608
              break;
19609
          }
19610
          iprot.readFieldEnd();
19611
        }
19612
      }
19613
      iprot.readStructEnd();
19614
      validate();
19615
    }
19616
 
19617
    public void write(TProtocol oprot) throws TException {
19618
      oprot.writeStructBegin(STRUCT_DESC);
19619
 
19620
      if (this.isSetSuccess()) {
19621
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19622
        oprot.writeBool(this.success);
19623
        oprot.writeFieldEnd();
19624
      } else if (this.isSetEx()) {
19625
        oprot.writeFieldBegin(EX_FIELD_DESC);
19626
        this.ex.write(oprot);
19627
        oprot.writeFieldEnd();
19628
      }
19629
      oprot.writeFieldStop();
19630
      oprot.writeStructEnd();
19631
    }
19632
 
19633
    @Override
19634
    public String toString() {
19635
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
19636
      boolean first = true;
19637
 
19638
      sb.append("success:");
19639
      sb.append(this.success);
19640
      first = false;
19641
      if (!first) sb.append(", ");
19642
      sb.append("ex:");
19643
      if (this.ex == null) {
19644
        sb.append("null");
19645
      } else {
19646
        sb.append(this.ex);
19647
      }
19648
      first = false;
19649
      sb.append(")");
19650
      return sb.toString();
19651
    }
19652
 
19653
    public void validate() throws TException {
19654
      // check for required fields
19655
    }
19656
 
19657
  }
19658
 
758 chandransh 19659
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
19660
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
19661
 
19662
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19663
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
19664
 
19665
    private long warehouseId;
19666
    private long providerId;
19667
 
19668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19669
    public enum _Fields implements TFieldIdEnum {
19670
      WAREHOUSE_ID((short)1, "warehouseId"),
19671
      PROVIDER_ID((short)2, "providerId");
19672
 
19673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19675
 
19676
      static {
19677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19678
          byId.put((int)field._thriftId, field);
19679
          byName.put(field.getFieldName(), field);
19680
        }
19681
      }
19682
 
19683
      /**
19684
       * Find the _Fields constant that matches fieldId, or null if its not found.
19685
       */
19686
      public static _Fields findByThriftId(int fieldId) {
19687
        return byId.get(fieldId);
19688
      }
19689
 
19690
      /**
19691
       * Find the _Fields constant that matches fieldId, throwing an exception
19692
       * if it is not found.
19693
       */
19694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19695
        _Fields fields = findByThriftId(fieldId);
19696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19697
        return fields;
19698
      }
19699
 
19700
      /**
19701
       * Find the _Fields constant that matches name, or null if its not found.
19702
       */
19703
      public static _Fields findByName(String name) {
19704
        return byName.get(name);
19705
      }
19706
 
19707
      private final short _thriftId;
19708
      private final String _fieldName;
19709
 
19710
      _Fields(short thriftId, String fieldName) {
19711
        _thriftId = thriftId;
19712
        _fieldName = fieldName;
19713
      }
19714
 
19715
      public short getThriftFieldId() {
19716
        return _thriftId;
19717
      }
19718
 
19719
      public String getFieldName() {
19720
        return _fieldName;
19721
      }
19722
    }
19723
 
19724
    // isset id assignments
19725
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19726
    private static final int __PROVIDERID_ISSET_ID = 1;
19727
    private BitSet __isset_bit_vector = new BitSet(2);
19728
 
19729
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19730
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19731
          new FieldValueMetaData(TType.I64)));
19732
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
19733
          new FieldValueMetaData(TType.I64)));
19734
    }});
19735
 
19736
    static {
19737
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
19738
    }
19739
 
19740
    public markOrdersAsManifested_args() {
19741
    }
19742
 
19743
    public markOrdersAsManifested_args(
19744
      long warehouseId,
19745
      long providerId)
19746
    {
19747
      this();
19748
      this.warehouseId = warehouseId;
19749
      setWarehouseIdIsSet(true);
19750
      this.providerId = providerId;
19751
      setProviderIdIsSet(true);
19752
    }
19753
 
19754
    /**
19755
     * Performs a deep copy on <i>other</i>.
19756
     */
19757
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
19758
      __isset_bit_vector.clear();
19759
      __isset_bit_vector.or(other.__isset_bit_vector);
19760
      this.warehouseId = other.warehouseId;
19761
      this.providerId = other.providerId;
19762
    }
19763
 
19764
    public markOrdersAsManifested_args deepCopy() {
19765
      return new markOrdersAsManifested_args(this);
19766
    }
19767
 
19768
    @Deprecated
19769
    public markOrdersAsManifested_args clone() {
19770
      return new markOrdersAsManifested_args(this);
19771
    }
19772
 
19773
    public long getWarehouseId() {
19774
      return this.warehouseId;
19775
    }
19776
 
19777
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
19778
      this.warehouseId = warehouseId;
19779
      setWarehouseIdIsSet(true);
19780
      return this;
19781
    }
19782
 
19783
    public void unsetWarehouseId() {
19784
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19785
    }
19786
 
19787
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19788
    public boolean isSetWarehouseId() {
19789
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19790
    }
19791
 
19792
    public void setWarehouseIdIsSet(boolean value) {
19793
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19794
    }
19795
 
19796
    public long getProviderId() {
19797
      return this.providerId;
19798
    }
19799
 
19800
    public markOrdersAsManifested_args setProviderId(long providerId) {
19801
      this.providerId = providerId;
19802
      setProviderIdIsSet(true);
19803
      return this;
19804
    }
19805
 
19806
    public void unsetProviderId() {
19807
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
19808
    }
19809
 
19810
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
19811
    public boolean isSetProviderId() {
19812
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
19813
    }
19814
 
19815
    public void setProviderIdIsSet(boolean value) {
19816
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
19817
    }
19818
 
19819
    public void setFieldValue(_Fields field, Object value) {
19820
      switch (field) {
19821
      case WAREHOUSE_ID:
19822
        if (value == null) {
19823
          unsetWarehouseId();
19824
        } else {
19825
          setWarehouseId((Long)value);
19826
        }
19827
        break;
19828
 
19829
      case PROVIDER_ID:
19830
        if (value == null) {
19831
          unsetProviderId();
19832
        } else {
19833
          setProviderId((Long)value);
19834
        }
19835
        break;
19836
 
19837
      }
19838
    }
19839
 
19840
    public void setFieldValue(int fieldID, Object value) {
19841
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19842
    }
19843
 
19844
    public Object getFieldValue(_Fields field) {
19845
      switch (field) {
19846
      case WAREHOUSE_ID:
19847
        return new Long(getWarehouseId());
19848
 
19849
      case PROVIDER_ID:
19850
        return new Long(getProviderId());
19851
 
19852
      }
19853
      throw new IllegalStateException();
19854
    }
19855
 
19856
    public Object getFieldValue(int fieldId) {
19857
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19858
    }
19859
 
19860
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19861
    public boolean isSet(_Fields field) {
19862
      switch (field) {
19863
      case WAREHOUSE_ID:
19864
        return isSetWarehouseId();
19865
      case PROVIDER_ID:
19866
        return isSetProviderId();
19867
      }
19868
      throw new IllegalStateException();
19869
    }
19870
 
19871
    public boolean isSet(int fieldID) {
19872
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19873
    }
19874
 
19875
    @Override
19876
    public boolean equals(Object that) {
19877
      if (that == null)
19878
        return false;
19879
      if (that instanceof markOrdersAsManifested_args)
19880
        return this.equals((markOrdersAsManifested_args)that);
19881
      return false;
19882
    }
19883
 
19884
    public boolean equals(markOrdersAsManifested_args that) {
19885
      if (that == null)
19886
        return false;
19887
 
19888
      boolean this_present_warehouseId = true;
19889
      boolean that_present_warehouseId = true;
19890
      if (this_present_warehouseId || that_present_warehouseId) {
19891
        if (!(this_present_warehouseId && that_present_warehouseId))
19892
          return false;
19893
        if (this.warehouseId != that.warehouseId)
19894
          return false;
19895
      }
19896
 
19897
      boolean this_present_providerId = true;
19898
      boolean that_present_providerId = true;
19899
      if (this_present_providerId || that_present_providerId) {
19900
        if (!(this_present_providerId && that_present_providerId))
19901
          return false;
19902
        if (this.providerId != that.providerId)
19903
          return false;
19904
      }
19905
 
19906
      return true;
19907
    }
19908
 
19909
    @Override
19910
    public int hashCode() {
19911
      return 0;
19912
    }
19913
 
19914
    public int compareTo(markOrdersAsManifested_args other) {
19915
      if (!getClass().equals(other.getClass())) {
19916
        return getClass().getName().compareTo(other.getClass().getName());
19917
      }
19918
 
19919
      int lastComparison = 0;
19920
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
19921
 
19922
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19923
      if (lastComparison != 0) {
19924
        return lastComparison;
19925
      }
19926
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19927
      if (lastComparison != 0) {
19928
        return lastComparison;
19929
      }
19930
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
19931
      if (lastComparison != 0) {
19932
        return lastComparison;
19933
      }
19934
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
19935
      if (lastComparison != 0) {
19936
        return lastComparison;
19937
      }
19938
      return 0;
19939
    }
19940
 
19941
    public void read(TProtocol iprot) throws TException {
19942
      TField field;
19943
      iprot.readStructBegin();
19944
      while (true)
19945
      {
19946
        field = iprot.readFieldBegin();
19947
        if (field.type == TType.STOP) { 
19948
          break;
19949
        }
19950
        _Fields fieldId = _Fields.findByThriftId(field.id);
19951
        if (fieldId == null) {
19952
          TProtocolUtil.skip(iprot, field.type);
19953
        } else {
19954
          switch (fieldId) {
19955
            case WAREHOUSE_ID:
19956
              if (field.type == TType.I64) {
19957
                this.warehouseId = iprot.readI64();
19958
                setWarehouseIdIsSet(true);
19959
              } else { 
19960
                TProtocolUtil.skip(iprot, field.type);
19961
              }
19962
              break;
19963
            case PROVIDER_ID:
19964
              if (field.type == TType.I64) {
19965
                this.providerId = iprot.readI64();
19966
                setProviderIdIsSet(true);
19967
              } else { 
19968
                TProtocolUtil.skip(iprot, field.type);
19969
              }
19970
              break;
19971
          }
19972
          iprot.readFieldEnd();
19973
        }
19974
      }
19975
      iprot.readStructEnd();
19976
      validate();
19977
    }
19978
 
19979
    public void write(TProtocol oprot) throws TException {
19980
      validate();
19981
 
19982
      oprot.writeStructBegin(STRUCT_DESC);
19983
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19984
      oprot.writeI64(this.warehouseId);
19985
      oprot.writeFieldEnd();
19986
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
19987
      oprot.writeI64(this.providerId);
19988
      oprot.writeFieldEnd();
19989
      oprot.writeFieldStop();
19990
      oprot.writeStructEnd();
19991
    }
19992
 
19993
    @Override
19994
    public String toString() {
19995
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
19996
      boolean first = true;
19997
 
19998
      sb.append("warehouseId:");
19999
      sb.append(this.warehouseId);
20000
      first = false;
20001
      if (!first) sb.append(", ");
20002
      sb.append("providerId:");
20003
      sb.append(this.providerId);
20004
      first = false;
20005
      sb.append(")");
20006
      return sb.toString();
20007
    }
20008
 
20009
    public void validate() throws TException {
20010
      // check for required fields
20011
    }
20012
 
20013
  }
20014
 
20015
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
20016
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
20017
 
20018
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20019
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20020
 
20021
    private boolean success;
20022
    private TransactionServiceException ex;
20023
 
20024
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20025
    public enum _Fields implements TFieldIdEnum {
20026
      SUCCESS((short)0, "success"),
20027
      EX((short)1, "ex");
20028
 
20029
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20030
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20031
 
20032
      static {
20033
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20034
          byId.put((int)field._thriftId, field);
20035
          byName.put(field.getFieldName(), field);
20036
        }
20037
      }
20038
 
20039
      /**
20040
       * Find the _Fields constant that matches fieldId, or null if its not found.
20041
       */
20042
      public static _Fields findByThriftId(int fieldId) {
20043
        return byId.get(fieldId);
20044
      }
20045
 
20046
      /**
20047
       * Find the _Fields constant that matches fieldId, throwing an exception
20048
       * if it is not found.
20049
       */
20050
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20051
        _Fields fields = findByThriftId(fieldId);
20052
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20053
        return fields;
20054
      }
20055
 
20056
      /**
20057
       * Find the _Fields constant that matches name, or null if its not found.
20058
       */
20059
      public static _Fields findByName(String name) {
20060
        return byName.get(name);
20061
      }
20062
 
20063
      private final short _thriftId;
20064
      private final String _fieldName;
20065
 
20066
      _Fields(short thriftId, String fieldName) {
20067
        _thriftId = thriftId;
20068
        _fieldName = fieldName;
20069
      }
20070
 
20071
      public short getThriftFieldId() {
20072
        return _thriftId;
20073
      }
20074
 
20075
      public String getFieldName() {
20076
        return _fieldName;
20077
      }
20078
    }
20079
 
20080
    // isset id assignments
20081
    private static final int __SUCCESS_ISSET_ID = 0;
20082
    private BitSet __isset_bit_vector = new BitSet(1);
20083
 
20084
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20085
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20086
          new FieldValueMetaData(TType.BOOL)));
20087
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20088
          new FieldValueMetaData(TType.STRUCT)));
20089
    }});
20090
 
20091
    static {
20092
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
20093
    }
20094
 
20095
    public markOrdersAsManifested_result() {
20096
    }
20097
 
20098
    public markOrdersAsManifested_result(
20099
      boolean success,
20100
      TransactionServiceException ex)
20101
    {
20102
      this();
20103
      this.success = success;
20104
      setSuccessIsSet(true);
20105
      this.ex = ex;
20106
    }
20107
 
20108
    /**
20109
     * Performs a deep copy on <i>other</i>.
20110
     */
20111
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
20112
      __isset_bit_vector.clear();
20113
      __isset_bit_vector.or(other.__isset_bit_vector);
20114
      this.success = other.success;
20115
      if (other.isSetEx()) {
20116
        this.ex = new TransactionServiceException(other.ex);
20117
      }
20118
    }
20119
 
20120
    public markOrdersAsManifested_result deepCopy() {
20121
      return new markOrdersAsManifested_result(this);
20122
    }
20123
 
20124
    @Deprecated
20125
    public markOrdersAsManifested_result clone() {
20126
      return new markOrdersAsManifested_result(this);
20127
    }
20128
 
20129
    public boolean isSuccess() {
20130
      return this.success;
20131
    }
20132
 
20133
    public markOrdersAsManifested_result setSuccess(boolean success) {
20134
      this.success = success;
20135
      setSuccessIsSet(true);
20136
      return this;
20137
    }
20138
 
20139
    public void unsetSuccess() {
20140
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20141
    }
20142
 
20143
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20144
    public boolean isSetSuccess() {
20145
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20146
    }
20147
 
20148
    public void setSuccessIsSet(boolean value) {
20149
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20150
    }
20151
 
20152
    public TransactionServiceException getEx() {
20153
      return this.ex;
20154
    }
20155
 
20156
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
20157
      this.ex = ex;
20158
      return this;
20159
    }
20160
 
20161
    public void unsetEx() {
20162
      this.ex = null;
20163
    }
20164
 
20165
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20166
    public boolean isSetEx() {
20167
      return this.ex != null;
20168
    }
20169
 
20170
    public void setExIsSet(boolean value) {
20171
      if (!value) {
20172
        this.ex = null;
20173
      }
20174
    }
20175
 
20176
    public void setFieldValue(_Fields field, Object value) {
20177
      switch (field) {
20178
      case SUCCESS:
20179
        if (value == null) {
20180
          unsetSuccess();
20181
        } else {
20182
          setSuccess((Boolean)value);
20183
        }
20184
        break;
20185
 
20186
      case EX:
20187
        if (value == null) {
20188
          unsetEx();
20189
        } else {
20190
          setEx((TransactionServiceException)value);
20191
        }
20192
        break;
20193
 
20194
      }
20195
    }
20196
 
20197
    public void setFieldValue(int fieldID, Object value) {
20198
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20199
    }
20200
 
20201
    public Object getFieldValue(_Fields field) {
20202
      switch (field) {
20203
      case SUCCESS:
20204
        return new Boolean(isSuccess());
20205
 
20206
      case EX:
20207
        return getEx();
20208
 
20209
      }
20210
      throw new IllegalStateException();
20211
    }
20212
 
20213
    public Object getFieldValue(int fieldId) {
20214
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20215
    }
20216
 
20217
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20218
    public boolean isSet(_Fields field) {
20219
      switch (field) {
20220
      case SUCCESS:
20221
        return isSetSuccess();
20222
      case EX:
20223
        return isSetEx();
20224
      }
20225
      throw new IllegalStateException();
20226
    }
20227
 
20228
    public boolean isSet(int fieldID) {
20229
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20230
    }
20231
 
20232
    @Override
20233
    public boolean equals(Object that) {
20234
      if (that == null)
20235
        return false;
20236
      if (that instanceof markOrdersAsManifested_result)
20237
        return this.equals((markOrdersAsManifested_result)that);
20238
      return false;
20239
    }
20240
 
20241
    public boolean equals(markOrdersAsManifested_result that) {
20242
      if (that == null)
20243
        return false;
20244
 
20245
      boolean this_present_success = true;
20246
      boolean that_present_success = true;
20247
      if (this_present_success || that_present_success) {
20248
        if (!(this_present_success && that_present_success))
20249
          return false;
20250
        if (this.success != that.success)
20251
          return false;
20252
      }
20253
 
20254
      boolean this_present_ex = true && this.isSetEx();
20255
      boolean that_present_ex = true && that.isSetEx();
20256
      if (this_present_ex || that_present_ex) {
20257
        if (!(this_present_ex && that_present_ex))
20258
          return false;
20259
        if (!this.ex.equals(that.ex))
20260
          return false;
20261
      }
20262
 
20263
      return true;
20264
    }
20265
 
20266
    @Override
20267
    public int hashCode() {
20268
      return 0;
20269
    }
20270
 
20271
    public int compareTo(markOrdersAsManifested_result other) {
20272
      if (!getClass().equals(other.getClass())) {
20273
        return getClass().getName().compareTo(other.getClass().getName());
20274
      }
20275
 
20276
      int lastComparison = 0;
20277
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
20278
 
20279
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20280
      if (lastComparison != 0) {
20281
        return lastComparison;
20282
      }
20283
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20284
      if (lastComparison != 0) {
20285
        return lastComparison;
20286
      }
20287
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20288
      if (lastComparison != 0) {
20289
        return lastComparison;
20290
      }
20291
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20292
      if (lastComparison != 0) {
20293
        return lastComparison;
20294
      }
20295
      return 0;
20296
    }
20297
 
20298
    public void read(TProtocol iprot) throws TException {
20299
      TField field;
20300
      iprot.readStructBegin();
20301
      while (true)
20302
      {
20303
        field = iprot.readFieldBegin();
20304
        if (field.type == TType.STOP) { 
20305
          break;
20306
        }
20307
        _Fields fieldId = _Fields.findByThriftId(field.id);
20308
        if (fieldId == null) {
20309
          TProtocolUtil.skip(iprot, field.type);
20310
        } else {
20311
          switch (fieldId) {
20312
            case SUCCESS:
20313
              if (field.type == TType.BOOL) {
20314
                this.success = iprot.readBool();
20315
                setSuccessIsSet(true);
20316
              } else { 
20317
                TProtocolUtil.skip(iprot, field.type);
20318
              }
20319
              break;
20320
            case EX:
20321
              if (field.type == TType.STRUCT) {
20322
                this.ex = new TransactionServiceException();
20323
                this.ex.read(iprot);
20324
              } else { 
20325
                TProtocolUtil.skip(iprot, field.type);
20326
              }
20327
              break;
20328
          }
20329
          iprot.readFieldEnd();
20330
        }
20331
      }
20332
      iprot.readStructEnd();
20333
      validate();
20334
    }
20335
 
20336
    public void write(TProtocol oprot) throws TException {
20337
      oprot.writeStructBegin(STRUCT_DESC);
20338
 
20339
      if (this.isSetSuccess()) {
20340
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20341
        oprot.writeBool(this.success);
20342
        oprot.writeFieldEnd();
20343
      } else if (this.isSetEx()) {
20344
        oprot.writeFieldBegin(EX_FIELD_DESC);
20345
        this.ex.write(oprot);
20346
        oprot.writeFieldEnd();
20347
      }
20348
      oprot.writeFieldStop();
20349
      oprot.writeStructEnd();
20350
    }
20351
 
20352
    @Override
20353
    public String toString() {
20354
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
20355
      boolean first = true;
20356
 
20357
      sb.append("success:");
20358
      sb.append(this.success);
20359
      first = false;
20360
      if (!first) sb.append(", ");
20361
      sb.append("ex:");
20362
      if (this.ex == null) {
20363
        sb.append("null");
20364
      } else {
20365
        sb.append(this.ex);
20366
      }
20367
      first = false;
20368
      sb.append(")");
20369
      return sb.toString();
20370
    }
20371
 
20372
    public void validate() throws TException {
20373
      // check for required fields
20374
    }
20375
 
20376
  }
20377
 
1114 chandransh 20378
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
20379
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
20380
 
20381
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
20382
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
20383
 
20384
    private long providerId;
1245 chandransh 20385
    private Map<String,String> pickupDetails;
1114 chandransh 20386
 
20387
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20388
    public enum _Fields implements TFieldIdEnum {
20389
      PROVIDER_ID((short)1, "providerId"),
20390
      PICKUP_DETAILS((short)2, "pickupDetails");
20391
 
20392
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20393
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20394
 
20395
      static {
20396
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20397
          byId.put((int)field._thriftId, field);
20398
          byName.put(field.getFieldName(), field);
20399
        }
20400
      }
20401
 
20402
      /**
20403
       * Find the _Fields constant that matches fieldId, or null if its not found.
20404
       */
20405
      public static _Fields findByThriftId(int fieldId) {
20406
        return byId.get(fieldId);
20407
      }
20408
 
20409
      /**
20410
       * Find the _Fields constant that matches fieldId, throwing an exception
20411
       * if it is not found.
20412
       */
20413
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20414
        _Fields fields = findByThriftId(fieldId);
20415
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20416
        return fields;
20417
      }
20418
 
20419
      /**
20420
       * Find the _Fields constant that matches name, or null if its not found.
20421
       */
20422
      public static _Fields findByName(String name) {
20423
        return byName.get(name);
20424
      }
20425
 
20426
      private final short _thriftId;
20427
      private final String _fieldName;
20428
 
20429
      _Fields(short thriftId, String fieldName) {
20430
        _thriftId = thriftId;
20431
        _fieldName = fieldName;
20432
      }
20433
 
20434
      public short getThriftFieldId() {
20435
        return _thriftId;
20436
      }
20437
 
20438
      public String getFieldName() {
20439
        return _fieldName;
20440
      }
20441
    }
20442
 
20443
    // isset id assignments
20444
    private static final int __PROVIDERID_ISSET_ID = 0;
20445
    private BitSet __isset_bit_vector = new BitSet(1);
20446
 
20447
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20448
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20449
          new FieldValueMetaData(TType.I64)));
20450
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
20451
          new MapMetaData(TType.MAP, 
20452
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 20453
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 20454
    }});
20455
 
20456
    static {
20457
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
20458
    }
20459
 
20460
    public markOrdersAsPickedUp_args() {
20461
    }
20462
 
20463
    public markOrdersAsPickedUp_args(
20464
      long providerId,
1245 chandransh 20465
      Map<String,String> pickupDetails)
1114 chandransh 20466
    {
20467
      this();
20468
      this.providerId = providerId;
20469
      setProviderIdIsSet(true);
20470
      this.pickupDetails = pickupDetails;
20471
    }
20472
 
20473
    /**
20474
     * Performs a deep copy on <i>other</i>.
20475
     */
20476
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
20477
      __isset_bit_vector.clear();
20478
      __isset_bit_vector.or(other.__isset_bit_vector);
20479
      this.providerId = other.providerId;
20480
      if (other.isSetPickupDetails()) {
1245 chandransh 20481
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
20482
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 20483
 
20484
          String other_element_key = other_element.getKey();
1245 chandransh 20485
          String other_element_value = other_element.getValue();
1114 chandransh 20486
 
20487
          String __this__pickupDetails_copy_key = other_element_key;
20488
 
1245 chandransh 20489
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 20490
 
20491
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
20492
        }
20493
        this.pickupDetails = __this__pickupDetails;
20494
      }
20495
    }
20496
 
20497
    public markOrdersAsPickedUp_args deepCopy() {
20498
      return new markOrdersAsPickedUp_args(this);
20499
    }
20500
 
20501
    @Deprecated
20502
    public markOrdersAsPickedUp_args clone() {
20503
      return new markOrdersAsPickedUp_args(this);
20504
    }
20505
 
20506
    public long getProviderId() {
20507
      return this.providerId;
20508
    }
20509
 
20510
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
20511
      this.providerId = providerId;
20512
      setProviderIdIsSet(true);
20513
      return this;
20514
    }
20515
 
20516
    public void unsetProviderId() {
20517
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20518
    }
20519
 
20520
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20521
    public boolean isSetProviderId() {
20522
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20523
    }
20524
 
20525
    public void setProviderIdIsSet(boolean value) {
20526
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20527
    }
20528
 
20529
    public int getPickupDetailsSize() {
20530
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
20531
    }
20532
 
1245 chandransh 20533
    public void putToPickupDetails(String key, String val) {
1114 chandransh 20534
      if (this.pickupDetails == null) {
1245 chandransh 20535
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 20536
      }
20537
      this.pickupDetails.put(key, val);
20538
    }
20539
 
1245 chandransh 20540
    public Map<String,String> getPickupDetails() {
1114 chandransh 20541
      return this.pickupDetails;
20542
    }
20543
 
1245 chandransh 20544
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 20545
      this.pickupDetails = pickupDetails;
20546
      return this;
20547
    }
20548
 
20549
    public void unsetPickupDetails() {
20550
      this.pickupDetails = null;
20551
    }
20552
 
20553
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
20554
    public boolean isSetPickupDetails() {
20555
      return this.pickupDetails != null;
20556
    }
20557
 
20558
    public void setPickupDetailsIsSet(boolean value) {
20559
      if (!value) {
20560
        this.pickupDetails = null;
20561
      }
20562
    }
20563
 
20564
    public void setFieldValue(_Fields field, Object value) {
20565
      switch (field) {
20566
      case PROVIDER_ID:
20567
        if (value == null) {
20568
          unsetProviderId();
20569
        } else {
20570
          setProviderId((Long)value);
20571
        }
20572
        break;
20573
 
20574
      case PICKUP_DETAILS:
20575
        if (value == null) {
20576
          unsetPickupDetails();
20577
        } else {
1245 chandransh 20578
          setPickupDetails((Map<String,String>)value);
1114 chandransh 20579
        }
20580
        break;
20581
 
20582
      }
20583
    }
20584
 
20585
    public void setFieldValue(int fieldID, Object value) {
20586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20587
    }
20588
 
20589
    public Object getFieldValue(_Fields field) {
20590
      switch (field) {
20591
      case PROVIDER_ID:
20592
        return new Long(getProviderId());
20593
 
20594
      case PICKUP_DETAILS:
20595
        return getPickupDetails();
20596
 
20597
      }
20598
      throw new IllegalStateException();
20599
    }
20600
 
20601
    public Object getFieldValue(int fieldId) {
20602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20603
    }
20604
 
20605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20606
    public boolean isSet(_Fields field) {
20607
      switch (field) {
20608
      case PROVIDER_ID:
20609
        return isSetProviderId();
20610
      case PICKUP_DETAILS:
20611
        return isSetPickupDetails();
20612
      }
20613
      throw new IllegalStateException();
20614
    }
20615
 
20616
    public boolean isSet(int fieldID) {
20617
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20618
    }
20619
 
20620
    @Override
20621
    public boolean equals(Object that) {
20622
      if (that == null)
20623
        return false;
20624
      if (that instanceof markOrdersAsPickedUp_args)
20625
        return this.equals((markOrdersAsPickedUp_args)that);
20626
      return false;
20627
    }
20628
 
20629
    public boolean equals(markOrdersAsPickedUp_args that) {
20630
      if (that == null)
20631
        return false;
20632
 
20633
      boolean this_present_providerId = true;
20634
      boolean that_present_providerId = true;
20635
      if (this_present_providerId || that_present_providerId) {
20636
        if (!(this_present_providerId && that_present_providerId))
20637
          return false;
20638
        if (this.providerId != that.providerId)
20639
          return false;
20640
      }
20641
 
20642
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
20643
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
20644
      if (this_present_pickupDetails || that_present_pickupDetails) {
20645
        if (!(this_present_pickupDetails && that_present_pickupDetails))
20646
          return false;
20647
        if (!this.pickupDetails.equals(that.pickupDetails))
20648
          return false;
20649
      }
20650
 
20651
      return true;
20652
    }
20653
 
20654
    @Override
20655
    public int hashCode() {
20656
      return 0;
20657
    }
20658
 
20659
    public void read(TProtocol iprot) throws TException {
20660
      TField field;
20661
      iprot.readStructBegin();
20662
      while (true)
20663
      {
20664
        field = iprot.readFieldBegin();
20665
        if (field.type == TType.STOP) { 
20666
          break;
20667
        }
20668
        _Fields fieldId = _Fields.findByThriftId(field.id);
20669
        if (fieldId == null) {
20670
          TProtocolUtil.skip(iprot, field.type);
20671
        } else {
20672
          switch (fieldId) {
20673
            case PROVIDER_ID:
20674
              if (field.type == TType.I64) {
20675
                this.providerId = iprot.readI64();
20676
                setProviderIdIsSet(true);
20677
              } else { 
20678
                TProtocolUtil.skip(iprot, field.type);
20679
              }
20680
              break;
20681
            case PICKUP_DETAILS:
20682
              if (field.type == TType.MAP) {
20683
                {
1382 varun.gupt 20684
                  TMap _map48 = iprot.readMapBegin();
20685
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
20686
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 20687
                  {
1382 varun.gupt 20688
                    String _key50;
20689
                    String _val51;
20690
                    _key50 = iprot.readString();
20691
                    _val51 = iprot.readString();
20692
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 20693
                  }
20694
                  iprot.readMapEnd();
20695
                }
20696
              } else { 
20697
                TProtocolUtil.skip(iprot, field.type);
20698
              }
20699
              break;
20700
          }
20701
          iprot.readFieldEnd();
20702
        }
20703
      }
20704
      iprot.readStructEnd();
20705
      validate();
20706
    }
20707
 
20708
    public void write(TProtocol oprot) throws TException {
20709
      validate();
20710
 
20711
      oprot.writeStructBegin(STRUCT_DESC);
20712
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
20713
      oprot.writeI64(this.providerId);
20714
      oprot.writeFieldEnd();
20715
      if (this.pickupDetails != null) {
20716
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
20717
        {
1245 chandransh 20718
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 20719
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 20720
          {
1382 varun.gupt 20721
            oprot.writeString(_iter52.getKey());
20722
            oprot.writeString(_iter52.getValue());
1114 chandransh 20723
          }
20724
          oprot.writeMapEnd();
20725
        }
20726
        oprot.writeFieldEnd();
20727
      }
20728
      oprot.writeFieldStop();
20729
      oprot.writeStructEnd();
20730
    }
20731
 
20732
    @Override
20733
    public String toString() {
20734
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
20735
      boolean first = true;
20736
 
20737
      sb.append("providerId:");
20738
      sb.append(this.providerId);
20739
      first = false;
20740
      if (!first) sb.append(", ");
20741
      sb.append("pickupDetails:");
20742
      if (this.pickupDetails == null) {
20743
        sb.append("null");
20744
      } else {
20745
        sb.append(this.pickupDetails);
20746
      }
20747
      first = false;
20748
      sb.append(")");
20749
      return sb.toString();
20750
    }
20751
 
20752
    public void validate() throws TException {
20753
      // check for required fields
20754
    }
20755
 
20756
  }
20757
 
20758
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
20759
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
20760
 
20761
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20762
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20763
 
20764
    private List<Order> success;
20765
    private TransactionServiceException ex;
20766
 
20767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20768
    public enum _Fields implements TFieldIdEnum {
20769
      SUCCESS((short)0, "success"),
20770
      EX((short)1, "ex");
20771
 
20772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20774
 
20775
      static {
20776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20777
          byId.put((int)field._thriftId, field);
20778
          byName.put(field.getFieldName(), field);
20779
        }
20780
      }
20781
 
20782
      /**
20783
       * Find the _Fields constant that matches fieldId, or null if its not found.
20784
       */
20785
      public static _Fields findByThriftId(int fieldId) {
20786
        return byId.get(fieldId);
20787
      }
20788
 
20789
      /**
20790
       * Find the _Fields constant that matches fieldId, throwing an exception
20791
       * if it is not found.
20792
       */
20793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20794
        _Fields fields = findByThriftId(fieldId);
20795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20796
        return fields;
20797
      }
20798
 
20799
      /**
20800
       * Find the _Fields constant that matches name, or null if its not found.
20801
       */
20802
      public static _Fields findByName(String name) {
20803
        return byName.get(name);
20804
      }
20805
 
20806
      private final short _thriftId;
20807
      private final String _fieldName;
20808
 
20809
      _Fields(short thriftId, String fieldName) {
20810
        _thriftId = thriftId;
20811
        _fieldName = fieldName;
20812
      }
20813
 
20814
      public short getThriftFieldId() {
20815
        return _thriftId;
20816
      }
20817
 
20818
      public String getFieldName() {
20819
        return _fieldName;
20820
      }
20821
    }
20822
 
20823
    // isset id assignments
20824
 
20825
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20826
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20827
          new ListMetaData(TType.LIST, 
20828
              new StructMetaData(TType.STRUCT, Order.class))));
20829
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20830
          new FieldValueMetaData(TType.STRUCT)));
20831
    }});
20832
 
20833
    static {
20834
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
20835
    }
20836
 
20837
    public markOrdersAsPickedUp_result() {
20838
    }
20839
 
20840
    public markOrdersAsPickedUp_result(
20841
      List<Order> success,
20842
      TransactionServiceException ex)
20843
    {
20844
      this();
20845
      this.success = success;
20846
      this.ex = ex;
20847
    }
20848
 
20849
    /**
20850
     * Performs a deep copy on <i>other</i>.
20851
     */
20852
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
20853
      if (other.isSetSuccess()) {
20854
        List<Order> __this__success = new ArrayList<Order>();
20855
        for (Order other_element : other.success) {
20856
          __this__success.add(new Order(other_element));
20857
        }
20858
        this.success = __this__success;
20859
      }
20860
      if (other.isSetEx()) {
20861
        this.ex = new TransactionServiceException(other.ex);
20862
      }
20863
    }
20864
 
20865
    public markOrdersAsPickedUp_result deepCopy() {
20866
      return new markOrdersAsPickedUp_result(this);
20867
    }
20868
 
20869
    @Deprecated
20870
    public markOrdersAsPickedUp_result clone() {
20871
      return new markOrdersAsPickedUp_result(this);
20872
    }
20873
 
20874
    public int getSuccessSize() {
20875
      return (this.success == null) ? 0 : this.success.size();
20876
    }
20877
 
20878
    public java.util.Iterator<Order> getSuccessIterator() {
20879
      return (this.success == null) ? null : this.success.iterator();
20880
    }
20881
 
20882
    public void addToSuccess(Order elem) {
20883
      if (this.success == null) {
20884
        this.success = new ArrayList<Order>();
20885
      }
20886
      this.success.add(elem);
20887
    }
20888
 
20889
    public List<Order> getSuccess() {
20890
      return this.success;
20891
    }
20892
 
20893
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
20894
      this.success = success;
20895
      return this;
20896
    }
20897
 
20898
    public void unsetSuccess() {
20899
      this.success = null;
20900
    }
20901
 
20902
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20903
    public boolean isSetSuccess() {
20904
      return this.success != null;
20905
    }
20906
 
20907
    public void setSuccessIsSet(boolean value) {
20908
      if (!value) {
20909
        this.success = null;
20910
      }
20911
    }
20912
 
20913
    public TransactionServiceException getEx() {
20914
      return this.ex;
20915
    }
20916
 
20917
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
20918
      this.ex = ex;
20919
      return this;
20920
    }
20921
 
20922
    public void unsetEx() {
20923
      this.ex = null;
20924
    }
20925
 
20926
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20927
    public boolean isSetEx() {
20928
      return this.ex != null;
20929
    }
20930
 
20931
    public void setExIsSet(boolean value) {
20932
      if (!value) {
20933
        this.ex = null;
20934
      }
20935
    }
20936
 
20937
    public void setFieldValue(_Fields field, Object value) {
20938
      switch (field) {
20939
      case SUCCESS:
20940
        if (value == null) {
20941
          unsetSuccess();
20942
        } else {
20943
          setSuccess((List<Order>)value);
20944
        }
20945
        break;
20946
 
20947
      case EX:
20948
        if (value == null) {
20949
          unsetEx();
20950
        } else {
20951
          setEx((TransactionServiceException)value);
20952
        }
20953
        break;
20954
 
20955
      }
20956
    }
20957
 
20958
    public void setFieldValue(int fieldID, Object value) {
20959
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20960
    }
20961
 
20962
    public Object getFieldValue(_Fields field) {
20963
      switch (field) {
20964
      case SUCCESS:
20965
        return getSuccess();
20966
 
20967
      case EX:
20968
        return getEx();
20969
 
20970
      }
20971
      throw new IllegalStateException();
20972
    }
20973
 
20974
    public Object getFieldValue(int fieldId) {
20975
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20976
    }
20977
 
20978
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20979
    public boolean isSet(_Fields field) {
20980
      switch (field) {
20981
      case SUCCESS:
20982
        return isSetSuccess();
20983
      case EX:
20984
        return isSetEx();
20985
      }
20986
      throw new IllegalStateException();
20987
    }
20988
 
20989
    public boolean isSet(int fieldID) {
20990
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20991
    }
20992
 
20993
    @Override
20994
    public boolean equals(Object that) {
20995
      if (that == null)
20996
        return false;
20997
      if (that instanceof markOrdersAsPickedUp_result)
20998
        return this.equals((markOrdersAsPickedUp_result)that);
20999
      return false;
21000
    }
21001
 
21002
    public boolean equals(markOrdersAsPickedUp_result that) {
21003
      if (that == null)
21004
        return false;
21005
 
21006
      boolean this_present_success = true && this.isSetSuccess();
21007
      boolean that_present_success = true && that.isSetSuccess();
21008
      if (this_present_success || that_present_success) {
21009
        if (!(this_present_success && that_present_success))
21010
          return false;
21011
        if (!this.success.equals(that.success))
21012
          return false;
21013
      }
21014
 
21015
      boolean this_present_ex = true && this.isSetEx();
21016
      boolean that_present_ex = true && that.isSetEx();
21017
      if (this_present_ex || that_present_ex) {
21018
        if (!(this_present_ex && that_present_ex))
21019
          return false;
21020
        if (!this.ex.equals(that.ex))
21021
          return false;
21022
      }
21023
 
21024
      return true;
21025
    }
21026
 
21027
    @Override
21028
    public int hashCode() {
21029
      return 0;
21030
    }
21031
 
21032
    public int compareTo(markOrdersAsPickedUp_result other) {
21033
      if (!getClass().equals(other.getClass())) {
21034
        return getClass().getName().compareTo(other.getClass().getName());
21035
      }
21036
 
21037
      int lastComparison = 0;
21038
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
21039
 
21040
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21041
      if (lastComparison != 0) {
21042
        return lastComparison;
21043
      }
21044
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21045
      if (lastComparison != 0) {
21046
        return lastComparison;
21047
      }
21048
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21049
      if (lastComparison != 0) {
21050
        return lastComparison;
21051
      }
21052
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21053
      if (lastComparison != 0) {
21054
        return lastComparison;
21055
      }
21056
      return 0;
21057
    }
21058
 
21059
    public void read(TProtocol iprot) throws TException {
21060
      TField field;
21061
      iprot.readStructBegin();
21062
      while (true)
21063
      {
21064
        field = iprot.readFieldBegin();
21065
        if (field.type == TType.STOP) { 
21066
          break;
21067
        }
21068
        _Fields fieldId = _Fields.findByThriftId(field.id);
21069
        if (fieldId == null) {
21070
          TProtocolUtil.skip(iprot, field.type);
21071
        } else {
21072
          switch (fieldId) {
21073
            case SUCCESS:
21074
              if (field.type == TType.LIST) {
21075
                {
1382 varun.gupt 21076
                  TList _list53 = iprot.readListBegin();
21077
                  this.success = new ArrayList<Order>(_list53.size);
21078
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 21079
                  {
1382 varun.gupt 21080
                    Order _elem55;
21081
                    _elem55 = new Order();
21082
                    _elem55.read(iprot);
21083
                    this.success.add(_elem55);
1114 chandransh 21084
                  }
21085
                  iprot.readListEnd();
21086
                }
21087
              } else { 
21088
                TProtocolUtil.skip(iprot, field.type);
21089
              }
21090
              break;
21091
            case EX:
21092
              if (field.type == TType.STRUCT) {
21093
                this.ex = new TransactionServiceException();
21094
                this.ex.read(iprot);
21095
              } else { 
21096
                TProtocolUtil.skip(iprot, field.type);
21097
              }
21098
              break;
21099
          }
21100
          iprot.readFieldEnd();
21101
        }
21102
      }
21103
      iprot.readStructEnd();
21104
      validate();
21105
    }
21106
 
21107
    public void write(TProtocol oprot) throws TException {
21108
      oprot.writeStructBegin(STRUCT_DESC);
21109
 
21110
      if (this.isSetSuccess()) {
21111
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21112
        {
21113
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 21114
          for (Order _iter56 : this.success)
1114 chandransh 21115
          {
1382 varun.gupt 21116
            _iter56.write(oprot);
1114 chandransh 21117
          }
21118
          oprot.writeListEnd();
21119
        }
21120
        oprot.writeFieldEnd();
21121
      } else if (this.isSetEx()) {
21122
        oprot.writeFieldBegin(EX_FIELD_DESC);
21123
        this.ex.write(oprot);
21124
        oprot.writeFieldEnd();
21125
      }
21126
      oprot.writeFieldStop();
21127
      oprot.writeStructEnd();
21128
    }
21129
 
21130
    @Override
21131
    public String toString() {
21132
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
21133
      boolean first = true;
21134
 
21135
      sb.append("success:");
21136
      if (this.success == null) {
21137
        sb.append("null");
21138
      } else {
21139
        sb.append(this.success);
21140
      }
21141
      first = false;
21142
      if (!first) sb.append(", ");
21143
      sb.append("ex:");
21144
      if (this.ex == null) {
21145
        sb.append("null");
21146
      } else {
21147
        sb.append(this.ex);
21148
      }
21149
      first = false;
21150
      sb.append(")");
21151
      return sb.toString();
21152
    }
21153
 
21154
    public void validate() throws TException {
21155
      // check for required fields
21156
    }
21157
 
21158
  }
21159
 
1133 chandransh 21160
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
21161
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
21162
 
21163
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21164
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
21165
 
21166
    private long providerId;
21167
    private Map<String,String> deliveredOrders;
21168
 
21169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21170
    public enum _Fields implements TFieldIdEnum {
21171
      PROVIDER_ID((short)1, "providerId"),
21172
      DELIVERED_ORDERS((short)2, "deliveredOrders");
21173
 
21174
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21175
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21176
 
21177
      static {
21178
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21179
          byId.put((int)field._thriftId, field);
21180
          byName.put(field.getFieldName(), field);
21181
        }
21182
      }
21183
 
21184
      /**
21185
       * Find the _Fields constant that matches fieldId, or null if its not found.
21186
       */
21187
      public static _Fields findByThriftId(int fieldId) {
21188
        return byId.get(fieldId);
21189
      }
21190
 
21191
      /**
21192
       * Find the _Fields constant that matches fieldId, throwing an exception
21193
       * if it is not found.
21194
       */
21195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21196
        _Fields fields = findByThriftId(fieldId);
21197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21198
        return fields;
21199
      }
21200
 
21201
      /**
21202
       * Find the _Fields constant that matches name, or null if its not found.
21203
       */
21204
      public static _Fields findByName(String name) {
21205
        return byName.get(name);
21206
      }
21207
 
21208
      private final short _thriftId;
21209
      private final String _fieldName;
21210
 
21211
      _Fields(short thriftId, String fieldName) {
21212
        _thriftId = thriftId;
21213
        _fieldName = fieldName;
21214
      }
21215
 
21216
      public short getThriftFieldId() {
21217
        return _thriftId;
21218
      }
21219
 
21220
      public String getFieldName() {
21221
        return _fieldName;
21222
      }
21223
    }
21224
 
21225
    // isset id assignments
21226
    private static final int __PROVIDERID_ISSET_ID = 0;
21227
    private BitSet __isset_bit_vector = new BitSet(1);
21228
 
21229
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21230
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21231
          new FieldValueMetaData(TType.I64)));
21232
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
21233
          new MapMetaData(TType.MAP, 
21234
              new FieldValueMetaData(TType.STRING), 
21235
              new FieldValueMetaData(TType.STRING))));
21236
    }});
21237
 
21238
    static {
21239
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
21240
    }
21241
 
21242
    public markOrdersAsDelivered_args() {
21243
    }
21244
 
21245
    public markOrdersAsDelivered_args(
21246
      long providerId,
21247
      Map<String,String> deliveredOrders)
21248
    {
21249
      this();
21250
      this.providerId = providerId;
21251
      setProviderIdIsSet(true);
21252
      this.deliveredOrders = deliveredOrders;
21253
    }
21254
 
21255
    /**
21256
     * Performs a deep copy on <i>other</i>.
21257
     */
21258
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
21259
      __isset_bit_vector.clear();
21260
      __isset_bit_vector.or(other.__isset_bit_vector);
21261
      this.providerId = other.providerId;
21262
      if (other.isSetDeliveredOrders()) {
21263
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
21264
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
21265
 
21266
          String other_element_key = other_element.getKey();
21267
          String other_element_value = other_element.getValue();
21268
 
21269
          String __this__deliveredOrders_copy_key = other_element_key;
21270
 
21271
          String __this__deliveredOrders_copy_value = other_element_value;
21272
 
21273
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
21274
        }
21275
        this.deliveredOrders = __this__deliveredOrders;
21276
      }
21277
    }
21278
 
21279
    public markOrdersAsDelivered_args deepCopy() {
21280
      return new markOrdersAsDelivered_args(this);
21281
    }
21282
 
21283
    @Deprecated
21284
    public markOrdersAsDelivered_args clone() {
21285
      return new markOrdersAsDelivered_args(this);
21286
    }
21287
 
21288
    public long getProviderId() {
21289
      return this.providerId;
21290
    }
21291
 
21292
    public markOrdersAsDelivered_args setProviderId(long providerId) {
21293
      this.providerId = providerId;
21294
      setProviderIdIsSet(true);
21295
      return this;
21296
    }
21297
 
21298
    public void unsetProviderId() {
21299
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21300
    }
21301
 
21302
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21303
    public boolean isSetProviderId() {
21304
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21305
    }
21306
 
21307
    public void setProviderIdIsSet(boolean value) {
21308
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21309
    }
21310
 
21311
    public int getDeliveredOrdersSize() {
21312
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
21313
    }
21314
 
21315
    public void putToDeliveredOrders(String key, String val) {
21316
      if (this.deliveredOrders == null) {
21317
        this.deliveredOrders = new HashMap<String,String>();
21318
      }
21319
      this.deliveredOrders.put(key, val);
21320
    }
21321
 
21322
    public Map<String,String> getDeliveredOrders() {
21323
      return this.deliveredOrders;
21324
    }
21325
 
21326
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
21327
      this.deliveredOrders = deliveredOrders;
21328
      return this;
21329
    }
21330
 
21331
    public void unsetDeliveredOrders() {
21332
      this.deliveredOrders = null;
21333
    }
21334
 
21335
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
21336
    public boolean isSetDeliveredOrders() {
21337
      return this.deliveredOrders != null;
21338
    }
21339
 
21340
    public void setDeliveredOrdersIsSet(boolean value) {
21341
      if (!value) {
21342
        this.deliveredOrders = null;
21343
      }
21344
    }
21345
 
21346
    public void setFieldValue(_Fields field, Object value) {
21347
      switch (field) {
21348
      case PROVIDER_ID:
21349
        if (value == null) {
21350
          unsetProviderId();
21351
        } else {
21352
          setProviderId((Long)value);
21353
        }
21354
        break;
21355
 
21356
      case DELIVERED_ORDERS:
21357
        if (value == null) {
21358
          unsetDeliveredOrders();
21359
        } else {
21360
          setDeliveredOrders((Map<String,String>)value);
21361
        }
21362
        break;
21363
 
21364
      }
21365
    }
21366
 
21367
    public void setFieldValue(int fieldID, Object value) {
21368
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21369
    }
21370
 
21371
    public Object getFieldValue(_Fields field) {
21372
      switch (field) {
21373
      case PROVIDER_ID:
21374
        return new Long(getProviderId());
21375
 
21376
      case DELIVERED_ORDERS:
21377
        return getDeliveredOrders();
21378
 
21379
      }
21380
      throw new IllegalStateException();
21381
    }
21382
 
21383
    public Object getFieldValue(int fieldId) {
21384
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21385
    }
21386
 
21387
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21388
    public boolean isSet(_Fields field) {
21389
      switch (field) {
21390
      case PROVIDER_ID:
21391
        return isSetProviderId();
21392
      case DELIVERED_ORDERS:
21393
        return isSetDeliveredOrders();
21394
      }
21395
      throw new IllegalStateException();
21396
    }
21397
 
21398
    public boolean isSet(int fieldID) {
21399
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21400
    }
21401
 
21402
    @Override
21403
    public boolean equals(Object that) {
21404
      if (that == null)
21405
        return false;
21406
      if (that instanceof markOrdersAsDelivered_args)
21407
        return this.equals((markOrdersAsDelivered_args)that);
21408
      return false;
21409
    }
21410
 
21411
    public boolean equals(markOrdersAsDelivered_args that) {
21412
      if (that == null)
21413
        return false;
21414
 
21415
      boolean this_present_providerId = true;
21416
      boolean that_present_providerId = true;
21417
      if (this_present_providerId || that_present_providerId) {
21418
        if (!(this_present_providerId && that_present_providerId))
21419
          return false;
21420
        if (this.providerId != that.providerId)
21421
          return false;
21422
      }
21423
 
21424
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
21425
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
21426
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
21427
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
21428
          return false;
21429
        if (!this.deliveredOrders.equals(that.deliveredOrders))
21430
          return false;
21431
      }
21432
 
21433
      return true;
21434
    }
21435
 
21436
    @Override
21437
    public int hashCode() {
21438
      return 0;
21439
    }
21440
 
21441
    public void read(TProtocol iprot) throws TException {
21442
      TField field;
21443
      iprot.readStructBegin();
21444
      while (true)
21445
      {
21446
        field = iprot.readFieldBegin();
21447
        if (field.type == TType.STOP) { 
21448
          break;
21449
        }
21450
        _Fields fieldId = _Fields.findByThriftId(field.id);
21451
        if (fieldId == null) {
21452
          TProtocolUtil.skip(iprot, field.type);
21453
        } else {
21454
          switch (fieldId) {
21455
            case PROVIDER_ID:
21456
              if (field.type == TType.I64) {
21457
                this.providerId = iprot.readI64();
21458
                setProviderIdIsSet(true);
21459
              } else { 
21460
                TProtocolUtil.skip(iprot, field.type);
21461
              }
21462
              break;
21463
            case DELIVERED_ORDERS:
21464
              if (field.type == TType.MAP) {
21465
                {
1382 varun.gupt 21466
                  TMap _map57 = iprot.readMapBegin();
21467
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
21468
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 21469
                  {
1382 varun.gupt 21470
                    String _key59;
21471
                    String _val60;
21472
                    _key59 = iprot.readString();
21473
                    _val60 = iprot.readString();
21474
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 21475
                  }
21476
                  iprot.readMapEnd();
21477
                }
21478
              } else { 
21479
                TProtocolUtil.skip(iprot, field.type);
21480
              }
21481
              break;
21482
          }
21483
          iprot.readFieldEnd();
21484
        }
21485
      }
21486
      iprot.readStructEnd();
21487
      validate();
21488
    }
21489
 
21490
    public void write(TProtocol oprot) throws TException {
21491
      validate();
21492
 
21493
      oprot.writeStructBegin(STRUCT_DESC);
21494
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21495
      oprot.writeI64(this.providerId);
21496
      oprot.writeFieldEnd();
21497
      if (this.deliveredOrders != null) {
21498
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
21499
        {
21500
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 21501
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 21502
          {
1382 varun.gupt 21503
            oprot.writeString(_iter61.getKey());
21504
            oprot.writeString(_iter61.getValue());
1133 chandransh 21505
          }
21506
          oprot.writeMapEnd();
21507
        }
21508
        oprot.writeFieldEnd();
21509
      }
21510
      oprot.writeFieldStop();
21511
      oprot.writeStructEnd();
21512
    }
21513
 
21514
    @Override
21515
    public String toString() {
21516
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
21517
      boolean first = true;
21518
 
21519
      sb.append("providerId:");
21520
      sb.append(this.providerId);
21521
      first = false;
21522
      if (!first) sb.append(", ");
21523
      sb.append("deliveredOrders:");
21524
      if (this.deliveredOrders == null) {
21525
        sb.append("null");
21526
      } else {
21527
        sb.append(this.deliveredOrders);
21528
      }
21529
      first = false;
21530
      sb.append(")");
21531
      return sb.toString();
21532
    }
21533
 
21534
    public void validate() throws TException {
21535
      // check for required fields
21536
    }
21537
 
21538
  }
21539
 
21540
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
21541
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
21542
 
21543
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21544
 
21545
    private TransactionServiceException ex;
21546
 
21547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21548
    public enum _Fields implements TFieldIdEnum {
21549
      EX((short)1, "ex");
21550
 
21551
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21553
 
21554
      static {
21555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21556
          byId.put((int)field._thriftId, field);
21557
          byName.put(field.getFieldName(), field);
21558
        }
21559
      }
21560
 
21561
      /**
21562
       * Find the _Fields constant that matches fieldId, or null if its not found.
21563
       */
21564
      public static _Fields findByThriftId(int fieldId) {
21565
        return byId.get(fieldId);
21566
      }
21567
 
21568
      /**
21569
       * Find the _Fields constant that matches fieldId, throwing an exception
21570
       * if it is not found.
21571
       */
21572
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21573
        _Fields fields = findByThriftId(fieldId);
21574
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21575
        return fields;
21576
      }
21577
 
21578
      /**
21579
       * Find the _Fields constant that matches name, or null if its not found.
21580
       */
21581
      public static _Fields findByName(String name) {
21582
        return byName.get(name);
21583
      }
21584
 
21585
      private final short _thriftId;
21586
      private final String _fieldName;
21587
 
21588
      _Fields(short thriftId, String fieldName) {
21589
        _thriftId = thriftId;
21590
        _fieldName = fieldName;
21591
      }
21592
 
21593
      public short getThriftFieldId() {
21594
        return _thriftId;
21595
      }
21596
 
21597
      public String getFieldName() {
21598
        return _fieldName;
21599
      }
21600
    }
21601
 
21602
    // isset id assignments
21603
 
21604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21605
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21606
          new FieldValueMetaData(TType.STRUCT)));
21607
    }});
21608
 
21609
    static {
21610
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
21611
    }
21612
 
21613
    public markOrdersAsDelivered_result() {
21614
    }
21615
 
21616
    public markOrdersAsDelivered_result(
21617
      TransactionServiceException ex)
21618
    {
21619
      this();
21620
      this.ex = ex;
21621
    }
21622
 
21623
    /**
21624
     * Performs a deep copy on <i>other</i>.
21625
     */
21626
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
21627
      if (other.isSetEx()) {
21628
        this.ex = new TransactionServiceException(other.ex);
21629
      }
21630
    }
21631
 
21632
    public markOrdersAsDelivered_result deepCopy() {
21633
      return new markOrdersAsDelivered_result(this);
21634
    }
21635
 
21636
    @Deprecated
21637
    public markOrdersAsDelivered_result clone() {
21638
      return new markOrdersAsDelivered_result(this);
21639
    }
21640
 
21641
    public TransactionServiceException getEx() {
21642
      return this.ex;
21643
    }
21644
 
21645
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
21646
      this.ex = ex;
21647
      return this;
21648
    }
21649
 
21650
    public void unsetEx() {
21651
      this.ex = null;
21652
    }
21653
 
21654
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21655
    public boolean isSetEx() {
21656
      return this.ex != null;
21657
    }
21658
 
21659
    public void setExIsSet(boolean value) {
21660
      if (!value) {
21661
        this.ex = null;
21662
      }
21663
    }
21664
 
21665
    public void setFieldValue(_Fields field, Object value) {
21666
      switch (field) {
21667
      case EX:
21668
        if (value == null) {
21669
          unsetEx();
21670
        } else {
21671
          setEx((TransactionServiceException)value);
21672
        }
21673
        break;
21674
 
21675
      }
21676
    }
21677
 
21678
    public void setFieldValue(int fieldID, Object value) {
21679
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21680
    }
21681
 
21682
    public Object getFieldValue(_Fields field) {
21683
      switch (field) {
21684
      case EX:
21685
        return getEx();
21686
 
21687
      }
21688
      throw new IllegalStateException();
21689
    }
21690
 
21691
    public Object getFieldValue(int fieldId) {
21692
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21693
    }
21694
 
21695
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21696
    public boolean isSet(_Fields field) {
21697
      switch (field) {
21698
      case EX:
21699
        return isSetEx();
21700
      }
21701
      throw new IllegalStateException();
21702
    }
21703
 
21704
    public boolean isSet(int fieldID) {
21705
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21706
    }
21707
 
21708
    @Override
21709
    public boolean equals(Object that) {
21710
      if (that == null)
21711
        return false;
21712
      if (that instanceof markOrdersAsDelivered_result)
21713
        return this.equals((markOrdersAsDelivered_result)that);
21714
      return false;
21715
    }
21716
 
21717
    public boolean equals(markOrdersAsDelivered_result that) {
21718
      if (that == null)
21719
        return false;
21720
 
21721
      boolean this_present_ex = true && this.isSetEx();
21722
      boolean that_present_ex = true && that.isSetEx();
21723
      if (this_present_ex || that_present_ex) {
21724
        if (!(this_present_ex && that_present_ex))
21725
          return false;
21726
        if (!this.ex.equals(that.ex))
21727
          return false;
21728
      }
21729
 
21730
      return true;
21731
    }
21732
 
21733
    @Override
21734
    public int hashCode() {
21735
      return 0;
21736
    }
21737
 
21738
    public int compareTo(markOrdersAsDelivered_result other) {
21739
      if (!getClass().equals(other.getClass())) {
21740
        return getClass().getName().compareTo(other.getClass().getName());
21741
      }
21742
 
21743
      int lastComparison = 0;
21744
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
21745
 
21746
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21747
      if (lastComparison != 0) {
21748
        return lastComparison;
21749
      }
21750
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21751
      if (lastComparison != 0) {
21752
        return lastComparison;
21753
      }
21754
      return 0;
21755
    }
21756
 
21757
    public void read(TProtocol iprot) throws TException {
21758
      TField field;
21759
      iprot.readStructBegin();
21760
      while (true)
21761
      {
21762
        field = iprot.readFieldBegin();
21763
        if (field.type == TType.STOP) { 
21764
          break;
21765
        }
21766
        _Fields fieldId = _Fields.findByThriftId(field.id);
21767
        if (fieldId == null) {
21768
          TProtocolUtil.skip(iprot, field.type);
21769
        } else {
21770
          switch (fieldId) {
21771
            case EX:
21772
              if (field.type == TType.STRUCT) {
21773
                this.ex = new TransactionServiceException();
21774
                this.ex.read(iprot);
21775
              } else { 
21776
                TProtocolUtil.skip(iprot, field.type);
21777
              }
21778
              break;
21779
          }
21780
          iprot.readFieldEnd();
21781
        }
21782
      }
21783
      iprot.readStructEnd();
21784
      validate();
21785
    }
21786
 
21787
    public void write(TProtocol oprot) throws TException {
21788
      oprot.writeStructBegin(STRUCT_DESC);
21789
 
21790
      if (this.isSetEx()) {
21791
        oprot.writeFieldBegin(EX_FIELD_DESC);
21792
        this.ex.write(oprot);
21793
        oprot.writeFieldEnd();
21794
      }
21795
      oprot.writeFieldStop();
21796
      oprot.writeStructEnd();
21797
    }
21798
 
21799
    @Override
21800
    public String toString() {
21801
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
21802
      boolean first = true;
21803
 
21804
      sb.append("ex:");
21805
      if (this.ex == null) {
21806
        sb.append("null");
21807
      } else {
21808
        sb.append(this.ex);
21809
      }
21810
      first = false;
21811
      sb.append(")");
21812
      return sb.toString();
21813
    }
21814
 
21815
    public void validate() throws TException {
21816
      // check for required fields
21817
    }
21818
 
21819
  }
21820
 
21821
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
21822
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
21823
 
21824
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21825
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
21826
 
21827
    private long providerId;
21828
    private Map<String,String> returnedOrders;
21829
 
21830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21831
    public enum _Fields implements TFieldIdEnum {
21832
      PROVIDER_ID((short)1, "providerId"),
21833
      RETURNED_ORDERS((short)2, "returnedOrders");
21834
 
21835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21837
 
21838
      static {
21839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21840
          byId.put((int)field._thriftId, field);
21841
          byName.put(field.getFieldName(), field);
21842
        }
21843
      }
21844
 
21845
      /**
21846
       * Find the _Fields constant that matches fieldId, or null if its not found.
21847
       */
21848
      public static _Fields findByThriftId(int fieldId) {
21849
        return byId.get(fieldId);
21850
      }
21851
 
21852
      /**
21853
       * Find the _Fields constant that matches fieldId, throwing an exception
21854
       * if it is not found.
21855
       */
21856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21857
        _Fields fields = findByThriftId(fieldId);
21858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21859
        return fields;
21860
      }
21861
 
21862
      /**
21863
       * Find the _Fields constant that matches name, or null if its not found.
21864
       */
21865
      public static _Fields findByName(String name) {
21866
        return byName.get(name);
21867
      }
21868
 
21869
      private final short _thriftId;
21870
      private final String _fieldName;
21871
 
21872
      _Fields(short thriftId, String fieldName) {
21873
        _thriftId = thriftId;
21874
        _fieldName = fieldName;
21875
      }
21876
 
21877
      public short getThriftFieldId() {
21878
        return _thriftId;
21879
      }
21880
 
21881
      public String getFieldName() {
21882
        return _fieldName;
21883
      }
21884
    }
21885
 
21886
    // isset id assignments
21887
    private static final int __PROVIDERID_ISSET_ID = 0;
21888
    private BitSet __isset_bit_vector = new BitSet(1);
21889
 
21890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21891
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21892
          new FieldValueMetaData(TType.I64)));
21893
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
21894
          new MapMetaData(TType.MAP, 
21895
              new FieldValueMetaData(TType.STRING), 
21896
              new FieldValueMetaData(TType.STRING))));
21897
    }});
21898
 
21899
    static {
21900
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
21901
    }
21902
 
21903
    public markOrdersAsFailed_args() {
21904
    }
21905
 
21906
    public markOrdersAsFailed_args(
21907
      long providerId,
21908
      Map<String,String> returnedOrders)
21909
    {
21910
      this();
21911
      this.providerId = providerId;
21912
      setProviderIdIsSet(true);
21913
      this.returnedOrders = returnedOrders;
21914
    }
21915
 
21916
    /**
21917
     * Performs a deep copy on <i>other</i>.
21918
     */
21919
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
21920
      __isset_bit_vector.clear();
21921
      __isset_bit_vector.or(other.__isset_bit_vector);
21922
      this.providerId = other.providerId;
21923
      if (other.isSetReturnedOrders()) {
21924
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
21925
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
21926
 
21927
          String other_element_key = other_element.getKey();
21928
          String other_element_value = other_element.getValue();
21929
 
21930
          String __this__returnedOrders_copy_key = other_element_key;
21931
 
21932
          String __this__returnedOrders_copy_value = other_element_value;
21933
 
21934
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
21935
        }
21936
        this.returnedOrders = __this__returnedOrders;
21937
      }
21938
    }
21939
 
21940
    public markOrdersAsFailed_args deepCopy() {
21941
      return new markOrdersAsFailed_args(this);
21942
    }
21943
 
21944
    @Deprecated
21945
    public markOrdersAsFailed_args clone() {
21946
      return new markOrdersAsFailed_args(this);
21947
    }
21948
 
21949
    public long getProviderId() {
21950
      return this.providerId;
21951
    }
21952
 
21953
    public markOrdersAsFailed_args setProviderId(long providerId) {
21954
      this.providerId = providerId;
21955
      setProviderIdIsSet(true);
21956
      return this;
21957
    }
21958
 
21959
    public void unsetProviderId() {
21960
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21961
    }
21962
 
21963
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21964
    public boolean isSetProviderId() {
21965
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21966
    }
21967
 
21968
    public void setProviderIdIsSet(boolean value) {
21969
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21970
    }
21971
 
21972
    public int getReturnedOrdersSize() {
21973
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
21974
    }
21975
 
21976
    public void putToReturnedOrders(String key, String val) {
21977
      if (this.returnedOrders == null) {
21978
        this.returnedOrders = new HashMap<String,String>();
21979
      }
21980
      this.returnedOrders.put(key, val);
21981
    }
21982
 
21983
    public Map<String,String> getReturnedOrders() {
21984
      return this.returnedOrders;
21985
    }
21986
 
21987
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
21988
      this.returnedOrders = returnedOrders;
21989
      return this;
21990
    }
21991
 
21992
    public void unsetReturnedOrders() {
21993
      this.returnedOrders = null;
21994
    }
21995
 
21996
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
21997
    public boolean isSetReturnedOrders() {
21998
      return this.returnedOrders != null;
21999
    }
22000
 
22001
    public void setReturnedOrdersIsSet(boolean value) {
22002
      if (!value) {
22003
        this.returnedOrders = null;
22004
      }
22005
    }
22006
 
22007
    public void setFieldValue(_Fields field, Object value) {
22008
      switch (field) {
22009
      case PROVIDER_ID:
22010
        if (value == null) {
22011
          unsetProviderId();
22012
        } else {
22013
          setProviderId((Long)value);
22014
        }
22015
        break;
22016
 
22017
      case RETURNED_ORDERS:
22018
        if (value == null) {
22019
          unsetReturnedOrders();
22020
        } else {
22021
          setReturnedOrders((Map<String,String>)value);
22022
        }
22023
        break;
22024
 
22025
      }
22026
    }
22027
 
22028
    public void setFieldValue(int fieldID, Object value) {
22029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22030
    }
22031
 
22032
    public Object getFieldValue(_Fields field) {
22033
      switch (field) {
22034
      case PROVIDER_ID:
22035
        return new Long(getProviderId());
22036
 
22037
      case RETURNED_ORDERS:
22038
        return getReturnedOrders();
22039
 
22040
      }
22041
      throw new IllegalStateException();
22042
    }
22043
 
22044
    public Object getFieldValue(int fieldId) {
22045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22046
    }
22047
 
22048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22049
    public boolean isSet(_Fields field) {
22050
      switch (field) {
22051
      case PROVIDER_ID:
22052
        return isSetProviderId();
22053
      case RETURNED_ORDERS:
22054
        return isSetReturnedOrders();
22055
      }
22056
      throw new IllegalStateException();
22057
    }
22058
 
22059
    public boolean isSet(int fieldID) {
22060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22061
    }
22062
 
22063
    @Override
22064
    public boolean equals(Object that) {
22065
      if (that == null)
22066
        return false;
22067
      if (that instanceof markOrdersAsFailed_args)
22068
        return this.equals((markOrdersAsFailed_args)that);
22069
      return false;
22070
    }
22071
 
22072
    public boolean equals(markOrdersAsFailed_args that) {
22073
      if (that == null)
22074
        return false;
22075
 
22076
      boolean this_present_providerId = true;
22077
      boolean that_present_providerId = true;
22078
      if (this_present_providerId || that_present_providerId) {
22079
        if (!(this_present_providerId && that_present_providerId))
22080
          return false;
22081
        if (this.providerId != that.providerId)
22082
          return false;
22083
      }
22084
 
22085
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
22086
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
22087
      if (this_present_returnedOrders || that_present_returnedOrders) {
22088
        if (!(this_present_returnedOrders && that_present_returnedOrders))
22089
          return false;
22090
        if (!this.returnedOrders.equals(that.returnedOrders))
22091
          return false;
22092
      }
22093
 
22094
      return true;
22095
    }
22096
 
22097
    @Override
22098
    public int hashCode() {
22099
      return 0;
22100
    }
22101
 
22102
    public void read(TProtocol iprot) throws TException {
22103
      TField field;
22104
      iprot.readStructBegin();
22105
      while (true)
22106
      {
22107
        field = iprot.readFieldBegin();
22108
        if (field.type == TType.STOP) { 
22109
          break;
22110
        }
22111
        _Fields fieldId = _Fields.findByThriftId(field.id);
22112
        if (fieldId == null) {
22113
          TProtocolUtil.skip(iprot, field.type);
22114
        } else {
22115
          switch (fieldId) {
22116
            case PROVIDER_ID:
22117
              if (field.type == TType.I64) {
22118
                this.providerId = iprot.readI64();
22119
                setProviderIdIsSet(true);
22120
              } else { 
22121
                TProtocolUtil.skip(iprot, field.type);
22122
              }
22123
              break;
22124
            case RETURNED_ORDERS:
22125
              if (field.type == TType.MAP) {
22126
                {
1382 varun.gupt 22127
                  TMap _map62 = iprot.readMapBegin();
22128
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
22129
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 22130
                  {
1382 varun.gupt 22131
                    String _key64;
22132
                    String _val65;
22133
                    _key64 = iprot.readString();
22134
                    _val65 = iprot.readString();
22135
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 22136
                  }
22137
                  iprot.readMapEnd();
22138
                }
22139
              } else { 
22140
                TProtocolUtil.skip(iprot, field.type);
22141
              }
22142
              break;
22143
          }
22144
          iprot.readFieldEnd();
22145
        }
22146
      }
22147
      iprot.readStructEnd();
22148
      validate();
22149
    }
22150
 
22151
    public void write(TProtocol oprot) throws TException {
22152
      validate();
22153
 
22154
      oprot.writeStructBegin(STRUCT_DESC);
22155
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22156
      oprot.writeI64(this.providerId);
22157
      oprot.writeFieldEnd();
22158
      if (this.returnedOrders != null) {
22159
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
22160
        {
22161
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 22162
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 22163
          {
1382 varun.gupt 22164
            oprot.writeString(_iter66.getKey());
22165
            oprot.writeString(_iter66.getValue());
1133 chandransh 22166
          }
22167
          oprot.writeMapEnd();
22168
        }
22169
        oprot.writeFieldEnd();
22170
      }
22171
      oprot.writeFieldStop();
22172
      oprot.writeStructEnd();
22173
    }
22174
 
22175
    @Override
22176
    public String toString() {
22177
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
22178
      boolean first = true;
22179
 
22180
      sb.append("providerId:");
22181
      sb.append(this.providerId);
22182
      first = false;
22183
      if (!first) sb.append(", ");
22184
      sb.append("returnedOrders:");
22185
      if (this.returnedOrders == null) {
22186
        sb.append("null");
22187
      } else {
22188
        sb.append(this.returnedOrders);
22189
      }
22190
      first = false;
22191
      sb.append(")");
22192
      return sb.toString();
22193
    }
22194
 
22195
    public void validate() throws TException {
22196
      // check for required fields
22197
    }
22198
 
22199
  }
22200
 
22201
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
22202
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
22203
 
22204
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22205
 
22206
    private TransactionServiceException ex;
22207
 
22208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22209
    public enum _Fields implements TFieldIdEnum {
22210
      EX((short)1, "ex");
22211
 
22212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22214
 
22215
      static {
22216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22217
          byId.put((int)field._thriftId, field);
22218
          byName.put(field.getFieldName(), field);
22219
        }
22220
      }
22221
 
22222
      /**
22223
       * Find the _Fields constant that matches fieldId, or null if its not found.
22224
       */
22225
      public static _Fields findByThriftId(int fieldId) {
22226
        return byId.get(fieldId);
22227
      }
22228
 
22229
      /**
22230
       * Find the _Fields constant that matches fieldId, throwing an exception
22231
       * if it is not found.
22232
       */
22233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22234
        _Fields fields = findByThriftId(fieldId);
22235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22236
        return fields;
22237
      }
22238
 
22239
      /**
22240
       * Find the _Fields constant that matches name, or null if its not found.
22241
       */
22242
      public static _Fields findByName(String name) {
22243
        return byName.get(name);
22244
      }
22245
 
22246
      private final short _thriftId;
22247
      private final String _fieldName;
22248
 
22249
      _Fields(short thriftId, String fieldName) {
22250
        _thriftId = thriftId;
22251
        _fieldName = fieldName;
22252
      }
22253
 
22254
      public short getThriftFieldId() {
22255
        return _thriftId;
22256
      }
22257
 
22258
      public String getFieldName() {
22259
        return _fieldName;
22260
      }
22261
    }
22262
 
22263
    // isset id assignments
22264
 
22265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22266
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22267
          new FieldValueMetaData(TType.STRUCT)));
22268
    }});
22269
 
22270
    static {
22271
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
22272
    }
22273
 
22274
    public markOrdersAsFailed_result() {
22275
    }
22276
 
22277
    public markOrdersAsFailed_result(
22278
      TransactionServiceException ex)
22279
    {
22280
      this();
22281
      this.ex = ex;
22282
    }
22283
 
22284
    /**
22285
     * Performs a deep copy on <i>other</i>.
22286
     */
22287
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
22288
      if (other.isSetEx()) {
22289
        this.ex = new TransactionServiceException(other.ex);
22290
      }
22291
    }
22292
 
22293
    public markOrdersAsFailed_result deepCopy() {
22294
      return new markOrdersAsFailed_result(this);
22295
    }
22296
 
22297
    @Deprecated
22298
    public markOrdersAsFailed_result clone() {
22299
      return new markOrdersAsFailed_result(this);
22300
    }
22301
 
22302
    public TransactionServiceException getEx() {
22303
      return this.ex;
22304
    }
22305
 
22306
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
22307
      this.ex = ex;
22308
      return this;
22309
    }
22310
 
22311
    public void unsetEx() {
22312
      this.ex = null;
22313
    }
22314
 
22315
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22316
    public boolean isSetEx() {
22317
      return this.ex != null;
22318
    }
22319
 
22320
    public void setExIsSet(boolean value) {
22321
      if (!value) {
22322
        this.ex = null;
22323
      }
22324
    }
22325
 
22326
    public void setFieldValue(_Fields field, Object value) {
22327
      switch (field) {
22328
      case EX:
22329
        if (value == null) {
22330
          unsetEx();
22331
        } else {
22332
          setEx((TransactionServiceException)value);
22333
        }
22334
        break;
22335
 
22336
      }
22337
    }
22338
 
22339
    public void setFieldValue(int fieldID, Object value) {
22340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22341
    }
22342
 
22343
    public Object getFieldValue(_Fields field) {
22344
      switch (field) {
22345
      case EX:
22346
        return getEx();
22347
 
22348
      }
22349
      throw new IllegalStateException();
22350
    }
22351
 
22352
    public Object getFieldValue(int fieldId) {
22353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22354
    }
22355
 
22356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22357
    public boolean isSet(_Fields field) {
22358
      switch (field) {
22359
      case EX:
22360
        return isSetEx();
22361
      }
22362
      throw new IllegalStateException();
22363
    }
22364
 
22365
    public boolean isSet(int fieldID) {
22366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22367
    }
22368
 
22369
    @Override
22370
    public boolean equals(Object that) {
22371
      if (that == null)
22372
        return false;
22373
      if (that instanceof markOrdersAsFailed_result)
22374
        return this.equals((markOrdersAsFailed_result)that);
22375
      return false;
22376
    }
22377
 
22378
    public boolean equals(markOrdersAsFailed_result that) {
22379
      if (that == null)
22380
        return false;
22381
 
22382
      boolean this_present_ex = true && this.isSetEx();
22383
      boolean that_present_ex = true && that.isSetEx();
22384
      if (this_present_ex || that_present_ex) {
22385
        if (!(this_present_ex && that_present_ex))
22386
          return false;
22387
        if (!this.ex.equals(that.ex))
22388
          return false;
22389
      }
22390
 
22391
      return true;
22392
    }
22393
 
22394
    @Override
22395
    public int hashCode() {
22396
      return 0;
22397
    }
22398
 
22399
    public int compareTo(markOrdersAsFailed_result other) {
22400
      if (!getClass().equals(other.getClass())) {
22401
        return getClass().getName().compareTo(other.getClass().getName());
22402
      }
22403
 
22404
      int lastComparison = 0;
22405
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
22406
 
22407
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22408
      if (lastComparison != 0) {
22409
        return lastComparison;
22410
      }
22411
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22412
      if (lastComparison != 0) {
22413
        return lastComparison;
22414
      }
22415
      return 0;
22416
    }
22417
 
22418
    public void read(TProtocol iprot) throws TException {
22419
      TField field;
22420
      iprot.readStructBegin();
22421
      while (true)
22422
      {
22423
        field = iprot.readFieldBegin();
22424
        if (field.type == TType.STOP) { 
22425
          break;
22426
        }
22427
        _Fields fieldId = _Fields.findByThriftId(field.id);
22428
        if (fieldId == null) {
22429
          TProtocolUtil.skip(iprot, field.type);
22430
        } else {
22431
          switch (fieldId) {
22432
            case EX:
22433
              if (field.type == TType.STRUCT) {
22434
                this.ex = new TransactionServiceException();
22435
                this.ex.read(iprot);
22436
              } else { 
22437
                TProtocolUtil.skip(iprot, field.type);
22438
              }
22439
              break;
22440
          }
22441
          iprot.readFieldEnd();
22442
        }
22443
      }
22444
      iprot.readStructEnd();
22445
      validate();
22446
    }
22447
 
22448
    public void write(TProtocol oprot) throws TException {
22449
      oprot.writeStructBegin(STRUCT_DESC);
22450
 
22451
      if (this.isSetEx()) {
22452
        oprot.writeFieldBegin(EX_FIELD_DESC);
22453
        this.ex.write(oprot);
22454
        oprot.writeFieldEnd();
22455
      }
22456
      oprot.writeFieldStop();
22457
      oprot.writeStructEnd();
22458
    }
22459
 
22460
    @Override
22461
    public String toString() {
22462
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
22463
      boolean first = true;
22464
 
22465
      sb.append("ex:");
22466
      if (this.ex == null) {
22467
        sb.append("null");
22468
      } else {
22469
        sb.append(this.ex);
22470
      }
22471
      first = false;
22472
      sb.append(")");
22473
      return sb.toString();
22474
    }
22475
 
22476
    public void validate() throws TException {
22477
      // check for required fields
22478
    }
22479
 
22480
  }
22481
 
1245 chandransh 22482
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
22483
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
22484
 
22485
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22486
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
22487
 
22488
    private long providerId;
22489
    private Map<String,String> undeliveredOrders;
22490
 
22491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22492
    public enum _Fields implements TFieldIdEnum {
22493
      PROVIDER_ID((short)1, "providerId"),
22494
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
22495
 
22496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22498
 
22499
      static {
22500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22501
          byId.put((int)field._thriftId, field);
22502
          byName.put(field.getFieldName(), field);
22503
        }
22504
      }
22505
 
22506
      /**
22507
       * Find the _Fields constant that matches fieldId, or null if its not found.
22508
       */
22509
      public static _Fields findByThriftId(int fieldId) {
22510
        return byId.get(fieldId);
22511
      }
22512
 
22513
      /**
22514
       * Find the _Fields constant that matches fieldId, throwing an exception
22515
       * if it is not found.
22516
       */
22517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22518
        _Fields fields = findByThriftId(fieldId);
22519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22520
        return fields;
22521
      }
22522
 
22523
      /**
22524
       * Find the _Fields constant that matches name, or null if its not found.
22525
       */
22526
      public static _Fields findByName(String name) {
22527
        return byName.get(name);
22528
      }
22529
 
22530
      private final short _thriftId;
22531
      private final String _fieldName;
22532
 
22533
      _Fields(short thriftId, String fieldName) {
22534
        _thriftId = thriftId;
22535
        _fieldName = fieldName;
22536
      }
22537
 
22538
      public short getThriftFieldId() {
22539
        return _thriftId;
22540
      }
22541
 
22542
      public String getFieldName() {
22543
        return _fieldName;
22544
      }
22545
    }
22546
 
22547
    // isset id assignments
22548
    private static final int __PROVIDERID_ISSET_ID = 0;
22549
    private BitSet __isset_bit_vector = new BitSet(1);
22550
 
22551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22552
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22553
          new FieldValueMetaData(TType.I64)));
22554
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
22555
          new MapMetaData(TType.MAP, 
22556
              new FieldValueMetaData(TType.STRING), 
22557
              new FieldValueMetaData(TType.STRING))));
22558
    }});
22559
 
22560
    static {
22561
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
22562
    }
22563
 
22564
    public updateNonDeliveryReason_args() {
22565
    }
22566
 
22567
    public updateNonDeliveryReason_args(
22568
      long providerId,
22569
      Map<String,String> undeliveredOrders)
22570
    {
22571
      this();
22572
      this.providerId = providerId;
22573
      setProviderIdIsSet(true);
22574
      this.undeliveredOrders = undeliveredOrders;
22575
    }
22576
 
22577
    /**
22578
     * Performs a deep copy on <i>other</i>.
22579
     */
22580
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
22581
      __isset_bit_vector.clear();
22582
      __isset_bit_vector.or(other.__isset_bit_vector);
22583
      this.providerId = other.providerId;
22584
      if (other.isSetUndeliveredOrders()) {
22585
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
22586
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
22587
 
22588
          String other_element_key = other_element.getKey();
22589
          String other_element_value = other_element.getValue();
22590
 
22591
          String __this__undeliveredOrders_copy_key = other_element_key;
22592
 
22593
          String __this__undeliveredOrders_copy_value = other_element_value;
22594
 
22595
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
22596
        }
22597
        this.undeliveredOrders = __this__undeliveredOrders;
22598
      }
22599
    }
22600
 
22601
    public updateNonDeliveryReason_args deepCopy() {
22602
      return new updateNonDeliveryReason_args(this);
22603
    }
22604
 
22605
    @Deprecated
22606
    public updateNonDeliveryReason_args clone() {
22607
      return new updateNonDeliveryReason_args(this);
22608
    }
22609
 
22610
    public long getProviderId() {
22611
      return this.providerId;
22612
    }
22613
 
22614
    public updateNonDeliveryReason_args setProviderId(long providerId) {
22615
      this.providerId = providerId;
22616
      setProviderIdIsSet(true);
22617
      return this;
22618
    }
22619
 
22620
    public void unsetProviderId() {
22621
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22622
    }
22623
 
22624
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22625
    public boolean isSetProviderId() {
22626
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22627
    }
22628
 
22629
    public void setProviderIdIsSet(boolean value) {
22630
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22631
    }
22632
 
22633
    public int getUndeliveredOrdersSize() {
22634
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
22635
    }
22636
 
22637
    public void putToUndeliveredOrders(String key, String val) {
22638
      if (this.undeliveredOrders == null) {
22639
        this.undeliveredOrders = new HashMap<String,String>();
22640
      }
22641
      this.undeliveredOrders.put(key, val);
22642
    }
22643
 
22644
    public Map<String,String> getUndeliveredOrders() {
22645
      return this.undeliveredOrders;
22646
    }
22647
 
22648
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
22649
      this.undeliveredOrders = undeliveredOrders;
22650
      return this;
22651
    }
22652
 
22653
    public void unsetUndeliveredOrders() {
22654
      this.undeliveredOrders = null;
22655
    }
22656
 
22657
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
22658
    public boolean isSetUndeliveredOrders() {
22659
      return this.undeliveredOrders != null;
22660
    }
22661
 
22662
    public void setUndeliveredOrdersIsSet(boolean value) {
22663
      if (!value) {
22664
        this.undeliveredOrders = null;
22665
      }
22666
    }
22667
 
22668
    public void setFieldValue(_Fields field, Object value) {
22669
      switch (field) {
22670
      case PROVIDER_ID:
22671
        if (value == null) {
22672
          unsetProviderId();
22673
        } else {
22674
          setProviderId((Long)value);
22675
        }
22676
        break;
22677
 
22678
      case UNDELIVERED_ORDERS:
22679
        if (value == null) {
22680
          unsetUndeliveredOrders();
22681
        } else {
22682
          setUndeliveredOrders((Map<String,String>)value);
22683
        }
22684
        break;
22685
 
22686
      }
22687
    }
22688
 
22689
    public void setFieldValue(int fieldID, Object value) {
22690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22691
    }
22692
 
22693
    public Object getFieldValue(_Fields field) {
22694
      switch (field) {
22695
      case PROVIDER_ID:
22696
        return new Long(getProviderId());
22697
 
22698
      case UNDELIVERED_ORDERS:
22699
        return getUndeliveredOrders();
22700
 
22701
      }
22702
      throw new IllegalStateException();
22703
    }
22704
 
22705
    public Object getFieldValue(int fieldId) {
22706
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22707
    }
22708
 
22709
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22710
    public boolean isSet(_Fields field) {
22711
      switch (field) {
22712
      case PROVIDER_ID:
22713
        return isSetProviderId();
22714
      case UNDELIVERED_ORDERS:
22715
        return isSetUndeliveredOrders();
22716
      }
22717
      throw new IllegalStateException();
22718
    }
22719
 
22720
    public boolean isSet(int fieldID) {
22721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22722
    }
22723
 
22724
    @Override
22725
    public boolean equals(Object that) {
22726
      if (that == null)
22727
        return false;
22728
      if (that instanceof updateNonDeliveryReason_args)
22729
        return this.equals((updateNonDeliveryReason_args)that);
22730
      return false;
22731
    }
22732
 
22733
    public boolean equals(updateNonDeliveryReason_args that) {
22734
      if (that == null)
22735
        return false;
22736
 
22737
      boolean this_present_providerId = true;
22738
      boolean that_present_providerId = true;
22739
      if (this_present_providerId || that_present_providerId) {
22740
        if (!(this_present_providerId && that_present_providerId))
22741
          return false;
22742
        if (this.providerId != that.providerId)
22743
          return false;
22744
      }
22745
 
22746
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
22747
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
22748
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
22749
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
22750
          return false;
22751
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
22752
          return false;
22753
      }
22754
 
22755
      return true;
22756
    }
22757
 
22758
    @Override
22759
    public int hashCode() {
22760
      return 0;
22761
    }
22762
 
22763
    public void read(TProtocol iprot) throws TException {
22764
      TField field;
22765
      iprot.readStructBegin();
22766
      while (true)
22767
      {
22768
        field = iprot.readFieldBegin();
22769
        if (field.type == TType.STOP) { 
22770
          break;
22771
        }
22772
        _Fields fieldId = _Fields.findByThriftId(field.id);
22773
        if (fieldId == null) {
22774
          TProtocolUtil.skip(iprot, field.type);
22775
        } else {
22776
          switch (fieldId) {
22777
            case PROVIDER_ID:
22778
              if (field.type == TType.I64) {
22779
                this.providerId = iprot.readI64();
22780
                setProviderIdIsSet(true);
22781
              } else { 
22782
                TProtocolUtil.skip(iprot, field.type);
22783
              }
22784
              break;
22785
            case UNDELIVERED_ORDERS:
22786
              if (field.type == TType.MAP) {
22787
                {
1382 varun.gupt 22788
                  TMap _map67 = iprot.readMapBegin();
22789
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
22790
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 22791
                  {
1382 varun.gupt 22792
                    String _key69;
22793
                    String _val70;
22794
                    _key69 = iprot.readString();
22795
                    _val70 = iprot.readString();
22796
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 22797
                  }
22798
                  iprot.readMapEnd();
22799
                }
22800
              } else { 
22801
                TProtocolUtil.skip(iprot, field.type);
22802
              }
22803
              break;
22804
          }
22805
          iprot.readFieldEnd();
22806
        }
22807
      }
22808
      iprot.readStructEnd();
22809
      validate();
22810
    }
22811
 
22812
    public void write(TProtocol oprot) throws TException {
22813
      validate();
22814
 
22815
      oprot.writeStructBegin(STRUCT_DESC);
22816
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22817
      oprot.writeI64(this.providerId);
22818
      oprot.writeFieldEnd();
22819
      if (this.undeliveredOrders != null) {
22820
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
22821
        {
22822
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 22823
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 22824
          {
1382 varun.gupt 22825
            oprot.writeString(_iter71.getKey());
22826
            oprot.writeString(_iter71.getValue());
1245 chandransh 22827
          }
22828
          oprot.writeMapEnd();
22829
        }
22830
        oprot.writeFieldEnd();
22831
      }
22832
      oprot.writeFieldStop();
22833
      oprot.writeStructEnd();
22834
    }
22835
 
22836
    @Override
22837
    public String toString() {
22838
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
22839
      boolean first = true;
22840
 
22841
      sb.append("providerId:");
22842
      sb.append(this.providerId);
22843
      first = false;
22844
      if (!first) sb.append(", ");
22845
      sb.append("undeliveredOrders:");
22846
      if (this.undeliveredOrders == null) {
22847
        sb.append("null");
22848
      } else {
22849
        sb.append(this.undeliveredOrders);
22850
      }
22851
      first = false;
22852
      sb.append(")");
22853
      return sb.toString();
22854
    }
22855
 
22856
    public void validate() throws TException {
22857
      // check for required fields
22858
    }
22859
 
22860
  }
22861
 
22862
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
22863
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
22864
 
22865
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22866
 
22867
    private TransactionServiceException ex;
22868
 
22869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22870
    public enum _Fields implements TFieldIdEnum {
22871
      EX((short)1, "ex");
22872
 
22873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22875
 
22876
      static {
22877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22878
          byId.put((int)field._thriftId, field);
22879
          byName.put(field.getFieldName(), field);
22880
        }
22881
      }
22882
 
22883
      /**
22884
       * Find the _Fields constant that matches fieldId, or null if its not found.
22885
       */
22886
      public static _Fields findByThriftId(int fieldId) {
22887
        return byId.get(fieldId);
22888
      }
22889
 
22890
      /**
22891
       * Find the _Fields constant that matches fieldId, throwing an exception
22892
       * if it is not found.
22893
       */
22894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22895
        _Fields fields = findByThriftId(fieldId);
22896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22897
        return fields;
22898
      }
22899
 
22900
      /**
22901
       * Find the _Fields constant that matches name, or null if its not found.
22902
       */
22903
      public static _Fields findByName(String name) {
22904
        return byName.get(name);
22905
      }
22906
 
22907
      private final short _thriftId;
22908
      private final String _fieldName;
22909
 
22910
      _Fields(short thriftId, String fieldName) {
22911
        _thriftId = thriftId;
22912
        _fieldName = fieldName;
22913
      }
22914
 
22915
      public short getThriftFieldId() {
22916
        return _thriftId;
22917
      }
22918
 
22919
      public String getFieldName() {
22920
        return _fieldName;
22921
      }
22922
    }
22923
 
22924
    // isset id assignments
22925
 
22926
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22927
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22928
          new FieldValueMetaData(TType.STRUCT)));
22929
    }});
22930
 
22931
    static {
22932
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
22933
    }
22934
 
22935
    public updateNonDeliveryReason_result() {
22936
    }
22937
 
22938
    public updateNonDeliveryReason_result(
22939
      TransactionServiceException ex)
22940
    {
22941
      this();
22942
      this.ex = ex;
22943
    }
22944
 
22945
    /**
22946
     * Performs a deep copy on <i>other</i>.
22947
     */
22948
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
22949
      if (other.isSetEx()) {
22950
        this.ex = new TransactionServiceException(other.ex);
22951
      }
22952
    }
22953
 
22954
    public updateNonDeliveryReason_result deepCopy() {
22955
      return new updateNonDeliveryReason_result(this);
22956
    }
22957
 
22958
    @Deprecated
22959
    public updateNonDeliveryReason_result clone() {
22960
      return new updateNonDeliveryReason_result(this);
22961
    }
22962
 
22963
    public TransactionServiceException getEx() {
22964
      return this.ex;
22965
    }
22966
 
22967
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
22968
      this.ex = ex;
22969
      return this;
22970
    }
22971
 
22972
    public void unsetEx() {
22973
      this.ex = null;
22974
    }
22975
 
22976
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22977
    public boolean isSetEx() {
22978
      return this.ex != null;
22979
    }
22980
 
22981
    public void setExIsSet(boolean value) {
22982
      if (!value) {
22983
        this.ex = null;
22984
      }
22985
    }
22986
 
22987
    public void setFieldValue(_Fields field, Object value) {
22988
      switch (field) {
22989
      case EX:
22990
        if (value == null) {
22991
          unsetEx();
22992
        } else {
22993
          setEx((TransactionServiceException)value);
22994
        }
22995
        break;
22996
 
22997
      }
22998
    }
22999
 
23000
    public void setFieldValue(int fieldID, Object value) {
23001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23002
    }
23003
 
23004
    public Object getFieldValue(_Fields field) {
23005
      switch (field) {
23006
      case EX:
23007
        return getEx();
23008
 
23009
      }
23010
      throw new IllegalStateException();
23011
    }
23012
 
23013
    public Object getFieldValue(int fieldId) {
23014
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23015
    }
23016
 
23017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23018
    public boolean isSet(_Fields field) {
23019
      switch (field) {
23020
      case EX:
23021
        return isSetEx();
23022
      }
23023
      throw new IllegalStateException();
23024
    }
23025
 
23026
    public boolean isSet(int fieldID) {
23027
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23028
    }
23029
 
23030
    @Override
23031
    public boolean equals(Object that) {
23032
      if (that == null)
23033
        return false;
23034
      if (that instanceof updateNonDeliveryReason_result)
23035
        return this.equals((updateNonDeliveryReason_result)that);
23036
      return false;
23037
    }
23038
 
23039
    public boolean equals(updateNonDeliveryReason_result that) {
23040
      if (that == null)
23041
        return false;
23042
 
23043
      boolean this_present_ex = true && this.isSetEx();
23044
      boolean that_present_ex = true && that.isSetEx();
23045
      if (this_present_ex || that_present_ex) {
23046
        if (!(this_present_ex && that_present_ex))
23047
          return false;
23048
        if (!this.ex.equals(that.ex))
23049
          return false;
23050
      }
23051
 
23052
      return true;
23053
    }
23054
 
23055
    @Override
23056
    public int hashCode() {
23057
      return 0;
23058
    }
23059
 
23060
    public int compareTo(updateNonDeliveryReason_result other) {
23061
      if (!getClass().equals(other.getClass())) {
23062
        return getClass().getName().compareTo(other.getClass().getName());
23063
      }
23064
 
23065
      int lastComparison = 0;
23066
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
23067
 
23068
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23069
      if (lastComparison != 0) {
23070
        return lastComparison;
23071
      }
23072
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23073
      if (lastComparison != 0) {
23074
        return lastComparison;
23075
      }
23076
      return 0;
23077
    }
23078
 
23079
    public void read(TProtocol iprot) throws TException {
23080
      TField field;
23081
      iprot.readStructBegin();
23082
      while (true)
23083
      {
23084
        field = iprot.readFieldBegin();
23085
        if (field.type == TType.STOP) { 
23086
          break;
23087
        }
23088
        _Fields fieldId = _Fields.findByThriftId(field.id);
23089
        if (fieldId == null) {
23090
          TProtocolUtil.skip(iprot, field.type);
23091
        } else {
23092
          switch (fieldId) {
23093
            case EX:
23094
              if (field.type == TType.STRUCT) {
23095
                this.ex = new TransactionServiceException();
23096
                this.ex.read(iprot);
23097
              } else { 
23098
                TProtocolUtil.skip(iprot, field.type);
23099
              }
23100
              break;
23101
          }
23102
          iprot.readFieldEnd();
23103
        }
23104
      }
23105
      iprot.readStructEnd();
23106
      validate();
23107
    }
23108
 
23109
    public void write(TProtocol oprot) throws TException {
23110
      oprot.writeStructBegin(STRUCT_DESC);
23111
 
23112
      if (this.isSetEx()) {
23113
        oprot.writeFieldBegin(EX_FIELD_DESC);
23114
        this.ex.write(oprot);
23115
        oprot.writeFieldEnd();
23116
      }
23117
      oprot.writeFieldStop();
23118
      oprot.writeStructEnd();
23119
    }
23120
 
23121
    @Override
23122
    public String toString() {
23123
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
23124
      boolean first = true;
23125
 
23126
      sb.append("ex:");
23127
      if (this.ex == null) {
23128
        sb.append("null");
23129
      } else {
23130
        sb.append(this.ex);
23131
      }
23132
      first = false;
23133
      sb.append(")");
23134
      return sb.toString();
23135
    }
23136
 
23137
    public void validate() throws TException {
23138
      // check for required fields
23139
    }
23140
 
23141
  }
23142
 
1406 ankur.sing 23143
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
23144
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
23145
 
23146
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23147
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
23148
 
23149
    private long providerId;
23150
    private long warehouseId;
23151
 
23152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23153
    public enum _Fields implements TFieldIdEnum {
23154
      PROVIDER_ID((short)1, "providerId"),
23155
      WAREHOUSE_ID((short)2, "warehouseId");
23156
 
23157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23159
 
23160
      static {
23161
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23162
          byId.put((int)field._thriftId, field);
23163
          byName.put(field.getFieldName(), field);
23164
        }
23165
      }
23166
 
23167
      /**
23168
       * Find the _Fields constant that matches fieldId, or null if its not found.
23169
       */
23170
      public static _Fields findByThriftId(int fieldId) {
23171
        return byId.get(fieldId);
23172
      }
23173
 
23174
      /**
23175
       * Find the _Fields constant that matches fieldId, throwing an exception
23176
       * if it is not found.
23177
       */
23178
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23179
        _Fields fields = findByThriftId(fieldId);
23180
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23181
        return fields;
23182
      }
23183
 
23184
      /**
23185
       * Find the _Fields constant that matches name, or null if its not found.
23186
       */
23187
      public static _Fields findByName(String name) {
23188
        return byName.get(name);
23189
      }
23190
 
23191
      private final short _thriftId;
23192
      private final String _fieldName;
23193
 
23194
      _Fields(short thriftId, String fieldName) {
23195
        _thriftId = thriftId;
23196
        _fieldName = fieldName;
23197
      }
23198
 
23199
      public short getThriftFieldId() {
23200
        return _thriftId;
23201
      }
23202
 
23203
      public String getFieldName() {
23204
        return _fieldName;
23205
      }
23206
    }
23207
 
23208
    // isset id assignments
23209
    private static final int __PROVIDERID_ISSET_ID = 0;
23210
    private static final int __WAREHOUSEID_ISSET_ID = 1;
23211
    private BitSet __isset_bit_vector = new BitSet(2);
23212
 
23213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23214
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23215
          new FieldValueMetaData(TType.I64)));
23216
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
23217
          new FieldValueMetaData(TType.I64)));
23218
    }});
23219
 
23220
    static {
23221
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
23222
    }
23223
 
23224
    public getUndeliveredOrders_args() {
23225
    }
23226
 
23227
    public getUndeliveredOrders_args(
23228
      long providerId,
23229
      long warehouseId)
23230
    {
23231
      this();
23232
      this.providerId = providerId;
23233
      setProviderIdIsSet(true);
23234
      this.warehouseId = warehouseId;
23235
      setWarehouseIdIsSet(true);
23236
    }
23237
 
23238
    /**
23239
     * Performs a deep copy on <i>other</i>.
23240
     */
23241
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
23242
      __isset_bit_vector.clear();
23243
      __isset_bit_vector.or(other.__isset_bit_vector);
23244
      this.providerId = other.providerId;
23245
      this.warehouseId = other.warehouseId;
23246
    }
23247
 
23248
    public getUndeliveredOrders_args deepCopy() {
23249
      return new getUndeliveredOrders_args(this);
23250
    }
23251
 
23252
    @Deprecated
23253
    public getUndeliveredOrders_args clone() {
23254
      return new getUndeliveredOrders_args(this);
23255
    }
23256
 
23257
    public long getProviderId() {
23258
      return this.providerId;
23259
    }
23260
 
23261
    public getUndeliveredOrders_args setProviderId(long providerId) {
23262
      this.providerId = providerId;
23263
      setProviderIdIsSet(true);
23264
      return this;
23265
    }
23266
 
23267
    public void unsetProviderId() {
23268
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23269
    }
23270
 
23271
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23272
    public boolean isSetProviderId() {
23273
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23274
    }
23275
 
23276
    public void setProviderIdIsSet(boolean value) {
23277
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23278
    }
23279
 
23280
    public long getWarehouseId() {
23281
      return this.warehouseId;
23282
    }
23283
 
23284
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
23285
      this.warehouseId = warehouseId;
23286
      setWarehouseIdIsSet(true);
23287
      return this;
23288
    }
23289
 
23290
    public void unsetWarehouseId() {
23291
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
23292
    }
23293
 
23294
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
23295
    public boolean isSetWarehouseId() {
23296
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
23297
    }
23298
 
23299
    public void setWarehouseIdIsSet(boolean value) {
23300
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
23301
    }
23302
 
23303
    public void setFieldValue(_Fields field, Object value) {
23304
      switch (field) {
23305
      case PROVIDER_ID:
23306
        if (value == null) {
23307
          unsetProviderId();
23308
        } else {
23309
          setProviderId((Long)value);
23310
        }
23311
        break;
23312
 
23313
      case WAREHOUSE_ID:
23314
        if (value == null) {
23315
          unsetWarehouseId();
23316
        } else {
23317
          setWarehouseId((Long)value);
23318
        }
23319
        break;
23320
 
23321
      }
23322
    }
23323
 
23324
    public void setFieldValue(int fieldID, Object value) {
23325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23326
    }
23327
 
23328
    public Object getFieldValue(_Fields field) {
23329
      switch (field) {
23330
      case PROVIDER_ID:
23331
        return new Long(getProviderId());
23332
 
23333
      case WAREHOUSE_ID:
23334
        return new Long(getWarehouseId());
23335
 
23336
      }
23337
      throw new IllegalStateException();
23338
    }
23339
 
23340
    public Object getFieldValue(int fieldId) {
23341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23342
    }
23343
 
23344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23345
    public boolean isSet(_Fields field) {
23346
      switch (field) {
23347
      case PROVIDER_ID:
23348
        return isSetProviderId();
23349
      case WAREHOUSE_ID:
23350
        return isSetWarehouseId();
23351
      }
23352
      throw new IllegalStateException();
23353
    }
23354
 
23355
    public boolean isSet(int fieldID) {
23356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23357
    }
23358
 
23359
    @Override
23360
    public boolean equals(Object that) {
23361
      if (that == null)
23362
        return false;
23363
      if (that instanceof getUndeliveredOrders_args)
23364
        return this.equals((getUndeliveredOrders_args)that);
23365
      return false;
23366
    }
23367
 
23368
    public boolean equals(getUndeliveredOrders_args that) {
23369
      if (that == null)
23370
        return false;
23371
 
23372
      boolean this_present_providerId = true;
23373
      boolean that_present_providerId = true;
23374
      if (this_present_providerId || that_present_providerId) {
23375
        if (!(this_present_providerId && that_present_providerId))
23376
          return false;
23377
        if (this.providerId != that.providerId)
23378
          return false;
23379
      }
23380
 
23381
      boolean this_present_warehouseId = true;
23382
      boolean that_present_warehouseId = true;
23383
      if (this_present_warehouseId || that_present_warehouseId) {
23384
        if (!(this_present_warehouseId && that_present_warehouseId))
23385
          return false;
23386
        if (this.warehouseId != that.warehouseId)
23387
          return false;
23388
      }
23389
 
23390
      return true;
23391
    }
23392
 
23393
    @Override
23394
    public int hashCode() {
23395
      return 0;
23396
    }
23397
 
23398
    public int compareTo(getUndeliveredOrders_args other) {
23399
      if (!getClass().equals(other.getClass())) {
23400
        return getClass().getName().compareTo(other.getClass().getName());
23401
      }
23402
 
23403
      int lastComparison = 0;
23404
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
23405
 
23406
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
23407
      if (lastComparison != 0) {
23408
        return lastComparison;
23409
      }
23410
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
23411
      if (lastComparison != 0) {
23412
        return lastComparison;
23413
      }
23414
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
23415
      if (lastComparison != 0) {
23416
        return lastComparison;
23417
      }
23418
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
23419
      if (lastComparison != 0) {
23420
        return lastComparison;
23421
      }
23422
      return 0;
23423
    }
23424
 
23425
    public void read(TProtocol iprot) throws TException {
23426
      TField field;
23427
      iprot.readStructBegin();
23428
      while (true)
23429
      {
23430
        field = iprot.readFieldBegin();
23431
        if (field.type == TType.STOP) { 
23432
          break;
23433
        }
23434
        _Fields fieldId = _Fields.findByThriftId(field.id);
23435
        if (fieldId == null) {
23436
          TProtocolUtil.skip(iprot, field.type);
23437
        } else {
23438
          switch (fieldId) {
23439
            case PROVIDER_ID:
23440
              if (field.type == TType.I64) {
23441
                this.providerId = iprot.readI64();
23442
                setProviderIdIsSet(true);
23443
              } else { 
23444
                TProtocolUtil.skip(iprot, field.type);
23445
              }
23446
              break;
23447
            case WAREHOUSE_ID:
23448
              if (field.type == TType.I64) {
23449
                this.warehouseId = iprot.readI64();
23450
                setWarehouseIdIsSet(true);
23451
              } else { 
23452
                TProtocolUtil.skip(iprot, field.type);
23453
              }
23454
              break;
23455
          }
23456
          iprot.readFieldEnd();
23457
        }
23458
      }
23459
      iprot.readStructEnd();
23460
      validate();
23461
    }
23462
 
23463
    public void write(TProtocol oprot) throws TException {
23464
      validate();
23465
 
23466
      oprot.writeStructBegin(STRUCT_DESC);
23467
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23468
      oprot.writeI64(this.providerId);
23469
      oprot.writeFieldEnd();
23470
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
23471
      oprot.writeI64(this.warehouseId);
23472
      oprot.writeFieldEnd();
23473
      oprot.writeFieldStop();
23474
      oprot.writeStructEnd();
23475
    }
23476
 
23477
    @Override
23478
    public String toString() {
23479
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
23480
      boolean first = true;
23481
 
23482
      sb.append("providerId:");
23483
      sb.append(this.providerId);
23484
      first = false;
23485
      if (!first) sb.append(", ");
23486
      sb.append("warehouseId:");
23487
      sb.append(this.warehouseId);
23488
      first = false;
23489
      sb.append(")");
23490
      return sb.toString();
23491
    }
23492
 
23493
    public void validate() throws TException {
23494
      // check for required fields
23495
    }
23496
 
23497
  }
23498
 
23499
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
23500
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
23501
 
23502
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
23503
 
23504
    private List<Order> success;
23505
 
23506
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23507
    public enum _Fields implements TFieldIdEnum {
23508
      SUCCESS((short)0, "success");
23509
 
23510
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23511
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23512
 
23513
      static {
23514
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23515
          byId.put((int)field._thriftId, field);
23516
          byName.put(field.getFieldName(), field);
23517
        }
23518
      }
23519
 
23520
      /**
23521
       * Find the _Fields constant that matches fieldId, or null if its not found.
23522
       */
23523
      public static _Fields findByThriftId(int fieldId) {
23524
        return byId.get(fieldId);
23525
      }
23526
 
23527
      /**
23528
       * Find the _Fields constant that matches fieldId, throwing an exception
23529
       * if it is not found.
23530
       */
23531
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23532
        _Fields fields = findByThriftId(fieldId);
23533
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23534
        return fields;
23535
      }
23536
 
23537
      /**
23538
       * Find the _Fields constant that matches name, or null if its not found.
23539
       */
23540
      public static _Fields findByName(String name) {
23541
        return byName.get(name);
23542
      }
23543
 
23544
      private final short _thriftId;
23545
      private final String _fieldName;
23546
 
23547
      _Fields(short thriftId, String fieldName) {
23548
        _thriftId = thriftId;
23549
        _fieldName = fieldName;
23550
      }
23551
 
23552
      public short getThriftFieldId() {
23553
        return _thriftId;
23554
      }
23555
 
23556
      public String getFieldName() {
23557
        return _fieldName;
23558
      }
23559
    }
23560
 
23561
    // isset id assignments
23562
 
23563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23564
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
23565
          new ListMetaData(TType.LIST, 
23566
              new StructMetaData(TType.STRUCT, Order.class))));
23567
    }});
23568
 
23569
    static {
23570
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
23571
    }
23572
 
23573
    public getUndeliveredOrders_result() {
23574
    }
23575
 
23576
    public getUndeliveredOrders_result(
23577
      List<Order> success)
23578
    {
23579
      this();
23580
      this.success = success;
23581
    }
23582
 
23583
    /**
23584
     * Performs a deep copy on <i>other</i>.
23585
     */
23586
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
23587
      if (other.isSetSuccess()) {
23588
        List<Order> __this__success = new ArrayList<Order>();
23589
        for (Order other_element : other.success) {
23590
          __this__success.add(new Order(other_element));
23591
        }
23592
        this.success = __this__success;
23593
      }
23594
    }
23595
 
23596
    public getUndeliveredOrders_result deepCopy() {
23597
      return new getUndeliveredOrders_result(this);
23598
    }
23599
 
23600
    @Deprecated
23601
    public getUndeliveredOrders_result clone() {
23602
      return new getUndeliveredOrders_result(this);
23603
    }
23604
 
23605
    public int getSuccessSize() {
23606
      return (this.success == null) ? 0 : this.success.size();
23607
    }
23608
 
23609
    public java.util.Iterator<Order> getSuccessIterator() {
23610
      return (this.success == null) ? null : this.success.iterator();
23611
    }
23612
 
23613
    public void addToSuccess(Order elem) {
23614
      if (this.success == null) {
23615
        this.success = new ArrayList<Order>();
23616
      }
23617
      this.success.add(elem);
23618
    }
23619
 
23620
    public List<Order> getSuccess() {
23621
      return this.success;
23622
    }
23623
 
23624
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
23625
      this.success = success;
23626
      return this;
23627
    }
23628
 
23629
    public void unsetSuccess() {
23630
      this.success = null;
23631
    }
23632
 
23633
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23634
    public boolean isSetSuccess() {
23635
      return this.success != null;
23636
    }
23637
 
23638
    public void setSuccessIsSet(boolean value) {
23639
      if (!value) {
23640
        this.success = null;
23641
      }
23642
    }
23643
 
23644
    public void setFieldValue(_Fields field, Object value) {
23645
      switch (field) {
23646
      case SUCCESS:
23647
        if (value == null) {
23648
          unsetSuccess();
23649
        } else {
23650
          setSuccess((List<Order>)value);
23651
        }
23652
        break;
23653
 
23654
      }
23655
    }
23656
 
23657
    public void setFieldValue(int fieldID, Object value) {
23658
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23659
    }
23660
 
23661
    public Object getFieldValue(_Fields field) {
23662
      switch (field) {
23663
      case SUCCESS:
23664
        return getSuccess();
23665
 
23666
      }
23667
      throw new IllegalStateException();
23668
    }
23669
 
23670
    public Object getFieldValue(int fieldId) {
23671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23672
    }
23673
 
23674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23675
    public boolean isSet(_Fields field) {
23676
      switch (field) {
23677
      case SUCCESS:
23678
        return isSetSuccess();
23679
      }
23680
      throw new IllegalStateException();
23681
    }
23682
 
23683
    public boolean isSet(int fieldID) {
23684
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23685
    }
23686
 
23687
    @Override
23688
    public boolean equals(Object that) {
23689
      if (that == null)
23690
        return false;
23691
      if (that instanceof getUndeliveredOrders_result)
23692
        return this.equals((getUndeliveredOrders_result)that);
23693
      return false;
23694
    }
23695
 
23696
    public boolean equals(getUndeliveredOrders_result that) {
23697
      if (that == null)
23698
        return false;
23699
 
23700
      boolean this_present_success = true && this.isSetSuccess();
23701
      boolean that_present_success = true && that.isSetSuccess();
23702
      if (this_present_success || that_present_success) {
23703
        if (!(this_present_success && that_present_success))
23704
          return false;
23705
        if (!this.success.equals(that.success))
23706
          return false;
23707
      }
23708
 
23709
      return true;
23710
    }
23711
 
23712
    @Override
23713
    public int hashCode() {
23714
      return 0;
23715
    }
23716
 
23717
    public int compareTo(getUndeliveredOrders_result other) {
23718
      if (!getClass().equals(other.getClass())) {
23719
        return getClass().getName().compareTo(other.getClass().getName());
23720
      }
23721
 
23722
      int lastComparison = 0;
23723
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
23724
 
23725
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23726
      if (lastComparison != 0) {
23727
        return lastComparison;
23728
      }
23729
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23730
      if (lastComparison != 0) {
23731
        return lastComparison;
23732
      }
23733
      return 0;
23734
    }
23735
 
23736
    public void read(TProtocol iprot) throws TException {
23737
      TField field;
23738
      iprot.readStructBegin();
23739
      while (true)
23740
      {
23741
        field = iprot.readFieldBegin();
23742
        if (field.type == TType.STOP) { 
23743
          break;
23744
        }
23745
        _Fields fieldId = _Fields.findByThriftId(field.id);
23746
        if (fieldId == null) {
23747
          TProtocolUtil.skip(iprot, field.type);
23748
        } else {
23749
          switch (fieldId) {
23750
            case SUCCESS:
23751
              if (field.type == TType.LIST) {
23752
                {
23753
                  TList _list72 = iprot.readListBegin();
23754
                  this.success = new ArrayList<Order>(_list72.size);
23755
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
23756
                  {
23757
                    Order _elem74;
23758
                    _elem74 = new Order();
23759
                    _elem74.read(iprot);
23760
                    this.success.add(_elem74);
23761
                  }
23762
                  iprot.readListEnd();
23763
                }
23764
              } else { 
23765
                TProtocolUtil.skip(iprot, field.type);
23766
              }
23767
              break;
23768
          }
23769
          iprot.readFieldEnd();
23770
        }
23771
      }
23772
      iprot.readStructEnd();
23773
      validate();
23774
    }
23775
 
23776
    public void write(TProtocol oprot) throws TException {
23777
      oprot.writeStructBegin(STRUCT_DESC);
23778
 
23779
      if (this.isSetSuccess()) {
23780
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23781
        {
23782
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
23783
          for (Order _iter75 : this.success)
23784
          {
23785
            _iter75.write(oprot);
23786
          }
23787
          oprot.writeListEnd();
23788
        }
23789
        oprot.writeFieldEnd();
23790
      }
23791
      oprot.writeFieldStop();
23792
      oprot.writeStructEnd();
23793
    }
23794
 
23795
    @Override
23796
    public String toString() {
23797
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
23798
      boolean first = true;
23799
 
23800
      sb.append("success:");
23801
      if (this.success == null) {
23802
        sb.append("null");
23803
      } else {
23804
        sb.append(this.success);
23805
      }
23806
      first = false;
23807
      sb.append(")");
23808
      return sb.toString();
23809
    }
23810
 
23811
    public void validate() throws TException {
23812
      // check for required fields
23813
    }
23814
 
23815
  }
23816
 
305 ashish 23817
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
23818
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
23819
 
483 rajveer 23820
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 23821
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
23822
 
483 rajveer 23823
    private long orderId;
305 ashish 23824
    private boolean valid;
23825
 
23826
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23827
    public enum _Fields implements TFieldIdEnum {
483 rajveer 23828
      ORDER_ID((short)1, "orderId"),
305 ashish 23829
      VALID((short)2, "valid");
23830
 
23831
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23832
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23833
 
23834
      static {
23835
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23836
          byId.put((int)field._thriftId, field);
23837
          byName.put(field.getFieldName(), field);
23838
        }
23839
      }
23840
 
23841
      /**
23842
       * Find the _Fields constant that matches fieldId, or null if its not found.
23843
       */
23844
      public static _Fields findByThriftId(int fieldId) {
23845
        return byId.get(fieldId);
23846
      }
23847
 
23848
      /**
23849
       * Find the _Fields constant that matches fieldId, throwing an exception
23850
       * if it is not found.
23851
       */
23852
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23853
        _Fields fields = findByThriftId(fieldId);
23854
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23855
        return fields;
23856
      }
23857
 
23858
      /**
23859
       * Find the _Fields constant that matches name, or null if its not found.
23860
       */
23861
      public static _Fields findByName(String name) {
23862
        return byName.get(name);
23863
      }
23864
 
23865
      private final short _thriftId;
23866
      private final String _fieldName;
23867
 
23868
      _Fields(short thriftId, String fieldName) {
23869
        _thriftId = thriftId;
23870
        _fieldName = fieldName;
23871
      }
23872
 
23873
      public short getThriftFieldId() {
23874
        return _thriftId;
23875
      }
23876
 
23877
      public String getFieldName() {
23878
        return _fieldName;
23879
      }
23880
    }
23881
 
23882
    // isset id assignments
483 rajveer 23883
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 23884
    private static final int __VALID_ISSET_ID = 1;
23885
    private BitSet __isset_bit_vector = new BitSet(2);
23886
 
23887
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 23888
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 23889
          new FieldValueMetaData(TType.I64)));
23890
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
23891
          new FieldValueMetaData(TType.BOOL)));
23892
    }});
23893
 
23894
    static {
23895
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
23896
    }
23897
 
23898
    public getAlerts_args() {
23899
    }
23900
 
23901
    public getAlerts_args(
483 rajveer 23902
      long orderId,
305 ashish 23903
      boolean valid)
23904
    {
23905
      this();
483 rajveer 23906
      this.orderId = orderId;
23907
      setOrderIdIsSet(true);
305 ashish 23908
      this.valid = valid;
23909
      setValidIsSet(true);
23910
    }
23911
 
23912
    /**
23913
     * Performs a deep copy on <i>other</i>.
23914
     */
23915
    public getAlerts_args(getAlerts_args other) {
23916
      __isset_bit_vector.clear();
23917
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 23918
      this.orderId = other.orderId;
305 ashish 23919
      this.valid = other.valid;
23920
    }
23921
 
23922
    public getAlerts_args deepCopy() {
23923
      return new getAlerts_args(this);
23924
    }
23925
 
23926
    @Deprecated
23927
    public getAlerts_args clone() {
23928
      return new getAlerts_args(this);
23929
    }
23930
 
483 rajveer 23931
    public long getOrderId() {
23932
      return this.orderId;
305 ashish 23933
    }
23934
 
483 rajveer 23935
    public getAlerts_args setOrderId(long orderId) {
23936
      this.orderId = orderId;
23937
      setOrderIdIsSet(true);
305 ashish 23938
      return this;
23939
    }
23940
 
483 rajveer 23941
    public void unsetOrderId() {
23942
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 23943
    }
23944
 
483 rajveer 23945
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
23946
    public boolean isSetOrderId() {
23947
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 23948
    }
23949
 
483 rajveer 23950
    public void setOrderIdIsSet(boolean value) {
23951
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 23952
    }
23953
 
23954
    public boolean isValid() {
23955
      return this.valid;
23956
    }
23957
 
23958
    public getAlerts_args setValid(boolean valid) {
23959
      this.valid = valid;
23960
      setValidIsSet(true);
23961
      return this;
23962
    }
23963
 
23964
    public void unsetValid() {
23965
      __isset_bit_vector.clear(__VALID_ISSET_ID);
23966
    }
23967
 
23968
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
23969
    public boolean isSetValid() {
23970
      return __isset_bit_vector.get(__VALID_ISSET_ID);
23971
    }
23972
 
23973
    public void setValidIsSet(boolean value) {
23974
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
23975
    }
23976
 
23977
    public void setFieldValue(_Fields field, Object value) {
23978
      switch (field) {
483 rajveer 23979
      case ORDER_ID:
305 ashish 23980
        if (value == null) {
483 rajveer 23981
          unsetOrderId();
305 ashish 23982
        } else {
483 rajveer 23983
          setOrderId((Long)value);
305 ashish 23984
        }
23985
        break;
23986
 
23987
      case VALID:
23988
        if (value == null) {
23989
          unsetValid();
23990
        } else {
23991
          setValid((Boolean)value);
23992
        }
23993
        break;
23994
 
23995
      }
23996
    }
23997
 
23998
    public void setFieldValue(int fieldID, Object value) {
23999
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24000
    }
24001
 
24002
    public Object getFieldValue(_Fields field) {
24003
      switch (field) {
483 rajveer 24004
      case ORDER_ID:
24005
        return new Long(getOrderId());
305 ashish 24006
 
24007
      case VALID:
24008
        return new Boolean(isValid());
24009
 
24010
      }
24011
      throw new IllegalStateException();
24012
    }
24013
 
24014
    public Object getFieldValue(int fieldId) {
24015
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24016
    }
24017
 
24018
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24019
    public boolean isSet(_Fields field) {
24020
      switch (field) {
483 rajveer 24021
      case ORDER_ID:
24022
        return isSetOrderId();
305 ashish 24023
      case VALID:
24024
        return isSetValid();
24025
      }
24026
      throw new IllegalStateException();
24027
    }
24028
 
24029
    public boolean isSet(int fieldID) {
24030
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24031
    }
24032
 
24033
    @Override
24034
    public boolean equals(Object that) {
24035
      if (that == null)
24036
        return false;
24037
      if (that instanceof getAlerts_args)
24038
        return this.equals((getAlerts_args)that);
24039
      return false;
24040
    }
24041
 
24042
    public boolean equals(getAlerts_args that) {
24043
      if (that == null)
24044
        return false;
24045
 
483 rajveer 24046
      boolean this_present_orderId = true;
24047
      boolean that_present_orderId = true;
24048
      if (this_present_orderId || that_present_orderId) {
24049
        if (!(this_present_orderId && that_present_orderId))
305 ashish 24050
          return false;
483 rajveer 24051
        if (this.orderId != that.orderId)
305 ashish 24052
          return false;
24053
      }
24054
 
24055
      boolean this_present_valid = true;
24056
      boolean that_present_valid = true;
24057
      if (this_present_valid || that_present_valid) {
24058
        if (!(this_present_valid && that_present_valid))
24059
          return false;
24060
        if (this.valid != that.valid)
24061
          return false;
24062
      }
24063
 
24064
      return true;
24065
    }
24066
 
24067
    @Override
24068
    public int hashCode() {
24069
      return 0;
24070
    }
24071
 
24072
    public int compareTo(getAlerts_args other) {
24073
      if (!getClass().equals(other.getClass())) {
24074
        return getClass().getName().compareTo(other.getClass().getName());
24075
      }
24076
 
24077
      int lastComparison = 0;
24078
      getAlerts_args typedOther = (getAlerts_args)other;
24079
 
483 rajveer 24080
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 24081
      if (lastComparison != 0) {
24082
        return lastComparison;
24083
      }
483 rajveer 24084
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 24085
      if (lastComparison != 0) {
24086
        return lastComparison;
24087
      }
24088
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
24089
      if (lastComparison != 0) {
24090
        return lastComparison;
24091
      }
24092
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
24093
      if (lastComparison != 0) {
24094
        return lastComparison;
24095
      }
24096
      return 0;
24097
    }
24098
 
24099
    public void read(TProtocol iprot) throws TException {
24100
      TField field;
24101
      iprot.readStructBegin();
24102
      while (true)
24103
      {
24104
        field = iprot.readFieldBegin();
24105
        if (field.type == TType.STOP) { 
24106
          break;
24107
        }
24108
        _Fields fieldId = _Fields.findByThriftId(field.id);
24109
        if (fieldId == null) {
24110
          TProtocolUtil.skip(iprot, field.type);
24111
        } else {
24112
          switch (fieldId) {
483 rajveer 24113
            case ORDER_ID:
305 ashish 24114
              if (field.type == TType.I64) {
483 rajveer 24115
                this.orderId = iprot.readI64();
24116
                setOrderIdIsSet(true);
305 ashish 24117
              } else { 
24118
                TProtocolUtil.skip(iprot, field.type);
24119
              }
24120
              break;
24121
            case VALID:
24122
              if (field.type == TType.BOOL) {
24123
                this.valid = iprot.readBool();
24124
                setValidIsSet(true);
24125
              } else { 
24126
                TProtocolUtil.skip(iprot, field.type);
24127
              }
24128
              break;
24129
          }
24130
          iprot.readFieldEnd();
24131
        }
24132
      }
24133
      iprot.readStructEnd();
24134
      validate();
24135
    }
24136
 
24137
    public void write(TProtocol oprot) throws TException {
24138
      validate();
24139
 
24140
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 24141
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
24142
      oprot.writeI64(this.orderId);
305 ashish 24143
      oprot.writeFieldEnd();
24144
      oprot.writeFieldBegin(VALID_FIELD_DESC);
24145
      oprot.writeBool(this.valid);
24146
      oprot.writeFieldEnd();
24147
      oprot.writeFieldStop();
24148
      oprot.writeStructEnd();
24149
    }
24150
 
24151
    @Override
24152
    public String toString() {
24153
      StringBuilder sb = new StringBuilder("getAlerts_args(");
24154
      boolean first = true;
24155
 
483 rajveer 24156
      sb.append("orderId:");
24157
      sb.append(this.orderId);
305 ashish 24158
      first = false;
24159
      if (!first) sb.append(", ");
24160
      sb.append("valid:");
24161
      sb.append(this.valid);
24162
      first = false;
24163
      sb.append(")");
24164
      return sb.toString();
24165
    }
24166
 
24167
    public void validate() throws TException {
24168
      // check for required fields
24169
    }
24170
 
24171
  }
24172
 
24173
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
24174
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
24175
 
24176
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24177
 
24178
    private List<Alert> success;
24179
 
24180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24181
    public enum _Fields implements TFieldIdEnum {
24182
      SUCCESS((short)0, "success");
24183
 
24184
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24186
 
24187
      static {
24188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24189
          byId.put((int)field._thriftId, field);
24190
          byName.put(field.getFieldName(), field);
24191
        }
24192
      }
24193
 
24194
      /**
24195
       * Find the _Fields constant that matches fieldId, or null if its not found.
24196
       */
24197
      public static _Fields findByThriftId(int fieldId) {
24198
        return byId.get(fieldId);
24199
      }
24200
 
24201
      /**
24202
       * Find the _Fields constant that matches fieldId, throwing an exception
24203
       * if it is not found.
24204
       */
24205
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24206
        _Fields fields = findByThriftId(fieldId);
24207
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24208
        return fields;
24209
      }
24210
 
24211
      /**
24212
       * Find the _Fields constant that matches name, or null if its not found.
24213
       */
24214
      public static _Fields findByName(String name) {
24215
        return byName.get(name);
24216
      }
24217
 
24218
      private final short _thriftId;
24219
      private final String _fieldName;
24220
 
24221
      _Fields(short thriftId, String fieldName) {
24222
        _thriftId = thriftId;
24223
        _fieldName = fieldName;
24224
      }
24225
 
24226
      public short getThriftFieldId() {
24227
        return _thriftId;
24228
      }
24229
 
24230
      public String getFieldName() {
24231
        return _fieldName;
24232
      }
24233
    }
24234
 
24235
    // isset id assignments
24236
 
24237
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24238
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24239
          new ListMetaData(TType.LIST, 
24240
              new StructMetaData(TType.STRUCT, Alert.class))));
24241
    }});
24242
 
24243
    static {
24244
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
24245
    }
24246
 
24247
    public getAlerts_result() {
24248
    }
24249
 
24250
    public getAlerts_result(
24251
      List<Alert> success)
24252
    {
24253
      this();
24254
      this.success = success;
24255
    }
24256
 
24257
    /**
24258
     * Performs a deep copy on <i>other</i>.
24259
     */
24260
    public getAlerts_result(getAlerts_result other) {
24261
      if (other.isSetSuccess()) {
24262
        List<Alert> __this__success = new ArrayList<Alert>();
24263
        for (Alert other_element : other.success) {
24264
          __this__success.add(new Alert(other_element));
24265
        }
24266
        this.success = __this__success;
24267
      }
24268
    }
24269
 
24270
    public getAlerts_result deepCopy() {
24271
      return new getAlerts_result(this);
24272
    }
24273
 
24274
    @Deprecated
24275
    public getAlerts_result clone() {
24276
      return new getAlerts_result(this);
24277
    }
24278
 
24279
    public int getSuccessSize() {
24280
      return (this.success == null) ? 0 : this.success.size();
24281
    }
24282
 
24283
    public java.util.Iterator<Alert> getSuccessIterator() {
24284
      return (this.success == null) ? null : this.success.iterator();
24285
    }
24286
 
24287
    public void addToSuccess(Alert elem) {
24288
      if (this.success == null) {
24289
        this.success = new ArrayList<Alert>();
24290
      }
24291
      this.success.add(elem);
24292
    }
24293
 
24294
    public List<Alert> getSuccess() {
24295
      return this.success;
24296
    }
24297
 
24298
    public getAlerts_result setSuccess(List<Alert> success) {
24299
      this.success = success;
24300
      return this;
24301
    }
24302
 
24303
    public void unsetSuccess() {
24304
      this.success = null;
24305
    }
24306
 
24307
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24308
    public boolean isSetSuccess() {
24309
      return this.success != null;
24310
    }
24311
 
24312
    public void setSuccessIsSet(boolean value) {
24313
      if (!value) {
24314
        this.success = null;
24315
      }
24316
    }
24317
 
24318
    public void setFieldValue(_Fields field, Object value) {
24319
      switch (field) {
24320
      case SUCCESS:
24321
        if (value == null) {
24322
          unsetSuccess();
24323
        } else {
24324
          setSuccess((List<Alert>)value);
24325
        }
24326
        break;
24327
 
24328
      }
24329
    }
24330
 
24331
    public void setFieldValue(int fieldID, Object value) {
24332
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24333
    }
24334
 
24335
    public Object getFieldValue(_Fields field) {
24336
      switch (field) {
24337
      case SUCCESS:
24338
        return getSuccess();
24339
 
24340
      }
24341
      throw new IllegalStateException();
24342
    }
24343
 
24344
    public Object getFieldValue(int fieldId) {
24345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24346
    }
24347
 
24348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24349
    public boolean isSet(_Fields field) {
24350
      switch (field) {
24351
      case SUCCESS:
24352
        return isSetSuccess();
24353
      }
24354
      throw new IllegalStateException();
24355
    }
24356
 
24357
    public boolean isSet(int fieldID) {
24358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24359
    }
24360
 
24361
    @Override
24362
    public boolean equals(Object that) {
24363
      if (that == null)
24364
        return false;
24365
      if (that instanceof getAlerts_result)
24366
        return this.equals((getAlerts_result)that);
24367
      return false;
24368
    }
24369
 
24370
    public boolean equals(getAlerts_result that) {
24371
      if (that == null)
24372
        return false;
24373
 
24374
      boolean this_present_success = true && this.isSetSuccess();
24375
      boolean that_present_success = true && that.isSetSuccess();
24376
      if (this_present_success || that_present_success) {
24377
        if (!(this_present_success && that_present_success))
24378
          return false;
24379
        if (!this.success.equals(that.success))
24380
          return false;
24381
      }
24382
 
24383
      return true;
24384
    }
24385
 
24386
    @Override
24387
    public int hashCode() {
24388
      return 0;
24389
    }
24390
 
24391
    public int compareTo(getAlerts_result other) {
24392
      if (!getClass().equals(other.getClass())) {
24393
        return getClass().getName().compareTo(other.getClass().getName());
24394
      }
24395
 
24396
      int lastComparison = 0;
24397
      getAlerts_result typedOther = (getAlerts_result)other;
24398
 
24399
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24400
      if (lastComparison != 0) {
24401
        return lastComparison;
24402
      }
24403
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24404
      if (lastComparison != 0) {
24405
        return lastComparison;
24406
      }
24407
      return 0;
24408
    }
24409
 
24410
    public void read(TProtocol iprot) throws TException {
24411
      TField field;
24412
      iprot.readStructBegin();
24413
      while (true)
24414
      {
24415
        field = iprot.readFieldBegin();
24416
        if (field.type == TType.STOP) { 
24417
          break;
24418
        }
24419
        _Fields fieldId = _Fields.findByThriftId(field.id);
24420
        if (fieldId == null) {
24421
          TProtocolUtil.skip(iprot, field.type);
24422
        } else {
24423
          switch (fieldId) {
24424
            case SUCCESS:
24425
              if (field.type == TType.LIST) {
24426
                {
1406 ankur.sing 24427
                  TList _list76 = iprot.readListBegin();
24428
                  this.success = new ArrayList<Alert>(_list76.size);
24429
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 24430
                  {
1406 ankur.sing 24431
                    Alert _elem78;
24432
                    _elem78 = new Alert();
24433
                    _elem78.read(iprot);
24434
                    this.success.add(_elem78);
305 ashish 24435
                  }
24436
                  iprot.readListEnd();
24437
                }
24438
              } else { 
24439
                TProtocolUtil.skip(iprot, field.type);
24440
              }
24441
              break;
24442
          }
24443
          iprot.readFieldEnd();
24444
        }
24445
      }
24446
      iprot.readStructEnd();
24447
      validate();
24448
    }
24449
 
24450
    public void write(TProtocol oprot) throws TException {
24451
      oprot.writeStructBegin(STRUCT_DESC);
24452
 
24453
      if (this.isSetSuccess()) {
24454
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24455
        {
24456
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 24457
          for (Alert _iter79 : this.success)
305 ashish 24458
          {
1406 ankur.sing 24459
            _iter79.write(oprot);
305 ashish 24460
          }
24461
          oprot.writeListEnd();
24462
        }
24463
        oprot.writeFieldEnd();
24464
      }
24465
      oprot.writeFieldStop();
24466
      oprot.writeStructEnd();
24467
    }
24468
 
24469
    @Override
24470
    public String toString() {
24471
      StringBuilder sb = new StringBuilder("getAlerts_result(");
24472
      boolean first = true;
24473
 
24474
      sb.append("success:");
24475
      if (this.success == null) {
24476
        sb.append("null");
24477
      } else {
24478
        sb.append(this.success);
24479
      }
24480
      first = false;
24481
      sb.append(")");
24482
      return sb.toString();
24483
    }
24484
 
24485
    public void validate() throws TException {
24486
      // check for required fields
24487
    }
24488
 
24489
  }
24490
 
24491
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
24492
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
24493
 
483 rajveer 24494
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24495
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
24496
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
24497
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
24498
 
483 rajveer 24499
    private long orderId;
305 ashish 24500
    private boolean unset;
24501
    private long type;
24502
    private String comment;
24503
 
24504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24505
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24506
      ORDER_ID((short)1, "orderId"),
305 ashish 24507
      UNSET((short)2, "unset"),
24508
      TYPE((short)3, "type"),
24509
      COMMENT((short)4, "comment");
24510
 
24511
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24512
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24513
 
24514
      static {
24515
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24516
          byId.put((int)field._thriftId, field);
24517
          byName.put(field.getFieldName(), field);
24518
        }
24519
      }
24520
 
24521
      /**
24522
       * Find the _Fields constant that matches fieldId, or null if its not found.
24523
       */
24524
      public static _Fields findByThriftId(int fieldId) {
24525
        return byId.get(fieldId);
24526
      }
24527
 
24528
      /**
24529
       * Find the _Fields constant that matches fieldId, throwing an exception
24530
       * if it is not found.
24531
       */
24532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24533
        _Fields fields = findByThriftId(fieldId);
24534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24535
        return fields;
24536
      }
24537
 
24538
      /**
24539
       * Find the _Fields constant that matches name, or null if its not found.
24540
       */
24541
      public static _Fields findByName(String name) {
24542
        return byName.get(name);
24543
      }
24544
 
24545
      private final short _thriftId;
24546
      private final String _fieldName;
24547
 
24548
      _Fields(short thriftId, String fieldName) {
24549
        _thriftId = thriftId;
24550
        _fieldName = fieldName;
24551
      }
24552
 
24553
      public short getThriftFieldId() {
24554
        return _thriftId;
24555
      }
24556
 
24557
      public String getFieldName() {
24558
        return _fieldName;
24559
      }
24560
    }
24561
 
24562
    // isset id assignments
483 rajveer 24563
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24564
    private static final int __UNSET_ISSET_ID = 1;
24565
    private static final int __TYPE_ISSET_ID = 2;
24566
    private BitSet __isset_bit_vector = new BitSet(3);
24567
 
24568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24569
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24570
          new FieldValueMetaData(TType.I64)));
24571
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
24572
          new FieldValueMetaData(TType.BOOL)));
24573
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
24574
          new FieldValueMetaData(TType.I64)));
24575
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
24576
          new FieldValueMetaData(TType.STRING)));
24577
    }});
24578
 
24579
    static {
24580
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
24581
    }
24582
 
24583
    public setAlert_args() {
24584
    }
24585
 
24586
    public setAlert_args(
483 rajveer 24587
      long orderId,
305 ashish 24588
      boolean unset,
24589
      long type,
24590
      String comment)
24591
    {
24592
      this();
483 rajveer 24593
      this.orderId = orderId;
24594
      setOrderIdIsSet(true);
305 ashish 24595
      this.unset = unset;
24596
      setUnsetIsSet(true);
24597
      this.type = type;
24598
      setTypeIsSet(true);
24599
      this.comment = comment;
24600
    }
24601
 
24602
    /**
24603
     * Performs a deep copy on <i>other</i>.
24604
     */
24605
    public setAlert_args(setAlert_args other) {
24606
      __isset_bit_vector.clear();
24607
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 24608
      this.orderId = other.orderId;
305 ashish 24609
      this.unset = other.unset;
24610
      this.type = other.type;
24611
      if (other.isSetComment()) {
24612
        this.comment = other.comment;
24613
      }
24614
    }
24615
 
24616
    public setAlert_args deepCopy() {
24617
      return new setAlert_args(this);
24618
    }
24619
 
24620
    @Deprecated
24621
    public setAlert_args clone() {
24622
      return new setAlert_args(this);
24623
    }
24624
 
483 rajveer 24625
    public long getOrderId() {
24626
      return this.orderId;
305 ashish 24627
    }
24628
 
483 rajveer 24629
    public setAlert_args setOrderId(long orderId) {
24630
      this.orderId = orderId;
24631
      setOrderIdIsSet(true);
305 ashish 24632
      return this;
24633
    }
24634
 
483 rajveer 24635
    public void unsetOrderId() {
24636
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 24637
    }
24638
 
483 rajveer 24639
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
24640
    public boolean isSetOrderId() {
24641
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 24642
    }
24643
 
483 rajveer 24644
    public void setOrderIdIsSet(boolean value) {
24645
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 24646
    }
24647
 
24648
    public boolean isUnset() {
24649
      return this.unset;
24650
    }
24651
 
24652
    public setAlert_args setUnset(boolean unset) {
24653
      this.unset = unset;
24654
      setUnsetIsSet(true);
24655
      return this;
24656
    }
24657
 
24658
    public void unsetUnset() {
24659
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
24660
    }
24661
 
24662
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
24663
    public boolean isSetUnset() {
24664
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
24665
    }
24666
 
24667
    public void setUnsetIsSet(boolean value) {
24668
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
24669
    }
24670
 
24671
    public long getType() {
24672
      return this.type;
24673
    }
24674
 
24675
    public setAlert_args setType(long type) {
24676
      this.type = type;
24677
      setTypeIsSet(true);
24678
      return this;
24679
    }
24680
 
24681
    public void unsetType() {
24682
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
24683
    }
24684
 
24685
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
24686
    public boolean isSetType() {
24687
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
24688
    }
24689
 
24690
    public void setTypeIsSet(boolean value) {
24691
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
24692
    }
24693
 
24694
    public String getComment() {
24695
      return this.comment;
24696
    }
24697
 
24698
    public setAlert_args setComment(String comment) {
24699
      this.comment = comment;
24700
      return this;
24701
    }
24702
 
24703
    public void unsetComment() {
24704
      this.comment = null;
24705
    }
24706
 
24707
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
24708
    public boolean isSetComment() {
24709
      return this.comment != null;
24710
    }
24711
 
24712
    public void setCommentIsSet(boolean value) {
24713
      if (!value) {
24714
        this.comment = null;
24715
      }
24716
    }
24717
 
24718
    public void setFieldValue(_Fields field, Object value) {
24719
      switch (field) {
483 rajveer 24720
      case ORDER_ID:
305 ashish 24721
        if (value == null) {
483 rajveer 24722
          unsetOrderId();
305 ashish 24723
        } else {
483 rajveer 24724
          setOrderId((Long)value);
305 ashish 24725
        }
24726
        break;
24727
 
24728
      case UNSET:
24729
        if (value == null) {
24730
          unsetUnset();
24731
        } else {
24732
          setUnset((Boolean)value);
24733
        }
24734
        break;
24735
 
24736
      case TYPE:
24737
        if (value == null) {
24738
          unsetType();
24739
        } else {
24740
          setType((Long)value);
24741
        }
24742
        break;
24743
 
24744
      case COMMENT:
24745
        if (value == null) {
24746
          unsetComment();
24747
        } else {
24748
          setComment((String)value);
24749
        }
24750
        break;
24751
 
24752
      }
24753
    }
24754
 
24755
    public void setFieldValue(int fieldID, Object value) {
24756
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24757
    }
24758
 
24759
    public Object getFieldValue(_Fields field) {
24760
      switch (field) {
483 rajveer 24761
      case ORDER_ID:
24762
        return new Long(getOrderId());
305 ashish 24763
 
24764
      case UNSET:
24765
        return new Boolean(isUnset());
24766
 
24767
      case TYPE:
24768
        return new Long(getType());
24769
 
24770
      case COMMENT:
24771
        return getComment();
24772
 
24773
      }
24774
      throw new IllegalStateException();
24775
    }
24776
 
24777
    public Object getFieldValue(int fieldId) {
24778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24779
    }
24780
 
24781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24782
    public boolean isSet(_Fields field) {
24783
      switch (field) {
483 rajveer 24784
      case ORDER_ID:
24785
        return isSetOrderId();
305 ashish 24786
      case UNSET:
24787
        return isSetUnset();
24788
      case TYPE:
24789
        return isSetType();
24790
      case COMMENT:
24791
        return isSetComment();
24792
      }
24793
      throw new IllegalStateException();
24794
    }
24795
 
24796
    public boolean isSet(int fieldID) {
24797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24798
    }
24799
 
24800
    @Override
24801
    public boolean equals(Object that) {
24802
      if (that == null)
24803
        return false;
24804
      if (that instanceof setAlert_args)
24805
        return this.equals((setAlert_args)that);
24806
      return false;
24807
    }
24808
 
24809
    public boolean equals(setAlert_args that) {
24810
      if (that == null)
24811
        return false;
24812
 
483 rajveer 24813
      boolean this_present_orderId = true;
24814
      boolean that_present_orderId = true;
24815
      if (this_present_orderId || that_present_orderId) {
24816
        if (!(this_present_orderId && that_present_orderId))
305 ashish 24817
          return false;
483 rajveer 24818
        if (this.orderId != that.orderId)
305 ashish 24819
          return false;
24820
      }
24821
 
24822
      boolean this_present_unset = true;
24823
      boolean that_present_unset = true;
24824
      if (this_present_unset || that_present_unset) {
24825
        if (!(this_present_unset && that_present_unset))
24826
          return false;
24827
        if (this.unset != that.unset)
24828
          return false;
24829
      }
24830
 
24831
      boolean this_present_type = true;
24832
      boolean that_present_type = true;
24833
      if (this_present_type || that_present_type) {
24834
        if (!(this_present_type && that_present_type))
24835
          return false;
24836
        if (this.type != that.type)
24837
          return false;
24838
      }
24839
 
24840
      boolean this_present_comment = true && this.isSetComment();
24841
      boolean that_present_comment = true && that.isSetComment();
24842
      if (this_present_comment || that_present_comment) {
24843
        if (!(this_present_comment && that_present_comment))
24844
          return false;
24845
        if (!this.comment.equals(that.comment))
24846
          return false;
24847
      }
24848
 
24849
      return true;
24850
    }
24851
 
24852
    @Override
24853
    public int hashCode() {
24854
      return 0;
24855
    }
24856
 
24857
    public int compareTo(setAlert_args other) {
24858
      if (!getClass().equals(other.getClass())) {
24859
        return getClass().getName().compareTo(other.getClass().getName());
24860
      }
24861
 
24862
      int lastComparison = 0;
24863
      setAlert_args typedOther = (setAlert_args)other;
24864
 
483 rajveer 24865
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 24866
      if (lastComparison != 0) {
24867
        return lastComparison;
24868
      }
483 rajveer 24869
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 24870
      if (lastComparison != 0) {
24871
        return lastComparison;
24872
      }
24873
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
24874
      if (lastComparison != 0) {
24875
        return lastComparison;
24876
      }
24877
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
24878
      if (lastComparison != 0) {
24879
        return lastComparison;
24880
      }
24881
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
24882
      if (lastComparison != 0) {
24883
        return lastComparison;
24884
      }
24885
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
24886
      if (lastComparison != 0) {
24887
        return lastComparison;
24888
      }
24889
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
24890
      if (lastComparison != 0) {
24891
        return lastComparison;
24892
      }
24893
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
24894
      if (lastComparison != 0) {
24895
        return lastComparison;
24896
      }
24897
      return 0;
24898
    }
24899
 
24900
    public void read(TProtocol iprot) throws TException {
24901
      TField field;
24902
      iprot.readStructBegin();
24903
      while (true)
24904
      {
24905
        field = iprot.readFieldBegin();
24906
        if (field.type == TType.STOP) { 
24907
          break;
24908
        }
24909
        _Fields fieldId = _Fields.findByThriftId(field.id);
24910
        if (fieldId == null) {
24911
          TProtocolUtil.skip(iprot, field.type);
24912
        } else {
24913
          switch (fieldId) {
483 rajveer 24914
            case ORDER_ID:
305 ashish 24915
              if (field.type == TType.I64) {
483 rajveer 24916
                this.orderId = iprot.readI64();
24917
                setOrderIdIsSet(true);
305 ashish 24918
              } else { 
24919
                TProtocolUtil.skip(iprot, field.type);
24920
              }
24921
              break;
24922
            case UNSET:
24923
              if (field.type == TType.BOOL) {
24924
                this.unset = iprot.readBool();
24925
                setUnsetIsSet(true);
24926
              } else { 
24927
                TProtocolUtil.skip(iprot, field.type);
24928
              }
24929
              break;
24930
            case TYPE:
24931
              if (field.type == TType.I64) {
24932
                this.type = iprot.readI64();
24933
                setTypeIsSet(true);
24934
              } else { 
24935
                TProtocolUtil.skip(iprot, field.type);
24936
              }
24937
              break;
24938
            case COMMENT:
24939
              if (field.type == TType.STRING) {
24940
                this.comment = iprot.readString();
24941
              } else { 
24942
                TProtocolUtil.skip(iprot, field.type);
24943
              }
24944
              break;
24945
          }
24946
          iprot.readFieldEnd();
24947
        }
24948
      }
24949
      iprot.readStructEnd();
24950
      validate();
24951
    }
24952
 
24953
    public void write(TProtocol oprot) throws TException {
24954
      validate();
24955
 
24956
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 24957
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
24958
      oprot.writeI64(this.orderId);
305 ashish 24959
      oprot.writeFieldEnd();
24960
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
24961
      oprot.writeBool(this.unset);
24962
      oprot.writeFieldEnd();
24963
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
24964
      oprot.writeI64(this.type);
24965
      oprot.writeFieldEnd();
24966
      if (this.comment != null) {
24967
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
24968
        oprot.writeString(this.comment);
24969
        oprot.writeFieldEnd();
24970
      }
24971
      oprot.writeFieldStop();
24972
      oprot.writeStructEnd();
24973
    }
24974
 
24975
    @Override
24976
    public String toString() {
24977
      StringBuilder sb = new StringBuilder("setAlert_args(");
24978
      boolean first = true;
24979
 
483 rajveer 24980
      sb.append("orderId:");
24981
      sb.append(this.orderId);
305 ashish 24982
      first = false;
24983
      if (!first) sb.append(", ");
24984
      sb.append("unset:");
24985
      sb.append(this.unset);
24986
      first = false;
24987
      if (!first) sb.append(", ");
24988
      sb.append("type:");
24989
      sb.append(this.type);
24990
      first = false;
24991
      if (!first) sb.append(", ");
24992
      sb.append("comment:");
24993
      if (this.comment == null) {
24994
        sb.append("null");
24995
      } else {
24996
        sb.append(this.comment);
24997
      }
24998
      first = false;
24999
      sb.append(")");
25000
      return sb.toString();
25001
    }
25002
 
25003
    public void validate() throws TException {
25004
      // check for required fields
25005
    }
25006
 
25007
  }
25008
 
25009
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
25010
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
25011
 
25012
 
25013
 
25014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25015
    public enum _Fields implements TFieldIdEnum {
25016
;
25017
 
25018
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25019
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25020
 
25021
      static {
25022
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25023
          byId.put((int)field._thriftId, field);
25024
          byName.put(field.getFieldName(), field);
25025
        }
25026
      }
25027
 
25028
      /**
25029
       * Find the _Fields constant that matches fieldId, or null if its not found.
25030
       */
25031
      public static _Fields findByThriftId(int fieldId) {
25032
        return byId.get(fieldId);
25033
      }
25034
 
25035
      /**
25036
       * Find the _Fields constant that matches fieldId, throwing an exception
25037
       * if it is not found.
25038
       */
25039
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25040
        _Fields fields = findByThriftId(fieldId);
25041
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25042
        return fields;
25043
      }
25044
 
25045
      /**
25046
       * Find the _Fields constant that matches name, or null if its not found.
25047
       */
25048
      public static _Fields findByName(String name) {
25049
        return byName.get(name);
25050
      }
25051
 
25052
      private final short _thriftId;
25053
      private final String _fieldName;
25054
 
25055
      _Fields(short thriftId, String fieldName) {
25056
        _thriftId = thriftId;
25057
        _fieldName = fieldName;
25058
      }
25059
 
25060
      public short getThriftFieldId() {
25061
        return _thriftId;
25062
      }
25063
 
25064
      public String getFieldName() {
25065
        return _fieldName;
25066
      }
25067
    }
25068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25069
    }});
25070
 
25071
    static {
25072
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
25073
    }
25074
 
25075
    public setAlert_result() {
25076
    }
25077
 
25078
    /**
25079
     * Performs a deep copy on <i>other</i>.
25080
     */
25081
    public setAlert_result(setAlert_result other) {
25082
    }
25083
 
25084
    public setAlert_result deepCopy() {
25085
      return new setAlert_result(this);
25086
    }
25087
 
25088
    @Deprecated
25089
    public setAlert_result clone() {
25090
      return new setAlert_result(this);
25091
    }
25092
 
25093
    public void setFieldValue(_Fields field, Object value) {
25094
      switch (field) {
25095
      }
25096
    }
25097
 
25098
    public void setFieldValue(int fieldID, Object value) {
25099
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25100
    }
25101
 
25102
    public Object getFieldValue(_Fields field) {
25103
      switch (field) {
25104
      }
25105
      throw new IllegalStateException();
25106
    }
25107
 
25108
    public Object getFieldValue(int fieldId) {
25109
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25110
    }
25111
 
25112
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25113
    public boolean isSet(_Fields field) {
25114
      switch (field) {
25115
      }
25116
      throw new IllegalStateException();
25117
    }
25118
 
25119
    public boolean isSet(int fieldID) {
25120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25121
    }
25122
 
25123
    @Override
25124
    public boolean equals(Object that) {
25125
      if (that == null)
25126
        return false;
25127
      if (that instanceof setAlert_result)
25128
        return this.equals((setAlert_result)that);
25129
      return false;
25130
    }
25131
 
25132
    public boolean equals(setAlert_result that) {
25133
      if (that == null)
25134
        return false;
25135
 
25136
      return true;
25137
    }
25138
 
25139
    @Override
25140
    public int hashCode() {
25141
      return 0;
25142
    }
25143
 
25144
    public int compareTo(setAlert_result other) {
25145
      if (!getClass().equals(other.getClass())) {
25146
        return getClass().getName().compareTo(other.getClass().getName());
25147
      }
25148
 
25149
      int lastComparison = 0;
25150
      setAlert_result typedOther = (setAlert_result)other;
25151
 
25152
      return 0;
25153
    }
25154
 
25155
    public void read(TProtocol iprot) throws TException {
25156
      TField field;
25157
      iprot.readStructBegin();
25158
      while (true)
25159
      {
25160
        field = iprot.readFieldBegin();
25161
        if (field.type == TType.STOP) { 
25162
          break;
25163
        }
25164
        _Fields fieldId = _Fields.findByThriftId(field.id);
25165
        if (fieldId == null) {
25166
          TProtocolUtil.skip(iprot, field.type);
25167
        } else {
25168
          switch (fieldId) {
25169
          }
25170
          iprot.readFieldEnd();
25171
        }
25172
      }
25173
      iprot.readStructEnd();
25174
      validate();
25175
    }
25176
 
25177
    public void write(TProtocol oprot) throws TException {
25178
      oprot.writeStructBegin(STRUCT_DESC);
25179
 
25180
      oprot.writeFieldStop();
25181
      oprot.writeStructEnd();
25182
    }
25183
 
25184
    @Override
25185
    public String toString() {
25186
      StringBuilder sb = new StringBuilder("setAlert_result(");
25187
      boolean first = true;
25188
 
25189
      sb.append(")");
25190
      return sb.toString();
25191
    }
25192
 
25193
    public void validate() throws TException {
25194
      // check for required fields
25195
    }
25196
 
25197
  }
25198
 
68 ashish 25199
}